Skip to content

Instantly share code, notes, and snippets.

@rxnlabs
Last active August 30, 2017 16:46
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 rxnlabs/188df576cba9e5bf93b54e1e1b68e458 to your computer and use it in GitHub Desktop.
Save rxnlabs/188df576cba9e5bf93b54e1e1b68e458 to your computer and use it in GitHub Desktop.
SASS/SCSS Mixin with a list of elements with default display: block List from : https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
// List from https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
@mixin block-elements($context: '') {
#{$context} address,
#{$context} article,
#{$context} aside,
#{$context} blockquote,
#{$context} canvas,
#{$context} dd,
#{$context} div,
#{$context} dl,
#{$context} dt,
#{$context} fieldset,
#{$context} figcaption,
#{$context} figure,
#{$context} footer,
#{$context} h1,
#{$context} h2,
#{$context} h3,
#{$context} h4,
#{$context} h5,
#{$context} h6,
#{$context} hgroup,
#{$context} hr,
#{$context} li,
#{$context} main,
#{$context} nav,
#{$context} noscript,
#{$context} ol,
#{$context} output,
#{$context} p,
#{$context} pre,
#{$context} section,
#{$context} table,
#{$context} tfoot,
#{$context} ul,
#{$context} video {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment