Skip to content

Instantly share code, notes, and snippets.

@dineaji
Created November 17, 2020 20:29
Show Gist options
  • Save dineaji/471cf5596671647fc1a45ed6a8cedd71 to your computer and use it in GitHub Desktop.
Save dineaji/471cf5596671647fc1a45ed6a8cedd71 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:(
margin: (
sm:10px,
md: 15px,
lg: 20px
),
font-size: (
sm: 20px,
md: 10px,
lg: 38px
),
padding: 10px,
color: $colorv
)
);
.accordion-item {
@include print(
map-merge((
padding: 18px,
clear: both,
float: left,
width: 100%,
height: 100%,
font-size: (
sm: 20px,
md: 10px,
lg: 35px
)),
if(variable-exists(accordion) and map-has-key($accordion, h1),
map-get($accordion,h1),
()
)
))
}
.accordion-item {
padding: 10px;
clear: both;
float: left;
width: 100%;
height: 100%;
color: #f9f9f9;
}
@media (min-width: 768px) {
.accordion-item {
font-size: 20px;
}
}
@media (min-width: 992px) {
.accordion-item {
font-size: 10px;
}
}
@media (min-width: 1200px) {
.accordion-item {
font-size: 38px;
}
}
@media (min-width: 768px) {
.accordion-item {
margin: 10px;
}
}
@media (min-width: 992px) {
.accordion-item {
margin: 15px;
}
}
@media (min-width: 1200px) {
.accordion-item {
margin: 20px;
}
}
{
"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