Skip to content

Instantly share code, notes, and snippets.

@huksley
Created August 24, 2022 17:39
Show Gist options
  • Save huksley/f14eabec9715da06f4f0b6f3972b188e to your computer and use it in GitHub Desktop.
Save huksley/f14eabec9715da06f4f0b6f3972b188e to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Locofy element select demo</title>
<style type="text/css">
.design-element {
border: 1px dashed #8a6dc0;
color: #8a6dc0;
display: inline-block;
margin-left: -2px;
margin-right: -2px;
padding-left: 6px;
padding-right: 6px;
position: relative;
}
.design-element > span {
background-color: #fff;
border: 1px solid #8a6dc0;
border-radius: 50%;
display: block;
height: 6px;
position: absolute;
width: 6px;
}
.design-element > span:first-child {
left: 0;
top: 0;
transform: translate(-4px, -4px);
}
.design-element > span:nth-of-type(2) {
left: 50%;
top: 0;
transform: translate(-4px, -4px);
}
.design-element > span:nth-of-type(3) {
right: 0;
top: 0;
transform: translate(4px, -4px);
}
.design-element > span:nth-of-type(4) {
left: 0;
top: 50%;
transform: translate(-4px, -4px);
}
.design-element > span:nth-of-type(5) {
right: 0;
top: 50%;
transform: translate(4px, -4px);
}
.design-element > span:nth-of-type(6) {
bottom: 0;
left: 0;
transform: translate(-4px, 4px);
}
.design-element > span:nth-of-type(7) {
bottom: 0;
left: 50%;
transform: translate(-4px, 4px);
}
.design-element > span:nth-of-type(8) {
bottom: 0;
right: 0;
transform: translate(4px, 4px);
}
</style>
</head>
<body>
<h1>
Turn Figma
<span class="design-element"
>designs<span></span><span></span><span></span><span></span><span></span
><span></span><span></span><span></span
></span>
into a production ready code.
</h1>
As seen on <a href="https://www.locofy.ai/">locofy.ai</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment