From 5d67d48436c48d1f25959bda45083a71016eaefb Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 9 Jul 2026 14:13:22 -0500 Subject: [PATCH] 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. --- client/components/dropdown/dropdown.less | 16 +++++++++++++--- .../homebrew/editor/snippetbar/snippetbar.less | 5 ----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/client/components/dropdown/dropdown.less b/client/components/dropdown/dropdown.less index 0d6666f73..3fc491323 100644 --- a/client/components/dropdown/dropdown.less +++ b/client/components/dropdown/dropdown.less @@ -1,10 +1,20 @@ +@property --menuColor { + syntax: ''; + inherits: true; + initial-value: #DDD; +} + +@property --activeTriggerColor { + syntax: ''; + 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 } \ No newline at end of file diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index a004195e6..b2bf49011 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -150,11 +150,6 @@ display: none; } } - .menu-list { - padding : 0px; - background-color : #DDDDDD; - - } } .menu-item {