Шаблон:ColoredTextFrame/styles.css: различия между версиями

Материал из Space Station 14 Вики
мНет описания правки
мНет описания правки
 
(не показана 1 промежуточная версия этого же участника)
Строка 13: Строка 13:
     display: block;
     display: block;
     padding: 6px 8px;
     padding: 6px 8px;
     border: 1px solid transparent;
     border-radius: var(--border-radius-high);
    border-radius: 0.5em;


     background: rgba(var(--label-r), var(--label-g), var(--label-b), var(--background-alpha));
     background: rgba(var(--label-r), var(--label-g), var(--label-b), var(--background-alpha));
     border-color: rgba(var(--label-r), var(--label-g), var(--label-b), var(--border-alpha));
     border: 1px solid rgba(var(--label-r), var(--label-g), var(--label-b), var(--border-alpha));
}
}


.сolored-frame-text__header {
.сolored-frame-text__header {
    font-size: 15px;
     font-weight: bold;
     font-weight: bold;
     font-family: "noto sans";
     font-family: var(--font-family-heading);
     margin-bottom: 4px;
     margin-bottom: 4px;
     color: rgba(var(--label-r-calc), var(--label-g-calc), var(--label-b-calc), 1);
     color: rgba(var(--label-r-calc), var(--label-g-calc), var(--label-b-calc), 1);
Строка 29: Строка 27:


.сolored-frame-text__content {
.сolored-frame-text__content {
     color: lightgray;
     color: var(--theme-text-color);
}
}

Текущая версия от 05:57, 17 июня 2025

.сolored-frame-text {
    --perceived-lightness: calc( ((var(--label-r) * 0.2126) + (var(--label-g) * 0.7152) + (var(--label-b) * 0.0722)) / 255 );
    --lightness-switch: max(0, min(calc((1/(var(--lightness-threshold) - var(--perceived-lightness)))), 1));
    
    --lighten-by: calc(((var(--lightness-threshold) - var(--perceived-lightness)) * 100) * var(--lightness-switch));
    
    --label-r-calc: calc(var(--label-r) + var(--lighten-by));
    --label-g-calc: calc(var(--label-g) + var(--lighten-by));
    --label-b-calc: calc(var(--label-b) + var(--lighten-by));
}

.сolored-frame-text {
    display: block;
    padding: 6px 8px;
    border-radius: var(--border-radius-high);

    background: rgba(var(--label-r), var(--label-g), var(--label-b), var(--background-alpha));
    border: 1px solid rgba(var(--label-r), var(--label-g), var(--label-b), var(--border-alpha));
}

.сolored-frame-text__header {
    font-weight: bold;
    font-family: var(--font-family-heading);
    margin-bottom: 4px;
    color: rgba(var(--label-r-calc), var(--label-g-calc), var(--label-b-calc), 1);
}

.сolored-frame-text__content {
    color: var(--theme-text-color);
}