Bug 1720880 - Consolidate a bit bookmarks popup styles. r=dao

Unify shared declarations, and avoid unneeded [placespopup=true], since
there's no element that matches:

  :is(#BMB_bookmarksPopup, #PlacesToolbar) menupopup:not([placespopup])

Depends on D120080

Differential Revision: https://phabricator.services.mozilla.com/D120197
This commit is contained in:
Emilio Cobos Álvarez 2021-07-20 09:20:42 +00:00
Родитель b3928f7e19
Коммит 4b802408a1
4 изменённых файлов: 13 добавлений и 24 удалений

Просмотреть файл

@ -27,9 +27,6 @@
}
#BMB_bookmarksPopup menupopup {
--panel-background: var(--arrowpanel-background);
--panel-color: var(--arrowpanel-color);
--panel-border-color: var(--arrowpanel-border-color);
margin-top: -9px; /* The top component of --panel-subview-body-padding and the 1px border */
}
@ -39,7 +36,7 @@
margin-top: -4px;
}
#PlacesToolbar menupopup[placespopup=true]::part(content) {
#PlacesToolbar menupopup::part(content) {
box-shadow: 0 0 4px hsla(0, 0%, 0%, 0.2);
background: var(--arrowpanel-background);
border: 1px solid var(--arrowpanel-border-color);

Просмотреть файл

@ -65,14 +65,6 @@ panelmultiview .toolbaritem-combined-buttons > spacer.before-label {
display: none;
}
#BMB_bookmarksPopup menupopup[placespopup=true] {
appearance: none;
background: transparent;
--panel-background: var(--arrowpanel-background);
--panel-border-color: var(--arrowpanel-border-color);
--panel-color: var(--arrowpanel-color);
}
/* Override OSX-specific toolkit styles for the bookmarks panel */
menu.subviewbutton > .menu-right {
margin-inline-end: -4px;

Просмотреть файл

@ -232,6 +232,11 @@ panelview .toolbaritem-combined-buttons,
}
#BMB_bookmarksPopup menupopup {
appearance: none;
background-color: transparent;
--panel-background: var(--arrowpanel-background);
--panel-color: var(--arrowpanel-color);
--panel-border-color: var(--arrowpanel-border-color);
--panel-border-radius: var(--arrowpanel-border-radius);
--panel-padding: var(--panel-subview-body-padding);
}

Просмотреть файл

@ -32,36 +32,31 @@
margin-top: -2px;
}
#PlacesToolbar menupopup[placespopup=true],
#BMB_bookmarksPopup menupopup[placespopup=true] {
#PlacesToolbar menupopup,
#BMB_bookmarksPopup menupopup {
appearance: none;
border: none;
padding-inline-start: 3px;
}
#BMB_bookmarksPopup menupopup[placespopup=true] {
background-color: transparent;
#BMB_bookmarksPopup menupopup {
-moz-window-shadow: none;
--panel-background: var(--arrowpanel-background);
--panel-color: var(--arrowpanel-color);
--panel-border-color: var(--arrowpanel-border-color);
margin-top: -13px; /* 8px of padding, 4px of shadow margin, 1px of border */
}
#PlacesToolbar menupopup[placespopup=true] {
#PlacesToolbar menupopup {
background: transparent;
padding-top: 4px;
margin-inline-start: -3px;
}
#BMB_bookmarksPopup menupopup[placespopup=true]::part(content) {
#BMB_bookmarksPopup menupopup::part(content) {
/* emulating MozPlacesPopupArrow but without the arrow */
box-shadow: var(--windows-panel-box-shadow);
margin: 4px;
}
#PlacesToolbar menupopup[placespopup=true]::part(content) {
#PlacesToolbar menupopup::part(content) {
box-shadow: 0 0 4px rgba(0,0,0,0.2);
background: var(--arrowpanel-background);
color: var(--arrowpanel-color);
@ -72,7 +67,7 @@
/* Add border-radius on Windows 7 */
@media (-moz-os-version: windows-win7) {
#BMB_bookmarksPopup menupopup[placespopup=true]::part(content) {
#BMB_bookmarksPopup menupopup::part(content) {
border-radius: 3.5px;
}
}