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:
Gazook89 committed 2026-07-09 14:13:22 -05:00
1 parent 794c2fa09d
commit 5d67d48436
2 files changed
+13 -8

No files matched your search

+13 -3
View File
@@ -1,10 +1,20 @@
@property --menuColor {
syntax: '<color>';
inherits: true;
initial-value: #DDD;
}
@property --activeTriggerColor {
syntax: '<color>';
inherits: true;
}
:root{
--menuColor : var(--menu-color, #DDD);
--activeTriggerColor : var(--activeTriggerColor);
}
.menu-list {
contain : content;
position : fixed;
z-index : 1000;
top : anchor(bottom);
left : anchor(left);
position-try: flip-inline flip-block;
@@ -18,5 +28,5 @@
}
}
.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;
}
}
.menu-list {
padding : 0px;
background-color : #DDDDDD;
}
}
.menu-item {