Created
December 28, 2020 23:45
-
-
Save robby1066/f96ecd0c60e6f346d97eee71dd83e3f2 to your computer and use it in GitHub Desktop.
CSS boilerplate structure for multiple contexts and user preferences
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CSS Initializeer": { | |
"prefix": "initialize", | |
"body": [ | |
"/* VARIABLES */", | |
"/* SASS VARIABLES - WILL BE PREPROCESSED */", | |
"", | |
"\\$mobile-breakpoint: 768px;", | |
"", | |
"/* CSS VARIABLES - WILL BE RENDERED IN BROWSER */ ", | |
":root { ", | |
" /* COLORS */ ", | |
" /* --example-color: #000000; */", | |
"", | |
" /* FONT SIZES */ ", | |
" /* --example-size: 1.5rem; */", | |
"", | |
"}", | |
"", | |
"/* PREFERS DARK MODE */", | |
"/* Does this design accomodate viewers who prefer a dark color scheme? */", | |
"@media(prefers-color-scheme: dark) {", | |
" :root {", | |
" ", | |
" }", | |
"}", | |
"", | |
"/* PREFERS REDUCED MOTION */", | |
"/* Does this design accomodate viewers who prefer reduced motion? */", | |
"@media (prefers-reduced-motion) {", | |
" :root {", | |
" ", | |
" }", | |
"}", | |
"", | |
"/* GLOBAL STYLES */ ", | |
":root {", | |
" ", | |
"}", | |
"", | |
"/* DESKTOP-ONLY STYLES */", | |
"@media only screen and (min-width: (\\$mobile-breakpoint+1px)) {", | |
" :root {", | |
"", | |
" }", | |
"}", | |
"", | |
"/* MOBILE-ONLY STYLES */", | |
"/* Does this design accomodate viewers using a small screen or screen magnifier? */", | |
"@media only screen and (max-width: \\$mobile-breakpoint) {", | |
" :root {", | |
"", | |
" }", | |
"}" | |
], | |
"description": "CSS Initializeer" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Docs on how to install snippets in VS Code