Skip to content

Commit

Permalink
console: Add responsive colors
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaplots committed Nov 8, 2023
1 parent fb62388 commit c195f6c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/webui/styles/utilities/color.styl
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,29 @@

for $name in $c
generate-color-classes($name)

generate-responsive-color-class($width, $width-name, $color)
+media-query($width)
.{$width-name}\\:c-{$color}
color: convert('$c.' + $color)
.{$width-name}\\:c-hover-{$color}:hover
color: convert('$c.' + $color)
.{$width-name}\\:active-{$color}:active
color: convert('$c.' + $color)
.{$width-name}\\:c-focus-{$color}:focus
color: convert('$c.' + $color)

.{$width-name}\\:bg-{$color}
background-color: convert('$c.' + $color)
.{$width-name}\\:bg-hover-{$color}:hover
background-color: convert('$c.' + $color)
.{$width-name}\\:bg-active-{$color}:active
background-color: convert('$c.' + $color)
.{$width-name}\\:bg-focus-{$color}:focus
background-color: convert('$c.' + $color)
.{$width-name}\\:bg-none
background: none

for $name, $width in $bp
for $color in $c
generate-responsive-color-class($width, $name, $color)

0 comments on commit c195f6c

Please sign in to comment.