From 6162ffb498388a8603ec33f9f485befd61e81963 Mon Sep 17 00:00:00 2001 From: Thomas JUND Date: Thu, 1 Jun 2023 11:54:31 +0200 Subject: [PATCH] scss: introduce $zebra-color (#78076) --- help/fr/misc-scss.page | 5 +++++ static/includes/_general.scss | 1 + static/includes/_misc.scss | 4 ++-- static/includes/_table.scss | 2 +- static/includes/wcs/_bulk.scss | 6 +++--- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/help/fr/misc-scss.page b/help/fr/misc-scss.page index 45840c57..daf24a93 100644 --- a/help/fr/misc-scss.page +++ b/help/fr/misc-scss.page @@ -151,6 +151,11 @@ paramètre, la deuxième sa description et la troisième la valeur par défaut.

Espace (« gouttière ») entre les éléments disposés en grille.

1rem

+ +

$zebra-color

+

Couleur d'arrière-plan par défaut des zebras

+

hsla(0, 0%, 0%, 0.06)

+ diff --git a/static/includes/_general.scss b/static/includes/_general.scss index 85a407f6..9e07c61d 100644 --- a/static/includes/_general.scss +++ b/static/includes/_general.scss @@ -9,6 +9,7 @@ $link-color: #028 !default; $link-decoration: none !default; $link-hover-decoration: underline !default; $body-background: white !default; +$zebra-color: hsla(0, 0%, 0%, 0.06) !default; html { font-family: $font-family; diff --git a/static/includes/_misc.scss b/static/includes/_misc.scss index 96d63384..a4383b43 100644 --- a/static/includes/_misc.scss +++ b/static/includes/_misc.scss @@ -537,7 +537,7 @@ div#user-files { } tbody tr.even { - background: #eee; + background: $zebra-color; } a.icon-remove, @@ -637,7 +637,7 @@ div.table-container { } table.shades tbody tr:nth-child(2n+1) { - background: #eee; + background: $zebra-color; } table.headers th { diff --git a/static/includes/_table.scss b/static/includes/_table.scss index c0220761..abc9e203 100644 --- a/static/includes/_table.scss +++ b/static/includes/_table.scss @@ -84,7 +84,7 @@ table.pk-data-table { .pk-table-zebra { &.pk-data-table, .pk-data-table { tbody tr:nth-child(2n+1) { - background: rgba(0, 0, 0, 0.065); + background: $zebra-color; } } } diff --git a/static/includes/wcs/_bulk.scss b/static/includes/wcs/_bulk.scss index 6d23163c..d02a6243 100644 --- a/static/includes/wcs/_bulk.scss +++ b/static/includes/wcs/_bulk.scss @@ -735,7 +735,7 @@ div.file-upload-widget { padding-bottom: 0.5rem; &:nth-child(even) { - background-color: rgba(0, 0, 0, 0.065); + background-color: $zebra-color; } } td { @@ -829,8 +829,8 @@ div.section.foldable { // childs when the first child is an error. .error ~ .BlockSubWidget:nth-child(odd), .BlockSubWidget:first-child ~ .BlockSubWidget:nth-child(even) { - background: hsla(0, 0%, 0%, 0.05); - box-shadow: -0.5em -0.5em 0 .5em hsla(0, 0%, 0%, 0.05); + background: $zebra-color; + box-shadow: -0.5em -0.5em 0 .5em $zebra-color; } }