Last active
August 22, 2019 09:19
-
-
Save stphn/fd3dc91890ca2008ac7d5ca69082e4ee to your computer and use it in GitHub Desktop.
vscode snippets
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
{ | |
"require": { | |
"prefix": "require", | |
"body": [ | |
"$1: require('../$1/$1.data')" | |
], | |
"description": "Require data" | |
} | |
} |
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
{ | |
"Add row and column": { | |
"prefix": "row", | |
"body": [ | |
"<div class=\"row\">", | |
"\t<div class=\"column\">$1</div>", | |
"\t<div class=\"column\">$2</div>", | |
"</div>" | |
], | |
"description": "Add Basicgrid row and column" | |
}, | |
"Nunjucks inject": { | |
"prefix": "inject", | |
"body": [ | |
"{% inject \"$1/$1.njk\", $1 %}" | |
], | |
"description": "Nunjucks inject" | |
}, | |
"Bodytext Safe": { | |
"prefix": "bdt", | |
"body": [ | |
"{{bodytext | safe}}" | |
], | |
"description": "Bodytext with safe tag" | |
}, | |
"If target": { | |
"prefix": "tar", | |
"body": [ | |
"target=\"{{ href.target | default('_blank') }}\"" | |
], | |
"description": "If target" | |
}, | |
"href": { | |
"prefix": "link", | |
"body": [ | |
"<a href=\"{{ item.href.value }}\" {% if item.href.target %}target=\"{{ item.href.target | default('_blank') }}\"{% endif %}>", | |
"\t{{ item.label }}", | |
"</a>", | |
], | |
"description": "link" | |
} | |
} |
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
{ | |
"add color": { | |
"prefix": "cc", | |
"body": [ | |
"color('$1');" | |
], | |
"description": "Add color variables" | |
}, | |
"add media": { | |
"prefix": "media", | |
"body": [ | |
"@media (${1|min,max|}-width: ${2|$bpS,$bpM,$bpL|}) {", | |
"\t$0", | |
"}" | |
], | |
"description": "Add media queries" | |
}, | |
"transition": { | |
"prefix": "trans", | |
"body": [ | |
"transition: $1 $$duration $$timing;", | |
"$2" | |
], | |
"description": "Add Transition shorthand" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment