frontend: one scale for z-index, corner radius and the floating-box shadow
z-index ran through eleven values (1 to 1100), border-radius through about twenty and floating boxes had six different shadows, with no names, so each new box picked its own. theme.css now defines --z-bar, --z-popover, --z-skip, --z-modal, --z-toast, --radius-sm, --radius-md, --radius-pill and --shadow-pop, and every stylesheet and the toast host use them. Corners and shadows move by a pixel or two at most; the stacking order is unchanged. css-vars.md lists them.
This commit is contained in:
parent
0876ff4de8
commit
c205c6115b
2 changed files with 143 additions and 109 deletions
|
|
@ -25,7 +25,7 @@
|
|||
position: absolute;
|
||||
top: calc(100% + 0.4em);
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
z-index: var(--z-popover);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4em;
|
||||
|
|
@ -34,9 +34,9 @@
|
|||
padding: 0.4em;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5em;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-elev);
|
||||
box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.3);
|
||||
box-shadow: var(--shadow-pop);
|
||||
}
|
||||
.alerts-menu-list {
|
||||
display: flex;
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
gap: 0.1em 0.6em;
|
||||
padding: 0.4em 0.6em;
|
||||
border-left: 3px solid var(--red);
|
||||
border-radius: 0.35em;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.alerts-menu-name {
|
||||
font-weight: 600;
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
align-items: center;
|
||||
min-height: 2.75em;
|
||||
padding: 0.4em 0.6em;
|
||||
border-radius: 0.35em;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.alerts-menu-link:hover {
|
||||
background: var(--bg);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
align-items: center;
|
||||
gap: 0.25em;
|
||||
padding: 0.2em 0.4em 0.2em 0.7em;
|
||||
border-radius: 0.3em;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue