Dark mode for project list survey (#30619)

* feat: add dark mode for project list survey

* theming hover states on buttons

* feat: move theming to re-useable mixin

GitOrigin-RevId: ed85d050e908ae13d97ee8d67cf74e00c27fc258
This commit is contained in:
Jimmy Domagala-Tang
2026-01-13 12:36:40 -05:00
committed by Copybot
parent a204f30d0f
commit 69f3f29f50
3 changed files with 42 additions and 2 deletions

View File

@@ -75,6 +75,39 @@
);
}
// util for creating the base themes for each button, only usable when scoped to -themed available classes
// currently only primary and secondary buttons implemented
// todo: once all button types have matching light/dark designs, remove mixin and implement in buttons.scss
@mixin ol-button-themed($variant) {
// primary button remains the same in both dark and light
@if $variant == 'primary' {
@include ol-button-variant(
$color: var(--content-primary-dark),
$background: var(--bg-accent-01),
$hover-background: var(--bg-accent-02),
$hover-border: var(--bg-accent-02)
);
} @else if $variant == 'secondary' {
@include ol-button-variant(
$color: var(--content-primary-themed),
$background: var(--bg-primary-themed),
$border: var(--border-primary-themed),
$hover-background: var(--bg-secondary-themed),
$hover-border: var(--border-hover-themed),
$borderless: false
);
} @else {
@include ol-button-variant(
$color: var(--content-primary-themed),
$background: var(--bg-primary-themed),
$border: var(--border-primary-themed),
$hover-background: var(--bg-secondary-themed),
$hover-border: var(--border-hover-themed),
$borderless: false
);
}
}
@mixin reset-button() {
padding: 0;
cursor: pointer;

View File

@@ -1,4 +1,5 @@
/* ====== Semantic CSS color variables that adjust depending on the current theme ====== */
:root {
--editor-border-color: var(--neutral-80);
--bg-primary-themed: var(--bg-dark-primary);

View File

@@ -153,8 +153,8 @@ body {
}
.survey-notification {
background-color: var(--bg-light-secondary);
color: var(--content-secondary);
background-color: var(--bg-secondary-themed);
color: var(--content-secondary-themed);
box-shadow: none;
border-radius: var(--border-radius-large);
position: relative;
@@ -169,6 +169,12 @@ body {
color: inherit;
}
.notification-body {
.btn {
@include ol-button-themed('secondary');
}
}
p {
margin-bottom: var(--spacing-03);
}