feat: more dark theme work

This commit is contained in:
Kazhnuz 2021-07-28 19:17:16 +02:00
parent 27e80667ff
commit a5f67de09b
4 changed files with 23 additions and 5 deletions

View file

@ -41,6 +41,22 @@
} }
} }
@function accentuate($color) {
@if (luminance($color) > 255 * $whiteness_value) {
@return darken($color, 7.5%);
} @else {
@return lighten($color, 3%);
}
}
@function dim($color) {
@if (luminance($color) > 255 * $whiteness_value) {
@return transparentize($color, 0.8);
} @else {
@return transparentize($color, 0.6);
}
}
// Couleurs du theme // Couleurs du theme
$color-link: get-color("link"); $color-link: get-color("link");

View file

@ -66,7 +66,7 @@ $button_small: $lineheight_quarter;
} }
@mixin button-color($background-color) { @mixin button-color($background-color) {
@include button-fullcontrol($background-color, darken($background-color, 7.5%), getTextColorFromBackground($background-color)); @include button-fullcontrol($background-color, lighten($background-color, 7.5%), getTextColorFromBackground($background-color));
} }
.btn { .btn {
@ -111,7 +111,7 @@ $button_small: $lineheight_quarter;
} }
.btn-readmore { .btn-readmore {
@include button-fullcontrol(transparent, darken($color-background-alt, 7.5%), $color-primary); @include button-fullcontrol(transparent, accentuate($color-background-alt), $color-primary);
@include prefer-no-borders(); @include prefer-no-borders();
} }
@ -151,7 +151,7 @@ ul.breadcrumb, ol.breadcrumb, .breadcrumb {
a, & > span { a, & > span {
display:inline-block; display:inline-block;
@include button($button-large); @include button($button-large);
@include button-fullcontrol($color-background-alt, darken($color-background-alt, 5%), get-color("dark2")); @include button-fullcontrol($color-background-alt, accentuate($color-background-alt), get-color("dark2"));
margin:0 $button-large/2.5 0 $button-large/2.5; margin:0 $button-large/2.5 0 $button-large/2.5;
&:before { &:before {

View file

@ -146,7 +146,7 @@ $card-smallpad: $lineheight_half;
a, a:visited { a, a:visited {
@include shape-style($lineheight_half); @include shape-style($lineheight_half);
@include button-hover(); @include button-hover();
@include button-fullcontrol(transparent, darken($color-background-alt, 7.5%), $color-primary); @include button-fullcontrol(transparent, accentuate($color-background-alt), $color-primary);
} }
.menu-divider { .menu-divider {

View file

@ -62,7 +62,7 @@ $preview-height: 8*$lineheight;
line-height: $lineheight !important; line-height: $lineheight !important;
text-align:justify; text-align:justify;
background-color:rgba(0,0,0,0.00); background-color:rgba(0,0,0,0.00);
color:rgba(0,0,0,0.4); color:dim(getFontColor());
position: relative; position: relative;
display: flex; display: flex;
@ -120,6 +120,8 @@ $preview-height: 8*$lineheight;
min-height:100%; min-height:100%;
min-width:100%; min-width:100%;
@include border-radius($card-radius); @include border-radius($card-radius);
font-size:0.85rem;
line-height:1.25rem;
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
margin-bottom:0px; margin-bottom:0px;