mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/settings: calculate item padding properly
This commit is contained in:
parent
a1913988d7
commit
3527131cd7
4 changed files with 8 additions and 5 deletions
|
@ -59,7 +59,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
transform: none;
|
transform: none;
|
||||||
padding: 9px 16px;
|
padding: calc(var(--switcher-padding) * 2) 16px;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -30,13 +30,14 @@
|
||||||
.switcher.big {
|
.switcher.big {
|
||||||
background: var(--button);
|
background: var(--button);
|
||||||
box-shadow: var(--button-box-shadow);
|
box-shadow: var(--button-box-shadow);
|
||||||
padding: var(--sidebar-inner-padding);
|
padding: var(--switcher-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.switcher.big :global(.button) {
|
.switcher.big :global(.button) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(40px - var(--sidebar-inner-padding) * 1.5);
|
/* [base button height] - ([switcher padding] * [padding factor to accommodate for]) */
|
||||||
border-radius: calc(var(--border-radius) - var(--sidebar-inner-padding));;
|
height: calc(40px - var(--switcher-padding) * 1.5);
|
||||||
|
border-radius: calc(var(--border-radius) - var(--switcher-padding));;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switcher.big :global(.button:not(:focus-visible)) {
|
.switcher.big :global(.button:not(:focus-visible)) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.toggle {
|
.toggle {
|
||||||
--base-size: 20px;
|
--base-size: 22px;
|
||||||
--ratio-factor: 0.9;
|
--ratio-factor: 0.9;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -57,6 +57,8 @@
|
||||||
--sidebar-font-size: 11px;
|
--sidebar-font-size: 11px;
|
||||||
--sidebar-inner-padding: 4px;
|
--sidebar-inner-padding: 4px;
|
||||||
|
|
||||||
|
--switcher-padding: var(--sidebar-inner-padding);
|
||||||
|
|
||||||
--sidebar-mobile-gradient: linear-gradient(
|
--sidebar-mobile-gradient: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
rgba(0, 0, 0, 0.9) 0%,
|
rgba(0, 0, 0, 0.9) 0%,
|
||||||
|
|
Loading…
Reference in a new issue