Skip to content

Instantly share code, notes, and snippets.

@equinusocio
Last active August 22, 2019 05:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save equinusocio/a0cf32106d5ae386fe647ca37d7c2b4b to your computer and use it in GitHub Desktop.
Save equinusocio/a0cf32106d5ae386fe647ca37d7c2b4b to your computer and use it in GitHub Desktop.
Custom PCSS breakpoints
/**
*
* Conversion Table (base 16px)
* 30em → 480px
* 48em → 768px
* 60em → 960px
* 80em → 1280px
* 100em → 1600px
*
*/
@custom-media --from-extraSmall (min-width: 30em);
@custom-media --from-small (min-width: 48em);
@custom-media --from-medium (min-width: 60em);
@custom-media --from-large (min-width: 80em);
@custom-media --from-extraLarge (min-width: 100em);
@custom-media --to-extraSmall (max-width: 30em);
@custom-media --to-small (max-width: 48em);
@custom-media --to-medium (max-width: 60em);
@custom-media --to-large (max-width: 80em);
@custom-media --to-extraLarge (max-width: 100em);
@custom-media --landscape (orientation: landscape);
@custom-media --portrait (orientation: portrait);
@custom-media --reduced-motion (prefers-reduced-motion: reduce);
@custom-media --light-scheme (prefers-color-scheme: light);
@custom-media --dark-scheme (prefers-color-scheme: dark);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment