feat: add a modifiable common header margin

This commit is contained in:
Kazhnuz 2021-07-28 17:51:30 +02:00
parent 8f2eb6d48c
commit 7b39f8ae02
3 changed files with 5 additions and 4 deletions

View file

@ -23,6 +23,8 @@ $lineheight: $baseline * 1rem;
$lineheight_half: $lineheight/2; $lineheight_half: $lineheight/2;
$lineheight_quarter: $lineheight/4; $lineheight_quarter: $lineheight/4;
$card-header-margin: $lineheight;
$border-radius: 12px; $border-radius: 12px;
$border-size: 0px; $border-size: 0px;

View file

@ -7,7 +7,6 @@
$card-bigpad: $lineheight; $card-bigpad: $lineheight;
$card-smallpad: $lineheight_half; $card-smallpad: $lineheight_half;
$header-margin: $lineheight;
@mixin card($size) { @mixin card($size) {
@include border-radius(); @include border-radius();
@ -22,13 +21,13 @@ $header-margin: $lineheight;
&:first-child { &:first-child {
margin-top: $size; margin-top: $size;
&.card-header { &.card-header {
margin-top:$header-margin; margin-top:$card-header-margin;
} }
} }
&:last-child { &:last-child {
margin-bottom: $size; margin-bottom: $size;
&.card-header { &.card-header {
margin-bottom:$header-margin; margin-bottom:$card-header-margin;
} }
} }
} }

View file

@ -76,7 +76,7 @@ $preview-height: 8*$lineheight;
top: 0; top: 0;
left: 0; left: 0;
position: absolute; position: absolute;
padding-top: $lineheight_half; padding-top: $card-header-margin/2;
backdrop-filter: none; backdrop-filter: none;
transition: background-color 0.3s; transition: background-color 0.3s;
@include border-radius(); @include border-radius();