mobile-config-firefox/chrome/buttonlike_toolbarbuttons.css

84 lines
4 KiB
CSS
Raw Normal View History

2021-02-27 09:21:50 +00:00
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/buttonlike_toolbarbuttons.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* This style makes buttons look like real buttons with border and background. Color of border and background use the same colors as unselected urlbar to make them fit together. Changes are not applied to buttons in tabs toolbar or menubar. */
:root{
--uc-toolbarbutton-vertical-padding: var(--toolbarbutton-inner-padding);
2021-02-27 09:21:50 +00:00
--uc-toolbarbutton-horizontal-padding: calc(var(--toolbarbutton-inner-padding) + 10px);
--toolbarbutton-border-radius: 3px !important;
}
:root[uidensity="compact"]{
2021-02-27 09:21:50 +00:00
--uc-toolbarbutton-vertical-padding: calc(var(--toolbarbutton-inner-padding) - 1px);
--uc-toolbarbutton-horizontal-padding: calc(var(--toolbarbutton-inner-padding) + 6px);
}
#navigator-toolbox > .browser-toolbar{
--toolbarbutton-icon-fill: var(--toolbar-field-color);
}
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-1{
background-color: transparent !important;
}
2021-02-27 09:21:50 +00:00
/* size of buttons */
#PanelUI-button > toolbarbutton > stack,
findbar toolbarbutton,
2021-02-27 09:21:50 +00:00
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-1 > .toolbarbutton-icon,
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-1 > stack,
2021-02-27 09:21:50 +00:00
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-icon,
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > stack{
background-color: var(--toolbar-field-background-color, hsla(0,0%,100%,.8));
2021-02-27 09:21:50 +00:00
width: calc(2* var(--uc-toolbarbutton-horizontal-padding) + 16px) !important;
height: calc(2* var(--uc-toolbarbutton-vertical-padding) + 16px) !important;
fill-opacity: 0.8;
margin-inline: 2px;
}
findbar toolbarbutton{
padding-inline: var(--uc-toolbarbutton-horizontal-padding) !important;
height: revert !important;
margin-inline: 1px 0px !important;
border-width: 1px !important;
}
.findbar-closebutton{
margin-inline-end: 8px !important;
}
2021-02-27 09:21:50 +00:00
/* borders */
#PanelUI-button > toolbarbutton > stack,
findbar toolbarbutton,
2021-02-27 09:21:50 +00:00
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-1 > .toolbarbutton-icon,
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-icon{
border: 1px solid var(--toolbar-field-border-color, hsla(240,5%,5%,.55));
2021-02-27 09:21:50 +00:00
}
/* stacks use box-shadow as a border to prevent size from changing */
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-1 > stack,
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > stack{
box-shadow: inset 0 0 0 1px var(--toolbar-field-border-color, hsla(240,5%,5%,.55));
}
2021-02-27 09:21:50 +00:00
/* modify paddings within buttons */
#navigator-toolbox > toolbar .toolbarbutton-1 > stack,
#navigator-toolbox > toolbar .chromeclass-toolbar-additional > .toolbarbutton-icon,
#PersonalToolbar .chromeclass-toolbar-additional > .toolbarbutton-1 > .toolbarbutton-icon{
padding: var(--uc-toolbarbutton-vertical-padding) var(--uc-toolbarbutton-horizontal-padding) !important;
}
/* Buttons in bookmarks toolbar also require some extra styling rules */
#PersonalToolbar .chromeclass-toolbar-additional > .toolbarbutton-1 > .toolbarbutton-icon,
#PersonalToolbar .chromeclass-toolbar-additional > .toolbarbutton-icon,
#PersonalToolbar .chromeclass-toolbar-additional > stack{
background-color: var(--toolbar-field-background-color, hsla(0,0%,100%,.8)) !important;
2021-02-27 09:21:50 +00:00
}
#PersonalToolbar .chromeclass-toolbar-additional > .toolbarbutton-1:not([disabled]):hover > .toolbarbutton-icon,
#PersonalToolbar .chromeclass-toolbar-additional:not([disabled]):hover > .toolbarbutton-icon,
#PersonalToolbar .chromeclass-toolbar-additional:not([disabled]):hover > stack{
background-color: var(--toolbarbutton-hover-background) !important;
}
2021-02-27 09:21:50 +00:00
#PersonalToolbar .chromeclass-toolbar-additional > .toolbarbutton-1,
#PersonalToolbar .chromeclass-toolbar-additional{
padding: initial !important;
background: transparent !important;
}