Skip to content

Commit 85d7e88

Browse files
committed
natibe shit from nara
1 parent 20d8f36 commit 85d7e88

File tree

3 files changed

+121
-98
lines changed

3 files changed

+121
-98
lines changed

browser/themes/shared/customizableui/panelUI-shared.css

Lines changed: 91 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -244,91 +244,93 @@ panelview {
244244

245245
/* Tweaks for menupopups hanging off toolbar buttons to make them feel like panels */
246246

247-
.toolbar-menupopup {
248-
&,
249-
menupopup {
250-
appearance: none;
251-
border: none;
252-
font: menu;
253-
background-color: transparent;
254-
--panel-background: var(--arrowpanel-background);
255-
--panel-color: var(--arrowpanel-color);
256-
--panel-border-color: var(--arrowpanel-border-color);
257-
--panel-border-radius: var(--arrowpanel-border-radius);
258-
--panel-padding: var(--panel-subview-body-padding);
259-
}
260-
261-
menupopup {
262-
/* Align non top-level menupopup's first menuitem with the menuitem that opened it.
263-
* The 1px is for the menupopup's border. */
264-
margin-top: calc(-1 * (var(--panel-subview-body-padding-block) + var(--panel-shadow-margin) + 1px));
265-
}
266-
267-
:is(menu, menuitem) {
268-
&[disabled] {
269-
color: var(--panel-disabled-color);
247+
@media (-moz-bool-pref: "widget.non-native-theme.enabled") {
248+
.toolbar-menupopup {
249+
&,
250+
menupopup {
251+
appearance: none;
252+
border: none;
253+
font: menu;
254+
background-color: transparent;
255+
--panel-background: var(--arrowpanel-background);
256+
--panel-color: var(--arrowpanel-color);
257+
--panel-border-color: var(--arrowpanel-border-color);
258+
--panel-border-radius: var(--arrowpanel-border-radius);
259+
--panel-padding: var(--panel-subview-body-padding);
270260
}
271-
272-
&:not([disabled])[_moz-menuactive] {
273-
color: inherit;
274-
background-color: var(--panel-item-hover-bgcolor);
275-
276-
&:active {
261+
262+
menupopup {
263+
/* Align non top-level menupopup's first menuitem with the menuitem that opened it.
264+
* The 1px is for the menupopup's border. */
265+
margin-top: calc(-1 * (var(--panel-subview-body-padding-block) + var(--panel-shadow-margin) + 1px));
266+
}
267+
268+
:is(menu, menuitem) {
269+
&[disabled] {
270+
color: var(--panel-disabled-color);
271+
}
272+
273+
&:not([disabled])[_moz-menuactive] {
277274
color: inherit;
278-
background-color: var(--panel-item-active-bgcolor);
275+
background-color: var(--panel-item-hover-bgcolor);
276+
277+
&:active {
278+
color: inherit;
279+
background-color: var(--panel-item-active-bgcolor);
280+
}
281+
}
282+
283+
&::before,
284+
&::after {
285+
content: none; /* Reset's macOS' checkmark spacing */
279286
}
280287
}
281-
282-
&::before,
283-
&::after {
284-
content: none; /* Reset's macOS' checkmark spacing */
288+
289+
.menu-text,
290+
.menu-iconic-text,
291+
.menu-iconic-icon,
292+
.menu-iconic-left,
293+
.menu-iconic-accel,
294+
.menu-accel-container,
295+
.menu-accel,
296+
.menu-right {
297+
/* Reset every spacing and appearance set by the platforms' menu.css
298+
* and set the ones we need in the following rules. */
299+
margin: 0;
300+
padding: 0;
301+
appearance: none;
285302
}
286-
}
287-
288-
.menu-text,
289-
.menu-iconic-text,
290-
.menu-iconic-icon,
291-
.menu-iconic-left,
292-
.menu-iconic-accel,
293-
.menu-accel-container,
294-
.menu-accel,
295-
.menu-right {
296-
/* Reset every spacing and appearance set by the platforms' menu.css
297-
* and set the ones we need in the following rules. */
298-
margin: 0;
299-
padding: 0;
300-
appearance: none;
301-
}
302-
303-
:is(.menu-iconic, .menuitem-iconic) > .menu-iconic-left {
304-
margin-inline-end: 8px;
305-
}
306-
307-
:is(.menu-accel, .menu-iconic-accel) {
308-
margin-inline-start: 16px;
309-
310-
@media not (prefers-contrast) {
311-
menuitem:not([disabled]) > .menu-accel-container > & {
312-
color: var(--panel-disabled-color);
303+
304+
:is(.menu-iconic, .menuitem-iconic) > .menu-iconic-left {
305+
margin-inline-end: 8px;
306+
}
307+
308+
:is(.menu-accel, .menu-iconic-accel) {
309+
margin-inline-start: 16px;
310+
311+
@media not (prefers-contrast) {
312+
menuitem:not([disabled]) > .menu-accel-container > & {
313+
color: var(--panel-disabled-color);
314+
}
313315
}
314316
}
315-
}
316-
317-
menu > .menu-right {
318-
list-style-image: url(chrome://global/skin/icons/arrow-right.svg);
319-
-moz-context-properties: fill, fill-opacity;
320-
fill: currentColor;
321-
fill-opacity: 0.6;
322-
width: unset;
323-
height: unset;
324-
325-
&:-moz-locale-dir(rtl) {
326-
list-style-image: url(chrome://global/skin/icons/arrow-left.svg);
317+
318+
menu > .menu-right {
319+
list-style-image: url(chrome://global/skin/icons/arrow-right.svg);
320+
-moz-context-properties: fill, fill-opacity;
321+
fill: currentColor;
322+
fill-opacity: 0.6;
323+
width: unset;
324+
height: unset;
325+
326+
&:-moz-locale-dir(rtl) {
327+
list-style-image: url(chrome://global/skin/icons/arrow-left.svg);
328+
}
329+
}
330+
331+
menuseparator {
332+
padding: var(--panel-separator-margin);
327333
}
328-
}
329-
330-
menuseparator {
331-
padding: var(--panel-separator-margin);
332334
}
333335
}
334336

@@ -1008,7 +1010,6 @@ panelmultiview[mainViewId="PanelUI-fxa"] #PanelUI-remotetabs-syncnow {
10081010
display: none;
10091011
}
10101012

1011-
.toolbar-menupopup :is(menu, menuitem),
10121013
.subview-subheader,
10131014
panelview .toolbarbutton-1,
10141015
.subviewbutton,
@@ -1022,6 +1023,18 @@ panelview .toolbarbutton-1,
10221023
flex-shrink: 0;
10231024
}
10241025

1026+
@media (-moz-bool-pref: "widget.non-native-theme.enabled") {
1027+
.toolbar-menupopup :is(menu, menuitem) {
1028+
appearance: none;
1029+
margin: var(--arrowpanel-menuitem-margin);
1030+
min-height: 24px;
1031+
padding: var(--arrowpanel-menuitem-padding);
1032+
border-radius: var(--arrowpanel-menuitem-border-radius);
1033+
background-color: transparent;
1034+
flex-shrink: 0;
1035+
}
1036+
}
1037+
10251038
.subview-subheader {
10261039
font-size: 11px;
10271040
font-weight: inherit;

browser/themes/windows/customizableui/panelUI.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ menupopup::part(drop-indicator) {
1515
--nested-margin: calc(-1 * (var(--arrowpanel-menuitem-padding-inline) + var(--panel-shadow-margin)));
1616
}
1717

18-
@media not (-moz-windows-non-native-menus) {
19-
.toolbar-menupopup {
20-
--panel-shadow-margin: 4px;
21-
}
22-
23-
.toolbar-menupopup menupopup {
24-
margin-inline-start: var(--nested-margin);
18+
@media (-moz-bool-pref: "widget.non-native-theme.enabled") {
19+
@media not (-moz-windows-non-native-menus) {
20+
.toolbar-menupopup {
21+
--panel-shadow-margin: 4px;
22+
}
23+
24+
.toolbar-menupopup menupopup {
25+
margin-inline-start: var(--nested-margin);
26+
}
2527
}
2628
}

toolkit/content/xul.css

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -407,24 +407,32 @@ tooltip {
407407
}
408408

409409
@media (-moz-platform: windows) {
410-
tooltip {
411-
appearance: none;
412-
border: 1px solid;
410+
@media not (-moz-bool-pref: "widget.non-native-theme.enabled") {
411+
tooltip {
412+
color-scheme: light;
413+
}
413414
}
414415

415-
@media (-moz-windows-default-theme) {
416+
@media (-moz-bool-pref: "widget.non-native-theme.enabled") {
416417
tooltip {
417-
background-color: #f9f9fb;
418-
color: black;
419-
border-color: #67676c;
420-
border-radius: 4px;
418+
appearance: none;
419+
border: 1px solid;
421420
}
422-
423-
@media (prefers-color-scheme: dark) {
421+
422+
@media (-moz-windows-default-theme) {
424423
tooltip {
425-
background-color: #2b2a33;
426-
color: white;
427-
border-color: #f9f9fb;
424+
background-color: #f9f9fb;
425+
color: black;
426+
border-color: #67676c;
427+
border-radius: 4px;
428+
}
429+
430+
@media (prefers-color-scheme: dark) {
431+
tooltip {
432+
background-color: #2b2a33;
433+
color: white;
434+
border-color: #f9f9fb;
435+
}
428436
}
429437
}
430438
}

0 commit comments

Comments
 (0)