diff --git a/client/components/codeEditor/codeEditor.jsx b/client/components/codeEditor/codeEditor.jsx index c5cf669bd..25bf4f88e 100644 --- a/client/components/codeEditor/codeEditor.jsx +++ b/client/components/codeEditor/codeEditor.jsx @@ -308,7 +308,7 @@ const CodeEditor = forwardRef( view.dispatch({ effects : themeCompartment.reconfigure(themeExtension), }); - }, [editorTheme]); + }, [editorTheme, tab]); useEffect(()=>{ //rebuild syntax highlight when changing tab or renderer diff --git a/client/components/dropdown/dropdown.jsx b/client/components/dropdown/dropdown.jsx index 0848f3fdd..b6ea37d13 100644 --- a/client/components/dropdown/dropdown.jsx +++ b/client/components/dropdown/dropdown.jsx @@ -92,12 +92,13 @@ const Dropdown = ({ groupName, className = null, icon, children, color = null, c }; return ( -
+
  • + ); }; diff --git a/client/components/dropdown/dropdown.less b/client/components/dropdown/dropdown.less index 28a26954c..8148a7c85 100644 --- a/client/components/dropdown/dropdown.less +++ b/client/components/dropdown/dropdown.less @@ -1,24 +1,33 @@ -.menu-wrapper { - position: relative; - &:is(.menu-bar > .menu-section > .menu-wrapper){ - display: inline-block; - } +@property --menuColor { + syntax: ''; + inherits: true; + initial-value: #DDD; } +@property --activeTriggerColor { + syntax: ''; + inherits: true; + initial-value: #DDD; +} + +:root{ + --activeTriggerColor : var(--activeTriggerColor); +} .menu-list { + contain : content; position : fixed; - z-index : 1000; top : anchor(bottom); left : anchor(left); position-try: flip-inline flip-block; color: inherit; // [popover] gets a `canvastext` color value from useragent. - > .menu-wrapper { - position:relative; - > .menu-list { + background: var(--menuColor); + li > .menu-list { margin: 0 0px; top : anchor(top); left : anchor(right); position-try: flip-inline; } - } +} +.menu-wrapper:has(:popover-open) > button { // if menu is open... + 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/brewRenderer/safeHTML.js b/client/homebrew/brewRenderer/safeHTML.js index d9438b663..ca2e59d5f 100644 --- a/client/homebrew/brewRenderer/safeHTML.js +++ b/client/homebrew/brewRenderer/safeHTML.js @@ -32,12 +32,12 @@ function safeHTML(htmlString) { return; } // Check remaining elements for blacklisted attributes - for (const attribute of element.attributes){ + [...element.attributes].forEach((attribute)=>{ if(blacklistAttrs.some((test)=>{return test(attribute);})) { - element.removeAttribute(attribute.localName); - break; + element.removeAttribute(attribute.name); + return; }; - }; + }); }); return div.innerHTML; diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 16c89ea59..0f158e0e6 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -99,11 +99,16 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa return (