git.iko.soy/rowtype-yoga/ry-blocks
on main help sign in
Add hover to flat button
commit5a6bf59c33c4ebc4333c0de6de5783d2d2ff628e authorMark Eibes <mark.eibes@gmail.com> dateSun 26 Jun 2022, 22:07 (4 years ago) parent85c9ecf
2 files changed+7
src/Yoga/Block/Atom/Button/Style.purs+4 src/Yoga/Block/Container/Style.purs+3
src/Yoga/Block/Atom/Button/Style.purs+4
@@ -64,6 +64,10 @@ button =
6464 { background: str "transparent"
6565 , boxShadow: none
6666 , color: str colour.highlight
67+ , "&:hover":
68+ nest
69+ { background: str colour.highlightAlpha10
70+ }
6771 , "&:active":
6872 nest
6973 { boxShadow: none
src/Yoga/Block/Container/Style.purs+3
@@ -255,6 +255,7 @@ defaultColours =
255255 , popperInnerBorder: (withAlpha 0.9 >>> darken 0.25 >>> desaturate 0.3) lightBg
256256 , popperOuterBorder: transparent
257257 , highlight
258+ , highlightAlpha10: highlightBase 0.10
258259 , highlightAlpha25: highlightBase 0.25
259260 , highlightAlpha50: highlightBase 0.50
260261 , highlightAlpha67: highlightBase 0.67
@@ -318,6 +319,7 @@ defaultColours =
318319 , popperInnerBorder: (withAlpha 0.9 >>> darken 0.7 >>> desaturate 0.3) lightBg
319320 , popperOuterBorder: darkBg
320321 , highlight: highlightDark
322+ , highlightAlpha10: highlightDarkBase 0.1
321323 , highlightAlpha25: highlightDarkBase 0.25
322324 , highlightAlpha50: highlightDarkBase 0.50
323325 , highlightAlpha67: highlightDarkBase 0.67
@@ -452,6 +454,7 @@ type FlatTheme a =
452454 , inputBorder ∷ a
453455 , link ∷ a
454456 , highlight ∷ a
457+ , highlightAlpha10 ∷ a
455458 , highlightAlpha25 ∷ a
456459 , highlightAlpha50 ∷ a
457460 , highlightAlpha67 ∷ a