Skip to content

Instantly share code, notes, and snippets.

@dinocarl
Last active October 11, 2018 19:04
Show Gist options
  • Save dinocarl/40be21c8d0427ea6d5946f34ba37ca73 to your computer and use it in GitHub Desktop.
Save dinocarl/40be21c8d0427ea6d5946f34ba37ca73 to your computer and use it in GitHub Desktop.
@mixin decl($props) {
// layout
display: prop('display', $props);
position: prop('position', $props);
top: prop('top', $props);
right: prop('right', $props);
bottom: prop('bottom', $props);
left: prop('left', $props);
float: prop('float', $props);
clear: prop('clear', $props);
width: prop('width', $props);
min-width: prop('min-width', $props);
max-width: prop('max-width', $props);
height: prop('height', $props);
min-height: prop('min-height', $props);
max-height: prop('max-height', $props);
overflow: prop('overflow', $props);
// margins
margin: prop('margin', $props);
margin-top: prop('margin-top', $props);
margin-right: prop('margin-right', $props);
margin-bottom: prop('margin-bottom', $props);
margin-left: prop('margin-left', $props);
// padding
padding: prop('padding', $props);
padding-top: prop('padding-top', $props);
padding-right: prop('padding-right', $props);
padding-bottom: prop('padding-bottom', $props);
padding-left: prop('padding-left', $props);
// text
color: prop('color', $props);
font-family: prop('font-family', $props);
font-size: prop('font-size', $props);
font-style: prop('font-style', $props);
font-weight: prop('font-weight', $props);
list-style: prop('list-style', $props);
list-style-image: prop('list-style-image', $props);
list-style-position: prop('list-style-position', $props);
list-style-type: prop('list-style-type', $props);
text-align: prop('text-align', $props);
text-decoration: prop('text-decoration', $props);
text-transform: prop('text-transform', $props);
text-shadow: prop('text-shadow', $props);
content: prop('content', $props);
// backgrounds
background: prop('background', $props);
background-color: prop('background-color', $props);
background-image: prop('background-image', $props);
background-origin: prop('background-origin', $props);
background-position: prop('background-position', $props);
background-position-x: prop('background-position-x', $props);
background-position-y: prop('background-position-y', $props);
background-repeat: prop('background-repeat', $props);
background-size: prop('background-size', $props);
// borders
border: prop('border', $props);
border-color: prop('border-color', $props);
border-style: prop('border-style', $props);
border-width: prop('border-width', $props);
border-top: prop('border-top', $props);
border-top-color: prop('border-top-color', $props);
border-top-style: prop('border-top-style', $props);
border-top-width: prop('border-top-width', $props);
border-right: prop('border-right', $props);
border-right-color: prop('border-right-color', $props);
border-right-style: prop('border-right-style', $props);
border-right-width: prop('border-right-width', $props);
border-bottom: prop('border-bottom', $props);
border-bottom-color: prop('border-bottom-color', $props);
border-bottom-style: prop('border-bottom-style', $props);
border-bottom-width: prop('border-bottom-width', $props);
border-left: prop('border-left', $props);
border-left-color: prop('border-left-color', $props);
border-left-style: prop('border-left-style', $props);
border-left-width: prop('border-left-width', $props);
// selectors to extend
$selectors: prop('extend', $props);
@if not is_null($selectors) {
@each $selector in $selectors {
@extend #{$selector};
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment