Skip to content

Commit

Permalink
feat(theme): move dark mode styles to standalones
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Feb 22, 2023
1 parent 619377f commit 45c3183
Show file tree
Hide file tree
Showing 58 changed files with 255 additions and 275 deletions.
2 changes: 2 additions & 0 deletions packages/theme/lib/Abstract.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.junipero.abstract
--text-color: var(--junipero-nevada)
4 changes: 0 additions & 4 deletions packages/theme/lib/Abstract.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@

&.invalid
color: var(--invalid-color)

// Dark mode
.dark .junipero.abstract
--text-color: var(--junipero-nevada)
20 changes: 20 additions & 0 deletions packages/theme/lib/Alert.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.junipero.alert
--icon-background-color: var(--junipero-dark-velvet-disabled)
--icons-color: var(--junipero-seashell)
--title-color: var(--junipero-seashell)

&.primary
--icon-background-color: var(--junipero-dark-velvet-foreground)
--title-color: var(--junipero-velvet)

&.success
--icon-background-color: var(--junipero-dark-lime-foreground)
--title-color: var(--junipero-lime)

&.warning
--icon-background-color: var(--junipero-dark-sunglow-foreground)
--title-color: var(--junipero-sunglow)

&.danger
--icon-background-color: var(--junipero-dark-grapefruit-foreground)
--title-color: var(--junipero-grapefruit)
22 changes: 0 additions & 22 deletions packages/theme/lib/Alert.sass
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,3 @@
--icon-background-color: var(--junipero-grapefruit-disabled)
--title-color: var(--junipero-grapefruit)
--icons-color: var(--junipero-grapefruit)

// Dark mode
.dark .junipero.alert
--icon-background-color: var(--junipero-dark-velvet-disabled)
--icons-color: var(--junipero-seashell)
--title-color: var(--junipero-seashell)

&.primary
--icon-background-color: var(--junipero-dark-velvet-foreground)
--title-color: var(--junipero-velvet)

&.success
--icon-background-color: var(--junipero-dark-lime-foreground)
--title-color: var(--junipero-lime)

&.warning
--icon-background-color: var(--junipero-dark-sunglow-foreground)
--title-color: var(--junipero-sunglow)

&.danger
--icon-background-color: var(--junipero-dark-grapefruit-foreground)
--title-color: var(--junipero-grapefruit)
15 changes: 15 additions & 0 deletions packages/theme/lib/Badge.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.junipero.badge
--background-color: var(--junipero-gondola)
--text-color: var(--junipero-seashell)

&.primary
--background-color: var(--junipero-velvet)

&.danger
--background-color: var(--junipero-grapefruit)

&.warning
--background-color: var(--junipero-sunglow)

&.success
--background-color: var(--junipero-lime)
17 changes: 0 additions & 17 deletions packages/theme/lib/Badge.sass
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,3 @@
&.success
--background-color: var(--junipero-lime)
--text-color: var(--junipero-seashell)

// Dark mode
.dark .junipero.badge
--background-color: var(--junipero-gondola)
--text-color: var(--junipero-seashell)

&.primary
--background-color: var(--junipero-velvet)

&.danger
--background-color: var(--junipero-grapefruit)

&.warning
--background-color: var(--junipero-sunglow)

&.success
--background-color: var(--junipero-lime)
2 changes: 2 additions & 0 deletions packages/theme/lib/BreadCrumb.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.junipero.breadcrumb
--separator-color: var(--junipero-nevada)
4 changes: 0 additions & 4 deletions packages/theme/lib/BreadCrumb.sass
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@
a.item
cursor: pointer
text-decoration: none

// Dark mode
.dark .junipero.breadcrumb
--separator-color: var(--junipero-nevada)
36 changes: 36 additions & 0 deletions packages/theme/lib/Button.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.junipero.button
--main-color: var(--junipero-gondola)
--hover-color: var(--junipero-dark-velvet-foreground)
--active-color: var(--junipero-dark-velvet-disabled)
--text-color: var(--junipero-seashell)

&.subtle
--main-color: transparent

&.primary
--main-color: var(--junipero-velvet)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-velvet-foreground)
--hover-color: var(--junipero-velvet-hover)
--active-color: var(--junipero-velvet-active)

&.warning
--main-color: var(--junipero-sunglow)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-sunglow-foreground)
--hover-color: var(--junipero-sunglow-hover)
--active-color: var(--junipero-sunglow-active)

&.danger
--main-color: var(--junipero-grapefruit)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-grapefruit-foreground)
--hover-color: var(--junipero-grapefruit-hover)
--active-color: var(--junipero-grapefruit-active)

&.success
--main-color: var(--junipero-lime)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-lime-foreground)
--hover-color: var(--junipero-lime-hover)
--active-color: var(--junipero-lime-active)
38 changes: 0 additions & 38 deletions packages/theme/lib/Button.sass
Original file line number Diff line number Diff line change
Expand Up @@ -70,41 +70,3 @@
.junipero.spinner
--foreground-color: var(--main-color)
--background-color: var(--text-color)

// Dark mode
.dark .junipero.button
--main-color: var(--junipero-gondola)
--hover-color: var(--junipero-dark-velvet-foreground)
--active-color: var(--junipero-dark-velvet-disabled)
--text-color: var(--junipero-seashell)

&.subtle
--main-color: transparent

&.primary
--main-color: var(--junipero-velvet)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-velvet-foreground)
--hover-color: var(--junipero-velvet-hover)
--active-color: var(--junipero-velvet-active)

&.warning
--main-color: var(--junipero-sunglow)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-sunglow-foreground)
--hover-color: var(--junipero-sunglow-hover)
--active-color: var(--junipero-sunglow-active)

&.danger
--main-color: var(--junipero-grapefruit)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-grapefruit-foreground)
--hover-color: var(--junipero-grapefruit-hover)
--active-color: var(--junipero-grapefruit-active)

&.success
--main-color: var(--junipero-lime)
--text-color: var(--junipero-seashell)
--border-color: var(--junipero-dark-lime-foreground)
--hover-color: var(--junipero-lime-hover)
--active-color: var(--junipero-lime-active)
8 changes: 8 additions & 0 deletions packages/theme/lib/Calendar.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.junipero.calendar
--main-color: var(--junipero-velvet)
--icons-color: var(--junipero-seashell)
--text-color: var(--junipero-seashell)
--inactive-text-color: var(--junipero-concrete)
--selected-text-color: var(--junipero-seashell)
--hover-color: var(--junipero-dark-velvet-foreground)
--secondary-text-color: var(--junipero-velvet)
10 changes: 0 additions & 10 deletions packages/theme/lib/Calendar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,3 @@

&.active
background: var(--main-color)

// Dark mode
.dark .junipero.calendar
--main-color: var(--junipero-velvet)
--icons-color: var(--junipero-seashell)
--text-color: var(--junipero-seashell)
--inactive-text-color: var(--junipero-concrete)
--selected-text-color: var(--junipero-seashell)
--hover-color: var(--junipero-dark-velvet-foreground)
--secondary-text-color: var(--junipero-velvet)
3 changes: 3 additions & 0 deletions packages/theme/lib/Card.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.junipero.card
--background-color: var(--junipero-gondola)
--shadow-color: transparent
5 changes: 0 additions & 5 deletions packages/theme/lib/Card.sass
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,3 @@

.junipero.list
width: 100%

// Dark mode
.dark .junipero.card
--background-color: var(--junipero-gondola)
--shadow-color: transparent
8 changes: 8 additions & 0 deletions packages/theme/lib/CheckboxField.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.junipero.checkbox-field
--icons-color: var(--junipero-seashell)
--main-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-gondola)
--hover-color: var(--junipero-dark-velvet-background)
--active-color: var(--junipero-dark-velvet-disabled)
--invalid-color: var(--junipero-grapefruit)
10 changes: 0 additions & 10 deletions packages/theme/lib/CheckboxField.sass
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,3 @@
.content
flex: 1 0 auto
max-width: 100%

// Dark mode
.dark .junipero.checkbox-field
--icons-color: var(--junipero-seashell)
--main-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-gondola)
--hover-color: var(--junipero-dark-velvet-background)
--active-color: var(--junipero-dark-velvet-disabled)
--invalid-color: var(--junipero-grapefruit)
3 changes: 3 additions & 0 deletions packages/theme/lib/CodeField.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.junipero.code-field
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-onyx)
5 changes: 0 additions & 5 deletions packages/theme/lib/CodeField.sass
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,3 @@
&:not(:focus),
&:not(:focus-within)
--border-color: var(--invalid-color)

// Dark mode
.dark .junipero.code-field
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-onyx)
2 changes: 2 additions & 0 deletions packages/theme/lib/ColorField.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.junipero.color-field
--pigment-border-color: var(--junipero-dark-velvet-foreground)
4 changes: 0 additions & 4 deletions packages/theme/lib/ColorField.sass
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,3 @@
position: relative
left: -4px
box-shadow: 0 2px 7px 1px rgb(0 0 0 / 15%)

// Dark mode
.dark .junipero.color-field
--pigment-border-color: var(--junipero-dark-velvet-foreground)
9 changes: 9 additions & 0 deletions packages/theme/lib/DateField.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.junipero.date-field,
.junipero.calendar-menu
--main-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-foreground)
--icons-color: var(--junipero-dark-velvet-foreground)
--placeholder-color: var(--junipero-nevada)
--text-color: var(--junipero-seashell)
--time-background-color: var(--junipero-dark-velvet-background)
--time-placeholder-color: var(--junipero-concrete)
12 changes: 0 additions & 12 deletions packages/theme/lib/DateField.sass
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,3 @@
color: var(--time-placeholder-color)
opacity: 1
user-select: none

// Dark mode
.dark
.junipero.date-field,
.junipero.calendar-menu
--main-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-foreground)
--icons-color: var(--junipero-dark-velvet-foreground)
--placeholder-color: var(--junipero-nevada)
--text-color: var(--junipero-seashell)
--time-background-color: var(--junipero-dark-velvet-background)
--time-placeholder-color: var(--junipero-concrete)
8 changes: 8 additions & 0 deletions packages/theme/lib/Dropdown.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.junipero.dropdown .menu-inner,
.junipero.dropdown-menu .menu-inner
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-gondola)
--secondary-color: var(--junipero-velvet)
--item-background: var(--junipero-dark-velvet-background)
--main-color: var(--junipero-seashell)
--shadow-color: transparent
11 changes: 0 additions & 11 deletions packages/theme/lib/Dropdown.sass
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,3 @@
& > .dropdown-link
background: var(--item-background)
color: var(--main-color)

// Dark mode
.dark
.junipero.dropdown .menu-inner,
.junipero.dropdown-menu .menu-inner
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-gondola)
--secondary-color: var(--junipero-velvet)
--item-background: var(--junipero-dark-velvet-background)
--main-color: var(--junipero-seashell)
--shadow-color: transparent
4 changes: 4 additions & 0 deletions packages/theme/lib/FieldAddon.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.junipero.field-addon
--background-color: var(--junipero-dark-velvet-foreground)
--text-color: var(--junipero-seashell)
--focus-text-color: var(--junipero-seashell)
6 changes: 0 additions & 6 deletions packages/theme/lib/FieldAddon.sass
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,3 @@
background: var(--main-color)
color: var(--focus-text-color)
box-shadow: 0 0 0 2px var(--main-color)

// Dark mode
.dark .junipero.field-addon
--background-color: var(--junipero-dark-velvet-foreground)
--text-color: var(--junipero-seashell)
--focus-text-color: var(--junipero-seashell)
2 changes: 2 additions & 0 deletions packages/theme/lib/Label.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.junipero.label
--text-color: var(--junipero-nevada)
4 changes: 0 additions & 4 deletions packages/theme/lib/Label.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@

&.invalid
--text-color: var(--invalid-color)

// Dark mode
.dark .junipero.label
--text-color: var(--junipero-nevada)
4 changes: 4 additions & 0 deletions packages/theme/lib/List.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.junipero.list
--column-color: var(--junipero-velvet)
--icons-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-background)
6 changes: 0 additions & 6 deletions packages/theme/lib/List.sass
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@
display: flex
align-items: center
gap: 4px

// Dark mode
.dark .junipero.list
--column-color: var(--junipero-velvet)
--icons-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-background)
8 changes: 8 additions & 0 deletions packages/theme/lib/Modal.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.junipero.modal
--background-color: var(--junipero-dark-backdrop)
--transition-background-exit: var(--junipero-dark-backdrop-invisible)
--transition-background-enter: var(--junipero-dark-backdrop)
--shadow-color: transparent
--foreground-color: var(--junipero-gondola)
--border-color: var(--junipero-dark-velvet-foreground)
--icons-color: var(--junipero-seashell)
10 changes: 0 additions & 10 deletions packages/theme/lib/Modal.sass
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,3 @@
overflow: auto
margin: 0
border-radius: 0

// Dark mode
.dark .junipero.modal
--background-color: var(--junipero-dark-backdrop)
--transition-background-exit: var(--junipero-dark-backdrop-invisible)
--transition-background-enter: var(--junipero-dark-backdrop)
--shadow-color: transparent
--foreground-color: var(--junipero-gondola)
--border-color: var(--junipero-dark-velvet-foreground)
--icons-color: var(--junipero-seashell)
7 changes: 7 additions & 0 deletions packages/theme/lib/RadioField.dark.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.junipero.radio-field
--main-color: var(--junipero-velvet)
--border-color: var(--junipero-dark-velvet-foreground)
--background-color: var(--junipero-gondola)
--hover-color: var(--junipero-dark-velvet-background)
--active-color: var(--junipero-dark-velvet-disabled)
--boxed-border-color: var(--junipero-dark-velvet-background)
Loading

0 comments on commit 45c3183

Please sign in to comment.