Skip to content

Instantly share code, notes, and snippets.

@dineaji
Last active November 17, 2020 18:31
Show Gist options
  • Save dineaji/af427f83a3ab0bb311bb1fd1d4caf9cf to your computer and use it in GitHub Desktop.
Save dineaji/af427f83a3ab0bb311bb1fd1d4caf9cf to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// UP
$xsmall-up: "(min-width: 544px)";
$small-up: "(min-width: 768px)";
$medium-up: "(min-width: 992px)";
$large-up: "(min-width: 1200px)";
$xlarge-up: "(min-width: 1366px)";
// DOWN
$xsmall-down: "(max-width: 543px)";
$small-down: "(max-width: 767px)";
$medium-down: "(max-width: 991px)";
$large-down: "(max-width: 1199px)";
// _mixins.scss
@mixin print($declarations) {
@each $property, $value in $declarations {
@if (type-of(map-get($declarations,$property))==map){
@media #{$small-up} {
#{$property}: map-get(map-get($declarations,$property),sm) or null;
}
@media #{$medium-up} {
#{$property}: map-get(map-get($declarations,$property),md) or null
}
@media #{$large-up} {
#{$property}: map-get(map-get($declarations,$property),lg) or null
}
}
@else{
#{$property}: $value
}
}
}
$colorv : #f9f9f9;
$accordion:(
h1:(
padding: 10px,
float: right,
color: $colorv
)
);
.accordion-item {
clear: both;
float: left;
width: 100%;
height: 100%;
@if variable-exists(accordion) and map-has-key($accordion, h1) {
@include print(map-get($accordion, h1));
}
}
.accordion-item {
clear: both;
float: left;
width: 100%;
height: 100%;
padding: 10px;
float: right;
color: #f9f9f9;
}
{
"sass": {
"compiler": "dart-sass/1.26.11",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment