Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Last active December 31, 2019 20:57
Show Gist options
  • Save tomhodgins/dd718f4e66c42c903e7ce6a7ff258b3c to your computer and use it in GitHub Desktop.
Save tomhodgins/dd718f4e66c42c903e7ce6a7ff258b3c to your computer and use it in GitHub Desktop.
An example of a valid CSS stylesheet using @--reset, --clamped-font-size and nesting CSS rules inside CSS custom properties, can be built with process-css-demo or online at https://tomhodgins.com/demo/preprocess/
@--reset test-9;
.up-modal {
z-index: 9999999;
}
test-9 {
display: flex;
flex-direction: column;
align-items: center;
---\ h1: {
margin: .5em auto;
max-width: 100%;
color: black;
--clamped-font-size: 24, 6.75, 40;
font-weight: 500;
line-height: 1.2;
letter-spacing: 0;
text-align: center;
---\ strong: {
font-weight: bolder;
};
};
---\ a: {
display: block;
margin: 1em auto;
font-family: Montserrat;
font-size: 24px;
font-weight: 500;
border-radius: 1em;
border: 1px solid #f8b34f;
display: inline-block;
padding: 8px 30px;
color: white;
text-transform: uppercase;
background: #f8b34f;
text-shadow: rgba(0, 0, 0, .1) 0 0 5px;
---\:hover\,\:focus: {
background: #FFFFFF;
color: #4a4a4a;
text-decoration: none;
};
---\:active: {
box-shadow: inset 0 6px 10px rgba(0, 0 , 0, .125);
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment