mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Fix #3897: allow themes to style container borders
This commit is contained in:
parent
2200e7ba3f
commit
7d2c6322b3
|
|
@ -364,7 +364,7 @@ config.getAsync("modeindicator").then(mode => {
|
|||
statusIndicator.classList.add("TridactylInvisible")
|
||||
}
|
||||
|
||||
// Dynamically sets the border container color.
|
||||
// Expose the container color to themes.
|
||||
if (containerIndicator === "true") {
|
||||
webext
|
||||
.ownTabContainer()
|
||||
|
|
@ -372,11 +372,9 @@ config.getAsync("modeindicator").then(mode => {
|
|||
webext.browserBg.contextualIdentities.get(ownTab.cookieStoreId),
|
||||
)
|
||||
.then(container => {
|
||||
statusIndicator.setAttribute(
|
||||
"style",
|
||||
`border: ${
|
||||
container.colorCode
|
||||
} var(--tridactyl-indicator-border-style, solid) var(--tridactyl-indicator-border-width, 1.5px) !important`,
|
||||
statusIndicator.style.setProperty(
|
||||
"--tridactyl-container-color",
|
||||
container.colorCode,
|
||||
)
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,13 @@
|
|||
font-family: var(--tridactyl-status-font-family) !important;
|
||||
background: var(--tridactyl-status-bg) !important;
|
||||
color: var(--tridactyl-status-fg) !important;
|
||||
border: var(--tridactyl-status-border) !important;
|
||||
--tridactyl-container-border: var(--tridactyl-container-color)
|
||||
var(--tridactyl-indicator-border-style, solid)
|
||||
var(--tridactyl-indicator-border-width, 1.5px);
|
||||
border: var(
|
||||
--tridactyl-container-border,
|
||||
var(--tridactyl-status-border)
|
||||
) !important;
|
||||
border-radius: var(--tridactyl-status-border-radius) !important;
|
||||
font-size: var(--tridactyl-status-font-size) !important;
|
||||
padding: 0.25ex !important;
|
||||
|
|
|
|||
Loading…
Reference in a new issue