mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-11 10:54:46 +08:00
116 lines
3.4 KiB
CSS
116 lines
3.4 KiB
CSS
@layer base {
|
|
/* Element reset (Meyer, trimmed to what a LuCI view can emit). */
|
|
|
|
/* scroll-margin-top: an anchor jump must clear the sticky bar or it lands underneath it
|
|
* (WCAG 2.2 SC 2.4.11). The token, never a literal — the bar is 46px. */
|
|
*, *::before, *::after {
|
|
scroll-margin-top: var(--fs-bar-h);
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
abbr[title], acronym[title] {
|
|
border-bottom: 1px dotted;
|
|
font-weight: inherit;
|
|
cursor: help;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
/* `hidden` is how a VIEW says an element is not there, and the only way available to code that
|
|
* ships no stylesheet. The UA gives it `display: none` at the weakest possible strength, so any
|
|
* `display` a theme sets on a class beats it and the element paints anyway: measured here on
|
|
* `.tr` (table-row), `.td` (table-cell), `ul.nav > li` (block), `.cbi-page-actions` (flex) and
|
|
* `.ifacebox` (inline-flex).
|
|
*
|
|
* The flag is the point, not a workaround for a layer mistake: this must outrank every display
|
|
* in tokens/base/theme/page at once, including the id-specific ones in the page layer, and it
|
|
* has to keep doing so for rules not written yet. `until-found` is excluded
|
|
* because there `display: none` would break the find-in-page reveal the value exists for. */
|
|
[hidden]:not([hidden="until-found"]) { display: none !important; }
|
|
|
|
html {
|
|
font-size: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
/* :focus-visible, not :focus — the ring is for the keyboard, and the UA heuristic keeps it off a
|
|
* mouse click. A 1px dotted outline is near-invisible on a dark panel, and it was the only focus
|
|
* indicator generic links had. */
|
|
a:focus-visible {
|
|
outline: 2px solid var(--fs-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
sub, sup {
|
|
font-size: 75%;
|
|
line-height: 0;
|
|
position: relative;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
sup {
|
|
top: -.5em;
|
|
}
|
|
|
|
sub {
|
|
bottom: -.25em;
|
|
}
|
|
|
|
/* font-size: theme/60-inputs.css (the control-typography rule + `option`) — absorbed */
|
|
button,
|
|
input,
|
|
select,
|
|
option,
|
|
textarea {
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
button,
|
|
input[type="button"],
|
|
input[type="reset"],
|
|
input[type="submit"] {
|
|
cursor: pointer;
|
|
appearance: button;
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* disabled-opacity fade: 30-forms.css, same elements + pointer-events/cursor */
|
|
|
|
input[type="search"] {
|
|
appearance: textfield;
|
|
/* no box-sizing: content-box — it contradicts the universal border-box above, and the
|
|
* theme sizes fields by padding, so a search box comes out ~22px too wide */
|
|
}
|
|
|
|
input[type="search"]::-webkit-search-decoration {
|
|
appearance: none;
|
|
}
|
|
|
|
textarea {
|
|
overflow: auto;
|
|
vertical-align: top;
|
|
font-family: var(--fs-font-mono);
|
|
}
|
|
|
|
/* LuCI's .control-group is bootstrap's JOINED input-group: the trailing button pulled back over
|
|
* the input so their borders coincided, with its left corners squared to match. This theme does
|
|
* not join controls — every button takes the full token radius from a later layer, so the
|
|
* squared corners never apply while the pull-back still does and the button's rounded corner
|
|
* sits on the input's (issue #7). Separate controls with a real gap instead.
|
|
*
|
|
* The password reveal is the one group that IS joined, and theme/60-inputs.css builds that seam
|
|
* itself (one border around the group, `gap: 0`). */
|
|
.control-group {
|
|
display: inline-flex;
|
|
gap: var(--fs-space-2);
|
|
}
|
|
}
|