Skip to content

Commit

Permalink
no more sass for colors
Browse files Browse the repository at this point in the history
  • Loading branch information
dakur committed Feb 13, 2025
1 parent bfa1a8d commit 797fd7b
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion frontend/src/styles/components/action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
color 200ms ease-in-out;
}
.action--primary:hover {
background-color: #{color.adjust(settings.$colors-emphasizing, $lightness: -10%)};
background-color: var(--hb-colors-emphasizing-darken);
color: inherit;
}
.action--primary:not(.action--lg) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/brontographics.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
transition: fill 200ms linear;
}
.brontographics__shape:hover {
fill: color.adjust(settings.$colors-emphasizing, $lightness: -10%);
fill: var(--hb-colors-emphasizing-darken);
}

.brontographics__label {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/styles/components/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
.button--secondary::after {
content: "";
background-color: color.adjust(settings.$colors-default-background, $alpha: -0.2);
background-color: color-mix(in srgb, var(--hb-colors-default-background) 80%, transparent);
width: 13em;
height: 13em;
position: absolute;
Expand All @@ -83,7 +83,7 @@
}
@media (settings.$buttons-secondary-breakpoint-centeredButton-from) {
.button--secondary::after {
background-color: color.adjust(settings.$colors-default-background, $alpha: -0.1);
background-color: color-mix(in srgb, var(--hb-colors-default-background) 90%, transparent);
width: 100%;
height: 100%;
top: 0;
Expand All @@ -110,7 +110,7 @@
}
.button--customization:hover,
.button--customization:active {
background-color: color.adjust(settings.$colors-tinge, $lightness: -10%);
background-color: var(--hb-colors-tinge-darken);
color: initial !important; // overwrite `.content a` style
}
.button--customization:active {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/styles/components/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.content {
padding: 0.5rlh 1rlh 2rlh;
color: color.adjust(settings.$colors-text, $alpha: -0.2);
color: color-mix(in srgb, var(--hb-colors-text) 80%, transparent);
}
@media (settings.$header-breakpoint-navigationHiddenToVisible-visible-from) {
.content {
Expand All @@ -16,7 +16,7 @@
padding-block-start: 2rlh;
}
.content a {
color: color.adjust(settings.$colors-text, $alpha: -0.2);
color: color-mix(in srgb, var(--hb-colors-text) 80%, transparent);
}
.content a:hover {
color: var(--hb-colors-emphasizing); // same as in defaults
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/eventLabels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
.eventLabels__item {
padding: 0.25rlh 0.5rlh calc(0.25rlh - 0.15em);
background-color: color.adjust(settings.$colors-default-background, $alpha: -0.1);
background-color: color-mix(in srgb, var(--hb-colors-default-background) 90%, transparent);
background-repeat: no-repeat;
border-radius: 2em;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/expandable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
background-color: transparent; // overwrite button style
}
.hb-expandable--expanded .hb-expandable__toggler:hover {
background-color: color.adjust(settings.$colors-tinge, $lightness: -10%);
background-color: var(--hb-colors-tinge-darken);
}
.hb-expandable--expanded .hb-expandable__toggler::after {
transform: rotate(180deg);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}
.footer__navigation .menu > .menu-item.current-menu-item > a:hover::before,
.footer__navigation .menu > .menu-item.active > a:hover::before {
background-color: color.adjust(settings.$colors-emphasizing, $lightness: -10%);
background-color: var(--hb-colors-emphasizing-darken);
}

.footer__bottom {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/styles/components/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
}
@media (settings.$header-breakpoint-navigationHiddenToVisible-visible-from) {
.header-mainNavigation .menu > .menu-item:is(.active, .current_page_item, .current-page-ancestor) > a:hover {
background-color: color.adjust(settings.$colors-emphasizing, $lightness: -10%);
background-color: var(--hb-colors-emphasizing-darken);
}
}
@media (settings.$header-breakpoint-navigationHiddenToVisible-visible-from) {
Expand Down Expand Up @@ -269,7 +269,7 @@
color: var(--hb-colors-default-background) !important;
}
.header-mainNavigation__languageLink--active:hover {
background-color: color.adjust(settings.$colors-emphasizing, $lightness: -10%);
background-color: var(--hb-colors-emphasizing-darken);
}
}
@media (settings.$header-breakpoint-navigationHiddenToVisible-visible-from) {
Expand Down Expand Up @@ -300,7 +300,7 @@
background-image: url("../../../images/icons/icon-datetime-white.svg");
}
.header__futureEventsLink--active:hover {
background-color: color.adjust(settings.$colors-emphasizing, $lightness: -10%);
background-color: var(--hb-colors-emphasizing-darken);
}

.header__searchBarToggler {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
transition: fill 100ms linear;
}
.icon:hover {
fill: color.adjust(settings.$colors-emphasizing, $lightness: -10%);
fill: var(--hb-colors-emphasizing-darken);
}
2 changes: 1 addition & 1 deletion frontend/src/styles/components/message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
max-width: max-content;
margin-inline: auto;
padding: 1rlh 2rlh;
background-color: color.adjust(settings.$colors-emphasizing, $alpha: -0.9);
background-color: color-mix(in srgb, var(--hb-colors-emphasizing) 10%, transparent);
border-radius: 2em;
text-align: center;
}
2 changes: 1 addition & 1 deletion frontend/src/styles/components/newsletter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use "../imports/settings";

.newsletter {
background-color: color.adjust(settings.$colors-tinge, $lightness: 3%);
background-color: var(--hb-colors-light-grey-background);
padding: 2rlh 1rlh;
text-align: center;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/presentationBox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
position: absolute;
inset-block-start: 0;
z-index: -1;
background-color: color.adjust(settings.$colors-tinge, $alpha: -0.1);
background-color: color-mix(in srgb, var(--hb-colors-tinge) 90%, transparent);
}
}
@include presentationBox-breakpoint-textOnSide-from() {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/components/related.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ aside .related-list-item:hover {

aside .related-list-item::before {
content: "";
background-color: color.adjust(settings.$colors-tinge, $alpha: -0.1);
background-color: color-mix(in srgb, var(--hb-colors-tinge) 90%, transparent);
position: absolute;
width: 100%;
height: 100%;
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/styles/imports/defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@


:root {
--hb-colors-default-background: #{settings.$colors-default-background};
--hb-colors-emphasizing: #{settings.$colors-emphasizing};
--hb-colors-default-background: #ffffff;
--hb-colors-light-grey-background: #f9faf9; /* tinge - lightness: 3% */
--hb-colors-emphasizing: #00a651;
--hb-colors-emphasizing-darken: #007338; /* lightness: -10% */
--hb-colors-framing: #b3b3b3;
--hb-colors-text: #{settings.$colors-text};
--hb-colors-tinge: #{settings.$colors-tinge};
--hb-colors-text: #000000;
--hb-colors-tinge: #f0f3f2;
--hb-colors-tinge-darken: #d4dcd9; /* lightness: -10% */
--hb-colors-links: #e6e6e6;
--hb-colors-error: #a60000;

Expand Down
5 changes: 0 additions & 5 deletions frontend/src/styles/imports/settings.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
$colors-default-background: #ffffff;
$colors-emphasizing: #00a651;
$colors-text: #000000;
$colors-tinge: #f0f3f2;

$typography-breakpoint: 60em;
$typography-breakpoint-small-until: "max-width: " + $typography-breakpoint;
$typography-breakpoint-large-from: "min-width: " + ($typography-breakpoint + 0.001);
Expand Down

0 comments on commit 797fd7b

Please sign in to comment.