mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-09-23 14:02:58 +00:00
set a relative color on menu triggers when open
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
|
:root{
|
||||||
|
--menuColor : var(--menu-color, #DDD);
|
||||||
|
}
|
||||||
.menu-list {
|
.menu-list {
|
||||||
contain : content;
|
contain : content;
|
||||||
position : fixed;
|
position : fixed;
|
||||||
@@ -7,6 +9,7 @@
|
|||||||
left : anchor(left);
|
left : anchor(left);
|
||||||
position-try: flip-inline flip-block;
|
position-try: flip-inline flip-block;
|
||||||
color: inherit; // [popover] gets a `canvastext` color value from useragent.
|
color: inherit; // [popover] gets a `canvastext` color value from useragent.
|
||||||
|
background: var(--menuColor);
|
||||||
li > .menu-list {
|
li > .menu-list {
|
||||||
margin: 0 0px;
|
margin: 0 0px;
|
||||||
top : anchor(top);
|
top : anchor(top);
|
||||||
@@ -14,3 +17,6 @@
|
|||||||
position-try: flip-inline;
|
position-try: flip-inline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.menu-wrapper:has(:popover-open) > button { // if menu is open...
|
||||||
|
background-color: hsl(from var(--menuColor) h s calc(l * .85)); // tint menu triggers based on menu color
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user