Skip to content

Instantly share code, notes, and snippets.

@charliewilco
Created August 4, 2015 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charliewilco/7ea6b9c383fcd31dcbb1 to your computer and use it in GitHub Desktop.
Save charliewilco/7ea6b9c383fcd31dcbb1 to your computer and use it in GitHub Desktop.
PostCSS Variables Custom Selectors
@use cssnext;
:root {
--gotham: 'Gotham', 'Proxima Nova', 'Avenir Next', sans-serif;
--break__sm: 32rem;
}
@custom-media --vp-sm (width >= var(--break__sm));
body {
font-family: var(--gotham);
font-size: 100%;
@media (--vp-sm) { font-size: 1rem; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment