Remove now-unused color variables styles

pull/8882/head
Thibaud Colas 2022-07-09 07:14:48 +01:00
rodzic 1b2aa07a57
commit 73ce1b6f8e
6 zmienionych plików z 0 dodań i 134 usunięć

Wyświetl plik

@ -7,4 +7,3 @@ No CSS should be produced by these files.
@import 'tools/mixins.breakpoints';
@import 'tools/mixins.general';
@import 'tools/mixins.grid';
@import 'tools/various.colors';

Wyświetl plik

@ -91,13 +91,6 @@
margin-bottom: 0;
}
.c-dropdown__divider {
border-color: #555;
border-style: dotted;
margin-top: 12px;
margin-bottom: 12px;
}
@keyframes dropdownIn {
0% {
opacity: 0;

Wyświetl plik

@ -1,17 +0,0 @@
.media-placeholder {
width: 600px;
height: 400px;
background-color: #ccc;
padding: 5px;
h3,
p {
margin: 0;
}
img {
max-width: 350px;
max-height: 350px;
margin: 20px;
}
}

Wyświetl plik

@ -81,7 +81,6 @@ These are base styles for bare HTML elements.
@import 'elements/elements';
@import 'elements/typography';
@import 'elements/forms';
@import 'elements/root';
/* OBJECTS
These are classes related to layout, known as 'objects' in ITCSS or OOCSS.
@ -127,7 +126,6 @@ These are classes for components.
@import 'components/grid.legacy';
@import 'components/footer';
@import 'components/loading-mask';
@import 'components/media-placeholder';
@import 'components/human-readable-date';
@import 'components/link.legacy';
@import 'components/privacy-indicator';

Wyświetl plik

@ -1,34 +0,0 @@
:root {
@include define-color('color-primary', #007d7e);
@include define-color(
'color-primary-darker',
css-darken(css-adjust-hue(get-color('color-primary'), 1), 4%)
);
@include define-color(
'color-primary-dark',
css-darken(css-adjust-hue(get-color('color-primary'), 1), 7%)
);
@include define-color(
'color-primary-lighter',
css-lighten(
css-desaturate(css-adjust-hue(get-color('color-primary'), 1), 46%),
48%
)
);
@include define-color(
'color-primary-light',
css-lighten(
css-desaturate(css-adjust-hue(get-color('color-primary'), 1), 44%),
58%
)
);
@include define-color(
'color-input-focus',
css-lighten(css-desaturate(get-color('color-primary'), 40%), 72%)
);
@include define-color(
'color-input-focus-border',
css-lighten(css-saturate(get-color('color-primary'), 12%), 10%)
);
}

Wyświetl plik

@ -1,73 +0,0 @@
@use 'sass:math';
@use 'sass:color';
@use 'sass:list';
@use 'sass:meta';
// $color is either a color or an hsl tuple
@mixin define-color($name, $color) {
$h: null;
$s: null;
$l: null;
@if meta.type-of($color) == color {
$h: math.div(color.hue($color), 1deg); // Cast to unitless
$s: color.saturation($color);
$l: color.lightness($color);
} @else {
$h: list.nth($color, 1);
$s: list.nth($color, 2);
$l: list.nth($color, 3);
}
--#{$name}-hue: #{$h};
--#{$name}-saturation: #{$s};
--#{$name}-lightness: #{$l};
// Prettier causes a linting issue when reformatting this.
/* prettier-ignore */
--#{$name}: hsl(#{ var(--#{$name}-hue), var(--#{$name}-saturation), var(--#{$name}-lightness) });
}
@function get-color($name) {
@return (
var(--#{$name}-hue),
var(--#{$name}-saturation),
var(--#{$name}-lightness)
);
}
@function css-darken($hsl-tuple, $darken-by) {
$h: list.nth($hsl-tuple, 1);
$s: list.nth($hsl-tuple, 2);
$l: list.nth($hsl-tuple, 3);
@return ($h, $s, calc(#{$l} - #{$darken-by + 0%}));
}
@function css-lighten($hsl-tuple, $lighten-by) {
$h: list.nth($hsl-tuple, 1);
$s: list.nth($hsl-tuple, 2);
$l: list.nth($hsl-tuple, 3);
@return ($h, $s, calc(#{$l} + #{$lighten-by + 0%}));
}
@function css-saturate($hsl-tuple, $saturate-by) {
$h: list.nth($hsl-tuple, 1);
$s: list.nth($hsl-tuple, 2);
$l: list.nth($hsl-tuple, 3);
@return ($h, calc(#{$s} + #{$saturate-by + 0%}), $l);
}
@function css-desaturate($hsl-tuple, $desaturate-by) {
$h: list.nth($hsl-tuple, 1);
$s: list.nth($hsl-tuple, 2);
$l: list.nth($hsl-tuple, 3);
@return ($h, calc(#{$s} - #{$desaturate-by + 0%}), $l);
}
@function css-adjust-hue($hsl-tuple, $adjust-by) {
$h: list.nth($hsl-tuple, 1);
$s: list.nth($hsl-tuple, 2);
$l: list.nth($hsl-tuple, 3);
@return (calc(#{$h} + #{$adjust-by}), $s, $l);
}
@function css-transparentize($hsl-tuple, $alpha) {
$h: list.nth($hsl-tuple, 1);
$s: list.nth($hsl-tuple, 2);
$l: list.nth($hsl-tuple, 3);
@return ($h, $s, $l, $alpha);
}