mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-09-20 16:42:58 +00:00
Add custom properties to dropdown.less
Adds registered custom properties to the dropdown menus, which can be set in another stylesheet at any level (either on the direct element or on an ancestor) or use the default values given.
This commit is contained in:
@@ -1,10 +1,20 @@
|
|||||||
|
@property --menuColor {
|
||||||
|
syntax: '<color>';
|
||||||
|
inherits: true;
|
||||||
|
initial-value: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property --activeTriggerColor {
|
||||||
|
syntax: '<color>';
|
||||||
|
inherits: true;
|
||||||
|
}
|
||||||
|
|
||||||
:root{
|
:root{
|
||||||
--menuColor : var(--menu-color, #DDD);
|
--activeTriggerColor : var(--activeTriggerColor);
|
||||||
}
|
}
|
||||||
.menu-list {
|
.menu-list {
|
||||||
contain : content;
|
contain : content;
|
||||||
position : fixed;
|
position : fixed;
|
||||||
z-index : 1000;
|
|
||||||
top : anchor(bottom);
|
top : anchor(bottom);
|
||||||
left : anchor(left);
|
left : anchor(left);
|
||||||
position-try: flip-inline flip-block;
|
position-try: flip-inline flip-block;
|
||||||
@@ -18,5 +28,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.menu-wrapper:has(:popover-open) > button { // if menu is open...
|
.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
|
background-color: var(--activeTriggerColor, hsl(from var(--menuColor) h s calc(l * .85))); // tint menu triggers based on menu color
|
||||||
}
|
}
|
||||||
@@ -150,11 +150,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.menu-list {
|
|
||||||
padding : 0px;
|
|
||||||
background-color : #DDDDDD;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
|
|||||||
Reference in New Issue
Block a user