@skerbis/nativecss 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/LICENSE +28 -0
- package/README.md +145 -2
- package/dist/base.css +225 -0
- package/dist/browser-fixes.css +32 -0
- package/dist/colors.css +288 -0
- package/dist/components/accordion-split.css +269 -0
- package/dist/components/alert.css +179 -0
- package/dist/components/app-shell.css +266 -0
- package/dist/components/audio-player.css +697 -0
- package/dist/components/audio.css +35 -0
- package/dist/components/aurora.css +132 -0
- package/dist/components/avatar.css +102 -0
- package/dist/components/back-to-top.css +120 -0
- package/dist/components/backdrop.css +94 -0
- package/dist/components/badge.css +95 -0
- package/dist/components/breadcrumb.css +58 -0
- package/dist/components/card.css +721 -0
- package/dist/components/code-block.css +234 -0
- package/dist/components/combobox.css +103 -0
- package/dist/components/command-palette.css +351 -0
- package/dist/components/comments.css +243 -0
- package/dist/components/compare.css +218 -0
- package/dist/components/count-up.css +140 -0
- package/dist/components/countdown.css +74 -0
- package/dist/components/cover.css +45 -0
- package/dist/components/curtain.css +116 -0
- package/dist/components/dialog-close.css +44 -0
- package/dist/components/disclosure.css +37 -0
- package/dist/components/downloads.css +47 -0
- package/dist/components/dropdown.css +260 -0
- package/dist/components/dropzone.css +181 -0
- package/dist/components/effects.css +236 -0
- package/dist/components/empty-state.css +74 -0
- package/dist/components/events.css +165 -0
- package/dist/components/expand-panels.css +220 -0
- package/dist/components/filter.css +179 -0
- package/dist/components/floating-label.css +69 -0
- package/dist/components/footer.css +56 -0
- package/dist/components/hero.css +139 -0
- package/dist/components/hovercard.css +146 -0
- package/dist/components/input-group.css +67 -0
- package/dist/components/kbd.css +44 -0
- package/dist/components/leaders.css +99 -0
- package/dist/components/lightbox.css +165 -0
- package/dist/components/lists.css +221 -0
- package/dist/components/livesearch.css +106 -0
- package/dist/components/map.css +245 -0
- package/dist/components/marginnote.css +109 -0
- package/dist/components/marquee.css +119 -0
- package/dist/components/modal.css +385 -0
- package/dist/components/morph.css +317 -0
- package/dist/components/nav-drilldown.css +190 -0
- package/dist/components/nav-priority.css +157 -0
- package/dist/components/nav.css +600 -0
- package/dist/components/notification.css +290 -0
- package/dist/components/off-canvas.css +107 -0
- package/dist/components/overlay.css +122 -0
- package/dist/components/pagination.css +139 -0
- package/dist/components/pill-group.css +143 -0
- package/dist/components/placeholder.css +28 -0
- package/dist/components/preferences-fonts.css +65 -0
- package/dist/components/preferences.css +283 -0
- package/dist/components/pricing.css +220 -0
- package/dist/components/rating.css +121 -0
- package/dist/components/reveal-pin.css +165 -0
- package/dist/components/roadmap.css +173 -0
- package/dist/components/scroll-frames.css +97 -0
- package/dist/components/scroll-horizontal.css +141 -0
- package/dist/components/scroll-progress.css +63 -0
- package/dist/components/scroll-stack.css +363 -0
- package/dist/components/scroll-video.css +172 -0
- package/dist/components/scrolly.css +190 -0
- package/dist/components/search.css +52 -0
- package/dist/components/segmented.css +209 -0
- package/dist/components/select.css +186 -0
- package/dist/components/slideshow.css +441 -0
- package/dist/components/sortable.css +186 -0
- package/dist/components/sparkline.css +50 -0
- package/dist/components/spinner.css +50 -0
- package/dist/components/split.css +85 -0
- package/dist/components/spotlight.css +111 -0
- package/dist/components/stat.css +82 -0
- package/dist/components/stepper.css +217 -0
- package/dist/components/subnav.css +151 -0
- package/dist/components/table-sort.css +111 -0
- package/dist/components/tabs.css +304 -0
- package/dist/components/tag.css +130 -0
- package/dist/components/testimonial.css +188 -0
- package/dist/components/text-reveal.css +141 -0
- package/dist/components/theme-toggle.css +62 -0
- package/dist/components/tile.css +53 -0
- package/dist/components/timeline.css +211 -0
- package/dist/components/toolbar.css +139 -0
- package/dist/components/tooltip.css +89 -0
- package/dist/components/topbar.css +92 -0
- package/dist/components/video-bg.css +176 -0
- package/dist/components/video-card.css +145 -0
- package/dist/components/video-float.css +142 -0
- package/dist/components/video-player.css +1116 -0
- package/dist/components/video-text.css +91 -0
- package/dist/components/video.css +65 -0
- package/dist/fonts/README.md +29 -0
- package/dist/fonts/atkinson-hyperlegible-next/OFL.txt +93 -0
- package/dist/fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next.woff2 +0 -0
- package/dist/fonts/lexend/OFL.txt +93 -0
- package/dist/fonts/lexend/lexend.woff2 +0 -0
- package/dist/fonts/opendyslexic/OFL.txt +94 -0
- package/dist/fonts/opendyslexic/OpenDyslexic-Bold.woff2 +0 -0
- package/dist/fonts/opendyslexic/OpenDyslexic-Regular.woff2 +0 -0
- package/dist/helpers/a11y.css +71 -0
- package/dist/helpers/animations.css +206 -0
- package/dist/helpers/elevation.css +87 -0
- package/dist/helpers/float.css +135 -0
- package/dist/helpers/forms.css +503 -0
- package/dist/helpers/icons.css +130 -0
- package/dist/helpers/layout.css +549 -0
- package/dist/helpers/media.css +77 -0
- package/dist/helpers/reveal.css +172 -0
- package/dist/helpers/scroll-shadow.css +129 -0
- package/dist/helpers/scroll.css +163 -0
- package/dist/helpers/surfaces.css +87 -0
- package/dist/helpers/tables.css +85 -0
- package/dist/helpers/typography.css +347 -0
- package/dist/helpers/visibility.css +134 -0
- package/dist/integrations/fontawesome-font-display-fix.css +67 -0
- package/dist/integrations/webawesome-bridge.css +195 -0
- package/dist/js/audio-player.js +942 -0
- package/dist/js/backdrop.js +119 -0
- package/dist/js/code-block.js +238 -0
- package/dist/js/combobox.js +382 -0
- package/dist/js/command-fallback.js +35 -0
- package/dist/js/command-palette.js +477 -0
- package/dist/js/compare.js +73 -0
- package/dist/js/content-observer.js +82 -0
- package/dist/js/count-up.js +150 -0
- package/dist/js/countdown.js +185 -0
- package/dist/js/dialog-light-dismiss.js +123 -0
- package/dist/js/dismiss.js +144 -0
- package/dist/js/downloads.js +181 -0
- package/dist/js/dropdown.js +300 -0
- package/dist/js/dropzone.js +304 -0
- package/dist/js/events.js +501 -0
- package/dist/js/filter.js +177 -0
- package/dist/js/hero-video-motion.js +37 -0
- package/dist/js/hide-on-scroll-fallback.js +102 -0
- package/dist/js/hovercard.js +228 -0
- package/dist/js/icon.js +166 -0
- package/dist/js/ics.js +290 -0
- package/dist/js/lightbox.js +144 -0
- package/dist/js/livesearch.js +253 -0
- package/dist/js/map.js +625 -0
- package/dist/js/marquee.js +108 -0
- package/dist/js/modal-router.js +298 -0
- package/dist/js/nav-drilldown.js +250 -0
- package/dist/js/nav-priority.js +221 -0
- package/dist/js/nav.js +242 -0
- package/dist/js/ncss-container.js +117 -0
- package/dist/js/notification.js +372 -0
- package/dist/js/page-transitions-quiet.js +44 -0
- package/dist/js/preferences-early.js +51 -0
- package/dist/js/preferences.js +346 -0
- package/dist/js/reveal.js +79 -0
- package/dist/js/scroll-frames.js +284 -0
- package/dist/js/scroll-horizontal.js +121 -0
- package/dist/js/scroll-stack-fallback.js +250 -0
- package/dist/js/scroll-video.js +332 -0
- package/dist/js/scrolly.js +109 -0
- package/dist/js/slideshow.js +416 -0
- package/dist/js/sortable.js +530 -0
- package/dist/js/sparkline.js +199 -0
- package/dist/js/spotlight.js +104 -0
- package/dist/js/subnav.js +163 -0
- package/dist/js/table-sort.js +312 -0
- package/dist/js/tabs.js +243 -0
- package/dist/js/text-reveal.js +108 -0
- package/dist/js/theme-toggle-early.js +28 -0
- package/dist/js/theme-toggle.js +135 -0
- package/dist/js/toolbar.js +130 -0
- package/dist/js/tooltip.js +214 -0
- package/dist/js/video-bg.js +193 -0
- package/dist/js/video-card.js +80 -0
- package/dist/js/video-float.js +119 -0
- package/dist/js/video-player.js +1267 -0
- package/dist/js/view-transitions.js +118 -0
- package/dist/js/wa-close-on-scroll.js +56 -0
- package/dist/ncss.css +165 -0
- package/dist/page-transitions.css +150 -0
- package/dist/reset.css +196 -0
- package/dist/theme.css +112 -0
- package/dist/tokens.css +238 -0
- package/package.json +52 -4
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Benachrichtigungen / Toasts (Layer "components"): <ncss-toast-region> ist der
|
|
3
|
+
* feste Bereich am Bildschirmrand, .ncss-notification eine einzelne Meldung. Statusfarben,
|
|
4
|
+
* sechs Positionen, Auto-Schließen mit Pause bei Hover/Fokus, Schließen-Button, Ansage per
|
|
5
|
+
* aria-live. Optional gestapelt ("Sonner-Stil", Attribut stack): ältere Meldungen liegen
|
|
6
|
+
* als Stapel hinter der neuesten und fächern sich bei Hover/Fokus auf.
|
|
7
|
+
*
|
|
8
|
+
* Meist per Script erzeugt (js/notification.js):
|
|
9
|
+
* ncss.notify("Gespeichert", { status: "success" });
|
|
10
|
+
* ncss.notify("Upload fehlgeschlagen", { status: "danger", timeout: 0 });
|
|
11
|
+
* <button type="button" data-ncss-notify="Gespeichert" data-status="success">...</button>
|
|
12
|
+
* Die Region entsteht dabei automatisch (eine pro Position). Selbst im Markup gesetzt -
|
|
13
|
+
* z.B. für serverseitige Hinweise nach einem Formular-Absenden:
|
|
14
|
+
* <ncss-toast-region position="top-end" stack>
|
|
15
|
+
* <div class="ncss-notification ncss-notification--success" data-timeout="6000">
|
|
16
|
+
* <p class="ncss-notification-title">Gespeichert</p>
|
|
17
|
+
* <p>Deine Änderungen sind online.</p>
|
|
18
|
+
* </div>
|
|
19
|
+
* </ncss-toast-region>
|
|
20
|
+
* Ohne JS bleibt so eine Meldung einfach sichtbar stehen (kein Schließen, kein Timer).
|
|
21
|
+
*
|
|
22
|
+
* Positionen (Attribut position): top-start, top-center, top-end (Default), bottom-start,
|
|
23
|
+
* bottom-center, bottom-end - logisch (start/end), in RTL also gespiegelt.
|
|
24
|
+
* Status: .ncss-notification--brand/--success/--warning/--danger (farbiger Akzentstreifen
|
|
25
|
+
* + Symbolfarbe aus der jeweiligen Familie, Text bleibt --ncss-color-text).
|
|
26
|
+
*
|
|
27
|
+
* Top Layer: das Script macht die Region zu einem popover="manual" - Meldungen erscheinen
|
|
28
|
+
* damit auch ÜBER einem offenen modalen <dialog>, ohne z-index.
|
|
29
|
+
*
|
|
30
|
+
* Abhängigkeiten (Cherry-Picking): nur tokens.css/colors.css (+ reset/base); das
|
|
31
|
+
* Schließen-Symbol ist eine eigene Maske, keine Abhängigkeit von helpers/icons.css.
|
|
32
|
+
*
|
|
33
|
+
* Tokens: --ncss-notification-width (Default 24rem), --ncss-notification-offset (Abstand
|
|
34
|
+
* zum Rand, Default --ncss-space-sm), --ncss-notification-gap (Default --ncss-space-2xs),
|
|
35
|
+
* --ncss-toast-peek (sichtbare Kante gestapelter Meldungen, Default 0.75rem).
|
|
36
|
+
*/
|
|
37
|
+
ncss-toast-region {
|
|
38
|
+
--ncss-notification-width: 24rem;
|
|
39
|
+
--ncss-notification-offset: var(--ncss-space-sm);
|
|
40
|
+
--ncss-notification-gap: var(--ncss-space-2xs);
|
|
41
|
+
--ncss-toast-peek: 0.75rem;
|
|
42
|
+
--ncss-toast-dir: 1;
|
|
43
|
+
position: fixed;
|
|
44
|
+
inset: var(--ncss-notification-offset) var(--ncss-notification-offset) auto auto;
|
|
45
|
+
/* Ohne Popover-API (sehr alte Browser) bleibt nur z-index - im Top Layer egal. */
|
|
46
|
+
z-index: 2147483000;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: var(--ncss-notification-gap);
|
|
50
|
+
width: min(var(--ncss-notification-width), calc(100vw - 2 * var(--ncss-notification-offset)));
|
|
51
|
+
max-height: calc(100vh - 2 * var(--ncss-notification-offset));
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: 0;
|
|
54
|
+
overflow: visible;
|
|
55
|
+
border: 0;
|
|
56
|
+
background: none;
|
|
57
|
+
color: var(--ncss-color-text);
|
|
58
|
+
/* Die Fläche zwischen den Meldungen lässt Klicks zur Seite darunter durch */
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
|
|
61
|
+
&:empty {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/* Popover-UA-Stil zentriert die Box - auf die eigene Position zurücksetzen */
|
|
66
|
+
ncss-toast-region:popover-open {
|
|
67
|
+
inset: var(--ncss-notification-offset) var(--ncss-notification-offset) auto auto;
|
|
68
|
+
}
|
|
69
|
+
ncss-toast-region:is([position="top-start"], [position="bottom-start"]) {
|
|
70
|
+
inset-inline: var(--ncss-notification-offset) auto;
|
|
71
|
+
}
|
|
72
|
+
ncss-toast-region:is([position="top-end"], [position="bottom-end"], :not([position])) {
|
|
73
|
+
inset-inline: auto var(--ncss-notification-offset);
|
|
74
|
+
}
|
|
75
|
+
ncss-toast-region:is([position="top-center"], [position="bottom-center"]) {
|
|
76
|
+
inset-inline: 0;
|
|
77
|
+
margin-inline: auto;
|
|
78
|
+
}
|
|
79
|
+
ncss-toast-region:is([position="bottom-start"], [position="bottom-center"], [position="bottom-end"]) {
|
|
80
|
+
--ncss-toast-dir: -1;
|
|
81
|
+
inset-block: auto var(--ncss-notification-offset);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* --- Meldung ------------------------------------------------------------------------- */
|
|
85
|
+
.ncss-notification {
|
|
86
|
+
--ncss-notification-accent: var(--ncss-color-neutral);
|
|
87
|
+
position: relative;
|
|
88
|
+
display: grid;
|
|
89
|
+
grid-template-columns: auto 1fr auto;
|
|
90
|
+
align-items: start;
|
|
91
|
+
gap: var(--ncss-space-2xs);
|
|
92
|
+
padding: var(--ncss-space-xs) var(--ncss-space-xs) var(--ncss-space-xs) var(--ncss-space-sm);
|
|
93
|
+
color: var(--ncss-color-text);
|
|
94
|
+
background-color: var(--ncss-color-surface);
|
|
95
|
+
border: var(--ncss-border-width) solid var(--ncss-color-border);
|
|
96
|
+
border-radius: var(--ncss-radius-md);
|
|
97
|
+
box-shadow: var(--ncss-shadow-lg), inset 4px 0 0 var(--ncss-notification-accent);
|
|
98
|
+
font-size: var(--ncss-font-size-base);
|
|
99
|
+
line-height: 1.4;
|
|
100
|
+
pointer-events: auto;
|
|
101
|
+
transition:
|
|
102
|
+
opacity var(--ncss-motion-duration-slow) var(--ncss-motion-easing-emphasized),
|
|
103
|
+
translate var(--ncss-motion-duration-slow) var(--ncss-motion-easing-emphasized),
|
|
104
|
+
scale var(--ncss-motion-duration-slow) var(--ncss-motion-easing-emphasized),
|
|
105
|
+
height var(--ncss-motion-duration-slow) var(--ncss-motion-easing-emphasized);
|
|
106
|
+
|
|
107
|
+
& p {
|
|
108
|
+
margin: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/* Statusfarbe: Akzentstreifen (inset-Schatten statt border, damit die Ecke rund bleibt)
|
|
112
|
+
+ Punkt vor dem Text. Der Punkt ist zusätzlich zur Farbe nur Deko - die Bedeutung
|
|
113
|
+
steckt im Text selbst (und bei danger/warning in role="alert"). */
|
|
114
|
+
.ncss-notification::before {
|
|
115
|
+
content: "";
|
|
116
|
+
width: 0.6rem;
|
|
117
|
+
height: 0.6rem;
|
|
118
|
+
margin-block-start: 0.45em;
|
|
119
|
+
border-radius: 50%;
|
|
120
|
+
background-color: var(--ncss-notification-accent);
|
|
121
|
+
}
|
|
122
|
+
.ncss-notification--brand { --ncss-notification-accent: var(--ncss-color-brand); }
|
|
123
|
+
.ncss-notification--success { --ncss-notification-accent: var(--ncss-color-success); }
|
|
124
|
+
.ncss-notification--warning { --ncss-notification-accent: var(--ncss-color-warning); }
|
|
125
|
+
.ncss-notification--danger { --ncss-notification-accent: var(--ncss-color-danger); }
|
|
126
|
+
|
|
127
|
+
.ncss-notification-body {
|
|
128
|
+
min-width: 0;
|
|
129
|
+
}
|
|
130
|
+
.ncss-notification-title {
|
|
131
|
+
font-weight: var(--ncss-font-weight-semibold);
|
|
132
|
+
}
|
|
133
|
+
.ncss-notification-body > :not(.ncss-notification-title) {
|
|
134
|
+
font-size: var(--ncss-font-size-sm);
|
|
135
|
+
color: var(--ncss-color-text-muted);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Einblenden: von der Kante her, an der die Region sitzt */
|
|
139
|
+
@starting-style {
|
|
140
|
+
.ncss-notification {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
translate: 0 calc(var(--ncss-toast-dir) * -1rem);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
.ncss-notification--leaving {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
translate: 0 calc(var(--ncss-toast-dir) * -0.75rem);
|
|
148
|
+
scale: 0.96;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* --- Schließen (immer sichtbar - Touch und Tastatur haben kein Hover) ------------------ */
|
|
152
|
+
.ncss-notification-close {
|
|
153
|
+
display: grid;
|
|
154
|
+
place-items: center;
|
|
155
|
+
width: 1.9rem;
|
|
156
|
+
height: 1.9rem;
|
|
157
|
+
margin: -0.25rem -0.15rem 0 0;
|
|
158
|
+
padding: 0;
|
|
159
|
+
border: 0;
|
|
160
|
+
border-radius: var(--ncss-radius-md);
|
|
161
|
+
background: none;
|
|
162
|
+
color: var(--ncss-color-text-muted);
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
|
|
165
|
+
&::before {
|
|
166
|
+
content: "";
|
|
167
|
+
width: 0.9rem;
|
|
168
|
+
height: 0.9rem;
|
|
169
|
+
background-color: currentColor;
|
|
170
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6L18 18M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
171
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6L18 18M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
172
|
+
}
|
|
173
|
+
&:focus-visible {
|
|
174
|
+
outline-offset: 0;
|
|
175
|
+
color: var(--ncss-color-text);
|
|
176
|
+
}
|
|
177
|
+
&:active {
|
|
178
|
+
background-color: var(--ncss-color-bg-subtle);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
@media (hover: hover) and (pointer: fine) {
|
|
182
|
+
.ncss-notification-close:hover:not(:active) {
|
|
183
|
+
color: var(--ncss-color-text);
|
|
184
|
+
background-color: var(--ncss-color-bg-subtle);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* --- Gestapelt (Attribut stack) -------------------------------------------------------
|
|
189
|
+
Alle Meldungen liegen in DERSELBEN Grid-Zelle übereinander. js/notification.js setzt pro
|
|
190
|
+
Meldung --ncss-toast-index (0 = neueste) und --ncss-toast-offset (Summe der Höhen der
|
|
191
|
+
neueren Meldungen + Abstände) sowie an der Region --ncss-toast-front-height.
|
|
192
|
+
Zusammengeklappt: ältere Meldungen um je "peek" versetzt, kleiner, Inhalt ausgeblendet,
|
|
193
|
+
ab der 4. ganz unsichtbar. Aufgefächert (Hover/Fokus in der Region): jede an ihrer
|
|
194
|
+
echten Position, volle Größe - transform/opacity/height, kein Layout-Sprung der Seite. */
|
|
195
|
+
ncss-toast-region[stack]:defined:not(:empty) {
|
|
196
|
+
display: grid;
|
|
197
|
+
grid-template: "stack" auto / 100%;
|
|
198
|
+
align-items: start;
|
|
199
|
+
}
|
|
200
|
+
ncss-toast-region[stack]:defined:is([position="bottom-start"], [position="bottom-center"], [position="bottom-end"]) {
|
|
201
|
+
align-items: end;
|
|
202
|
+
}
|
|
203
|
+
ncss-toast-region[stack]:defined > .ncss-notification {
|
|
204
|
+
--ncss-toast-i: var(--ncss-toast-index, 0);
|
|
205
|
+
grid-area: stack;
|
|
206
|
+
z-index: calc(100 - var(--ncss-toast-i));
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
height: var(--ncss-toast-front-height, auto);
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
transform-origin: 50% 0;
|
|
211
|
+
translate: 0 calc(var(--ncss-toast-dir) * var(--ncss-toast-i) * var(--ncss-toast-peek));
|
|
212
|
+
scale: calc(1 - var(--ncss-toast-i) * 0.05);
|
|
213
|
+
opacity: clamp(0, 3 - var(--ncss-toast-i), 1);
|
|
214
|
+
|
|
215
|
+
& > * {
|
|
216
|
+
transition: opacity var(--ncss-motion-duration) var(--ncss-motion-easing);
|
|
217
|
+
}
|
|
218
|
+
&:not([data-ncss-toast-front]) > * {
|
|
219
|
+
opacity: 0;
|
|
220
|
+
}
|
|
221
|
+
&:not([data-ncss-toast-front])::before {
|
|
222
|
+
opacity: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* Unsichtbare Brücke über den Abstand zur nächsten Meldung - sonst verlässt der Zeiger
|
|
226
|
+
beim Wechsel zwischen aufgefächerten Meldungen kurz die Region und alles klappt zu. */
|
|
227
|
+
&::after {
|
|
228
|
+
content: "";
|
|
229
|
+
position: absolute;
|
|
230
|
+
inset-inline: 0;
|
|
231
|
+
top: 100%;
|
|
232
|
+
height: calc(var(--ncss-notification-gap) + 2px);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
ncss-toast-region[stack]:defined:is([position="bottom-start"], [position="bottom-center"], [position="bottom-end"]) > .ncss-notification {
|
|
236
|
+
transform-origin: 50% 100%;
|
|
237
|
+
|
|
238
|
+
&::after {
|
|
239
|
+
top: auto;
|
|
240
|
+
bottom: 100%;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/* Overflow: hidden würde den Brücken-::after abschneiden - im aufgefächerten Zustand
|
|
244
|
+
wieder sichtbar, dort ist ohnehin jede Meldung in voller Höhe. */
|
|
245
|
+
ncss-toast-region[stack]:defined:is(:focus-within, [data-ncss-toast-expanded]) > .ncss-notification {
|
|
246
|
+
height: auto;
|
|
247
|
+
overflow: visible;
|
|
248
|
+
translate: 0 calc(var(--ncss-toast-dir) * var(--ncss-toast-offset, 0px));
|
|
249
|
+
scale: 1;
|
|
250
|
+
opacity: 1;
|
|
251
|
+
|
|
252
|
+
& > *,
|
|
253
|
+
&::before {
|
|
254
|
+
opacity: 1;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
@media (hover: hover) and (pointer: fine) {
|
|
258
|
+
ncss-toast-region[stack]:defined:hover > .ncss-notification {
|
|
259
|
+
height: auto;
|
|
260
|
+
overflow: visible;
|
|
261
|
+
translate: 0 calc(var(--ncss-toast-dir) * var(--ncss-toast-offset, 0px));
|
|
262
|
+
scale: 1;
|
|
263
|
+
opacity: 1;
|
|
264
|
+
|
|
265
|
+
& > *,
|
|
266
|
+
&::before {
|
|
267
|
+
opacity: 1;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/* Ausblenden schlägt jeden Stapel-Zustand (auch aufgefächert) - doppelte Klasse statt
|
|
272
|
+
:hover in dieser Regel, damit das Hover-Gate oben die einzige :hover-Stelle bleibt. */
|
|
273
|
+
ncss-toast-region[stack]:defined > .ncss-notification.ncss-notification--leaving.ncss-notification--leaving {
|
|
274
|
+
opacity: 0;
|
|
275
|
+
scale: 0.94;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@media (forced-colors: active) {
|
|
279
|
+
.ncss-notification {
|
|
280
|
+
border-color: CanvasText;
|
|
281
|
+
}
|
|
282
|
+
.ncss-notification::before {
|
|
283
|
+
forced-color-adjust: none;
|
|
284
|
+
background-color: CanvasText;
|
|
285
|
+
}
|
|
286
|
+
.ncss-notification-close::before {
|
|
287
|
+
forced-color-adjust: none;
|
|
288
|
+
background-color: ButtonText;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Off-Canvas-Komponente (Layer "components"): natives <dialog> als seitlich
|
|
3
|
+
* einschiebende Sidebar statt zentriertem Modal. Gleiche command/commandfor-Mechanik wie
|
|
4
|
+
* components/modal.css - für Browser ohne Invoker Commands deckt js/command-fallback.js
|
|
5
|
+
* BEIDE Komponenten ab, kein zweites Script nötig.
|
|
6
|
+
*
|
|
7
|
+
* Markup:
|
|
8
|
+
* <button type="button" command="show-modal" commandfor="sidebar1">Menü öffnen</button>
|
|
9
|
+
* <dialog id="sidebar1" class="ncss-offcanvas ncss-offcanvas--start">
|
|
10
|
+
* <button type="button" class="ncss-dialog-close" command="close"
|
|
11
|
+
* commandfor="sidebar1" aria-label="Schließen">×</button>
|
|
12
|
+
* <nav>...</nav>
|
|
13
|
+
* </dialog>
|
|
14
|
+
* Klick daneben (Backdrop) schließt: natives closedby="any" am <dialog> - js/dialog-light-
|
|
15
|
+
* dismiss.js setzt das für jedes ncss-Modal/-Off-Canvas ohne eigenes closedby automatisch
|
|
16
|
+
* (Default AN) und emuliert es in Browsern ohne closedby. Abschalten pro Dialog:
|
|
17
|
+
* closedby="closerequest" (nur Esc + Buttons) oder closedby="none" (nur Buttons, z.B. lange
|
|
18
|
+
* Formulare). Trefferfläche: der <dialog> selbst ist das Panel, alles außerhalb seiner Box
|
|
19
|
+
* ist Backdrop.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
.ncss-offcanvas {
|
|
23
|
+
position: fixed;
|
|
24
|
+
inset-block: 0;
|
|
25
|
+
/* Überschreibt base.css' "dialog:modal { margin: auto }" - funktioniert ohne
|
|
26
|
+
!important, weil die components-Layer in ncss.css NACH der base-Layer kommt (siehe
|
|
27
|
+
@layer-Reihenfolge dort) und damit automatisch gewinnt. */
|
|
28
|
+
margin: 0;
|
|
29
|
+
height: 100%;
|
|
30
|
+
/* 100vh als Fallback, 100svh überschreibt direkt danach - siehe tokens.css'
|
|
31
|
+
--ncss-sticky-container-max-height für die Begründung (mobiles Browser-Chrome). */
|
|
32
|
+
max-height: 100vh;
|
|
33
|
+
max-height: 100svh;
|
|
34
|
+
/* Explizite width NÖTIG, nicht nur max-width: position:fixed mit nur EINER gesetzten
|
|
35
|
+
inset-inline-Kante (--start ODER --end, nie beide) schrumpft ohne width auf die
|
|
36
|
+
Inhaltsbreite (shrink-to-fit) statt zu strecken - max-width alleine deckelt das nur
|
|
37
|
+
nach oben, erzwingt die Breite aber nicht (per echtem Test gefunden: Panel blieb
|
|
38
|
+
spürbar schmaler als --ncss-offcanvas-width). */
|
|
39
|
+
width: min(85vw, var(--ncss-offcanvas-width));
|
|
40
|
+
border: none;
|
|
41
|
+
border-radius: 0;
|
|
42
|
+
padding: var(--ncss-space-md);
|
|
43
|
+
overflow-y: auto;
|
|
44
|
+
/* base.css stylt <dialog> bewusst neutral (siehe dort) - Farbe/Hintergrund also hier
|
|
45
|
+
explizit setzen, sonst zeigt der Browser sein eigenes UA-Default (Canvas/CanvasText). */
|
|
46
|
+
color: var(--ncss-color-text);
|
|
47
|
+
background-color: var(--ncss-color-surface);
|
|
48
|
+
box-shadow: var(--ncss-shadow-lg);
|
|
49
|
+
}
|
|
50
|
+
.ncss-offcanvas--start {
|
|
51
|
+
inset-inline-start: 0;
|
|
52
|
+
inset-inline-end: auto;
|
|
53
|
+
}
|
|
54
|
+
.ncss-offcanvas--end {
|
|
55
|
+
inset-inline-end: 0;
|
|
56
|
+
inset-inline-start: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Close-Button: geteilte Basis in components/dialog-close.css, Position selbst braucht
|
|
60
|
+
keine Ausnahme (Default innen oben rechts passt bereits) - der Inhalt DANEBEN
|
|
61
|
+
dagegen schon: .ncss-dialog-close ist position:absolute, reserviert also von sich aus
|
|
62
|
+
keinen Platz. Eine Überschrift direkt im Panel-Inhalt kollidiert dadurch sichtbar mit
|
|
63
|
+
dem Button, besonders auf den ohnehin schmalen Off-Canvas-Breiten (min(85vw, ...)) -
|
|
64
|
+
.ncss-modal-header hat dasselbe Problem bereits über padding-inline-end gelöst,
|
|
65
|
+
dasselbe Rezept hier für Off-Canvas-Panels mit eigener Überschrift. */
|
|
66
|
+
.ncss-offcanvas-header {
|
|
67
|
+
margin-block-end: var(--ncss-space-sm);
|
|
68
|
+
padding-inline-end: var(--ncss-space-lg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ncss-offcanvas::backdrop {
|
|
72
|
+
background-color: var(--ncss-color-overlay);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Einschieben von der jeweiligen Kante statt Skalieren (siehe modal.css für dieselbe
|
|
76
|
+
@starting-style/allow-discrete-Mechanik, dort mit scale statt translate). */
|
|
77
|
+
.ncss-offcanvas,
|
|
78
|
+
.ncss-offcanvas::backdrop {
|
|
79
|
+
transition:
|
|
80
|
+
translate var(--ncss-motion-duration-slow) var(--ncss-motion-easing),
|
|
81
|
+
opacity var(--ncss-motion-duration) var(--ncss-motion-easing),
|
|
82
|
+
display var(--ncss-motion-duration-slow) allow-discrete,
|
|
83
|
+
overlay var(--ncss-motion-duration-slow) allow-discrete;
|
|
84
|
+
}
|
|
85
|
+
.ncss-offcanvas {
|
|
86
|
+
translate: 0 0;
|
|
87
|
+
}
|
|
88
|
+
.ncss-offcanvas::backdrop {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
@starting-style {
|
|
92
|
+
.ncss-offcanvas--start:modal {
|
|
93
|
+
translate: -100% 0;
|
|
94
|
+
}
|
|
95
|
+
.ncss-offcanvas--end:modal {
|
|
96
|
+
translate: 100% 0;
|
|
97
|
+
}
|
|
98
|
+
.ncss-offcanvas:modal::backdrop {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.ncss-offcanvas--start:not(:modal) {
|
|
103
|
+
translate: -100% 0;
|
|
104
|
+
}
|
|
105
|
+
.ncss-offcanvas--end:not(:modal) {
|
|
106
|
+
translate: 100% 0;
|
|
107
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Overlay-Komponente (Layer "components"). Ein Panel legt sich über ein Bild/
|
|
3
|
+
* Video (Bildunterschrift, CTA, Verlaufs-Blende) - position:relative auf dem Container,
|
|
4
|
+
* position:absolute auf dem Panel, klassisches Muster.
|
|
5
|
+
*
|
|
6
|
+
* Bewusst KLEIN gehalten (positionieren + zwei Hintergrund-Varianten) - für alles
|
|
7
|
+
* Weitere bereits vorhandene, allgemeine ncss-Bausteine kombinieren statt sie hier zu
|
|
8
|
+
* duplizieren:
|
|
9
|
+
* - Nur beim Hover/Fokus sichtbar: .ncss-reveal-on-hover (helpers/visibility.css)
|
|
10
|
+
* zusätzlich auf .ncss-overlay setzen - funktioniert unverändert, weil .ncss-overlay
|
|
11
|
+
* ein DIREKTES Kind von .ncss-overlay-container ist (die Selektor-Bedingung dort,
|
|
12
|
+
* ":hover > .ncss-reveal-on-hover", trifft genau diese Eltern-Kind-Beziehung).
|
|
13
|
+
* - Lesbarer Text unabhängig vom Bildinhalt: .ncss-text-light/-dark
|
|
14
|
+
* (helpers/typography.css) statt einer festen Textfarbe hier.
|
|
15
|
+
*
|
|
16
|
+
* Markup:
|
|
17
|
+
* <div class="ncss-overlay-container">
|
|
18
|
+
* <img src="foto.jpg" alt="...">
|
|
19
|
+
* <div class="ncss-overlay ncss-overlay--bottom ncss-overlay--scrim ncss-reveal-on-hover">
|
|
20
|
+
* <p class="ncss-text-light">Bildunterschrift</p>
|
|
21
|
+
* </div>
|
|
22
|
+
* </div>
|
|
23
|
+
*
|
|
24
|
+
* Portraitkarte (Team/Cast/Referenzen) - dieselbe Komponente, kombiniert mit bereits
|
|
25
|
+
* vorhandenen Utilities statt einer eigenen Karten-Variante: .ncss-ratio-portrait
|
|
26
|
+
* (helpers/media.css) für das Seitenverhältnis, .ncss-radius-lg (helpers/elevation.css)
|
|
27
|
+
* für runde Ecken, .ncss-overlay-container--zoom (unten) für den optionalen Hover-Effekt:
|
|
28
|
+
* <div class="ncss-overlay-container ncss-overlay-container--zoom ncss-ratio-portrait ncss-radius-lg">
|
|
29
|
+
* <img src="person.jpg" alt="Name">
|
|
30
|
+
* <div class="ncss-overlay ncss-overlay--bottom ncss-overlay--scrim">
|
|
31
|
+
* <p class="ncss-text-light"><strong>Name</strong><br><span class="ncss-text-light-700">Rolle</span></p>
|
|
32
|
+
* </div>
|
|
33
|
+
* </div>
|
|
34
|
+
*/
|
|
35
|
+
.ncss-overlay-container {
|
|
36
|
+
position: relative;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
}
|
|
39
|
+
.ncss-overlay-container > img,
|
|
40
|
+
.ncss-overlay-container > video {
|
|
41
|
+
display: block;
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Default: deckt die komplette Fläche ab (wie .ncss-overlay--scrim/--tint oft gebraucht
|
|
46
|
+
werden) - --top/--bottom/--center schränken das gezielt auf einen Rand/die Mitte ein. */
|
|
47
|
+
.ncss-overlay {
|
|
48
|
+
position: absolute;
|
|
49
|
+
inset: 0;
|
|
50
|
+
padding: var(--ncss-space-md);
|
|
51
|
+
}
|
|
52
|
+
.ncss-overlay--top {
|
|
53
|
+
inset-block-end: auto;
|
|
54
|
+
}
|
|
55
|
+
.ncss-overlay--bottom {
|
|
56
|
+
inset-block-start: auto;
|
|
57
|
+
}
|
|
58
|
+
.ncss-overlay--center {
|
|
59
|
+
inset: auto;
|
|
60
|
+
top: 50%;
|
|
61
|
+
left: 50%;
|
|
62
|
+
translate: -50% -50%;
|
|
63
|
+
padding: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Verlaufs-Blende von unten - klassisches "Text auf Foto bleibt lesbar"-Muster
|
|
67
|
+
(dasselbe Prinzip wie .ncss-hero-media::after in components/hero.css). Für --top
|
|
68
|
+
dieselbe Regel gespiegelt (Verlauf von oben statt unten). */
|
|
69
|
+
.ncss-overlay--scrim {
|
|
70
|
+
background: linear-gradient(to top, var(--ncss-color-overlay-strong), transparent 60%);
|
|
71
|
+
}
|
|
72
|
+
.ncss-overlay--scrim.ncss-overlay--top {
|
|
73
|
+
background: linear-gradient(to bottom, var(--ncss-color-overlay-strong), transparent 60%);
|
|
74
|
+
}
|
|
75
|
+
/* Gleichmäßige, halbtransparente Fläche statt eines Verlaufs - z.B. für ein CTA, das
|
|
76
|
+
die ganze Kachel abdeckt, nicht nur einen Rand. */
|
|
77
|
+
.ncss-overlay--tint {
|
|
78
|
+
background-color: var(--ncss-color-overlay);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* --- Zoom-Modifier (optional, .ncss-overlay-container--zoom) -------------------------
|
|
82
|
+
Bild startet dezent entsättigt, wird bei Hover/Fokus auf volle Farbe + einen leichten
|
|
83
|
+
Zoom "geweckt" - wiederkehrendes Editorial-/Portraitkarten-Muster (Team-/Cast-/
|
|
84
|
+
Referenz-Kacheln). Eigener Modifier statt Standardverhalten von
|
|
85
|
+
.ncss-overlay-container: Filter/Transform sind eine gestalterische Entscheidung,
|
|
86
|
+
keine strukturelle Eigenschaft der Komponente (dasselbe Prinzip wie bei Rahmen/
|
|
87
|
+
Schatten, siehe helpers/elevation.css - Card bringt nur Struktur, Optik kommt separat).
|
|
88
|
+
--ncss-overlay-zoom-grayscale/--ncss-overlay-zoom-scale pro Instanz überschreibbar.
|
|
89
|
+
|
|
90
|
+
Entsättigen UND Hover-Skalierung bewusst NUR unter (hover:hover) and (pointer:fine) -
|
|
91
|
+
auf Touch-Geräten (kein zuverlässiges :hover, siehe README "Touch-Geräte haben kein
|
|
92
|
+
:hover") gäbe es sonst KEINEN Weg, das Foto je in Farbe zu sehen; dort bleibt es
|
|
93
|
+
stattdessen immer normal farbig (kein Effekt, aber auch keine Einschränkung).
|
|
94
|
+
:focus-within bleibt bewusst UNGATED (wie :focus-visible in components/nav.css) -
|
|
95
|
+
Tastatur-Fokus auf einem verschachtelten Link/Button zeigt die volle Farbe unabhängig
|
|
96
|
+
vom Zeigegerät. */
|
|
97
|
+
@media (hover: hover) and (pointer: fine) {
|
|
98
|
+
.ncss-overlay-container--zoom > img,
|
|
99
|
+
.ncss-overlay-container--zoom > video {
|
|
100
|
+
filter: grayscale(var(--ncss-overlay-zoom-grayscale, 45%));
|
|
101
|
+
}
|
|
102
|
+
.ncss-overlay-container--zoom:hover > img,
|
|
103
|
+
.ncss-overlay-container--zoom:hover > video {
|
|
104
|
+
filter: grayscale(0%);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.ncss-overlay-container--zoom:focus-within > img,
|
|
108
|
+
.ncss-overlay-container--zoom:focus-within > video {
|
|
109
|
+
filter: grayscale(0%);
|
|
110
|
+
}
|
|
111
|
+
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
|
|
112
|
+
.ncss-overlay-container--zoom > img,
|
|
113
|
+
.ncss-overlay-container--zoom > video {
|
|
114
|
+
transition: filter 0.25s ease, scale 0.25s ease;
|
|
115
|
+
}
|
|
116
|
+
.ncss-overlay-container--zoom:hover > img,
|
|
117
|
+
.ncss-overlay-container--zoom:hover > video,
|
|
118
|
+
.ncss-overlay-container--zoom:focus-within > img,
|
|
119
|
+
.ncss-overlay-container--zoom:focus-within > video {
|
|
120
|
+
scale: var(--ncss-overlay-zoom-scale, 1.05);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Pagination: Seitennavigation für Listen/Archive (Layer "components"), reines CSS.
|
|
3
|
+
*
|
|
4
|
+
* Markup - echte Links (funktioniert ohne JS, teilbar, Zurück-Taste), aktuelle Seite per
|
|
5
|
+
* aria-current="page", Lücke als aria-hidden-Element (die Seitenzahlen selbst sagen alles):
|
|
6
|
+
* <nav class="ncss-pagination" aria-label="Seiten">
|
|
7
|
+
* <ul role="list">
|
|
8
|
+
* <li><a class="ncss-pagination-prev" href="?seite=3" rel="prev">
|
|
9
|
+
* <span class="ncss-pagination-label">Zurück</span></a></li>
|
|
10
|
+
* <li><a href="?seite=1"><span class="ncss-pagination-sr">Seite </span>1</a></li>
|
|
11
|
+
* <li class="ncss-pagination-gap" aria-hidden="true">…</li>
|
|
12
|
+
* <li><a href="?seite=4" aria-current="page"><span class="ncss-pagination-sr">Seite </span>4</a></li>
|
|
13
|
+
* ...
|
|
14
|
+
* <li><a class="ncss-pagination-next" href="?seite=5" rel="next">
|
|
15
|
+
* <span class="ncss-pagination-label">Weiter</span></a></li>
|
|
16
|
+
* </ul>
|
|
17
|
+
* </nav>
|
|
18
|
+
* Erste/letzte Seite: den Zurück-/Weiter-Link OHNE href rendern (+ aria-disabled="true") -
|
|
19
|
+
* ein <a> ohne href ist nicht fokussierbar und nicht klickbar, bleibt aber als Platzhalter
|
|
20
|
+
* stehen (kein Springen der Leiste beim Blättern).
|
|
21
|
+
*
|
|
22
|
+
* Kompakt: die Leiste ist selbst ein Container (container-type: inline-size). Unter 32rem
|
|
23
|
+
* eigener Breite bleiben nur Zurück, aktuelle, erste, letzte Seite und Weiter sichtbar, und
|
|
24
|
+
* die Zurück/Weiter-Beschriftung wird zum Pfeil (Text bleibt für Screenreader erhalten) -
|
|
25
|
+
* reagiert auf den echten Platz (Sidebar, Karte, Modal), nicht auf den Viewport.
|
|
26
|
+
* .ncss-pagination--compact erzwingt diese Ansicht unabhängig von der Breite.
|
|
27
|
+
*
|
|
28
|
+
* Abhängigkeiten (Cherry-Picking): colors.css/tokens.css (+ reset/base).
|
|
29
|
+
*/
|
|
30
|
+
.ncss-pagination {
|
|
31
|
+
container-type: inline-size;
|
|
32
|
+
container-name: ncss-pagination;
|
|
33
|
+
}
|
|
34
|
+
.ncss-pagination > ul {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
gap: var(--ncss-space-3xs);
|
|
40
|
+
margin: 0;
|
|
41
|
+
padding: 0;
|
|
42
|
+
list-style: none;
|
|
43
|
+
}
|
|
44
|
+
.ncss-pagination li {
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
.ncss-pagination a {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
gap: var(--ncss-space-3xs);
|
|
52
|
+
/* 2.75rem = 44px Zielgröße (WCAG 2.5.8 verlangt 24px, 44px ist die komfortable Größe). */
|
|
53
|
+
min-inline-size: 2.75rem;
|
|
54
|
+
min-block-size: 2.75rem;
|
|
55
|
+
padding-inline: var(--ncss-space-xs);
|
|
56
|
+
border: var(--ncss-border-width) solid transparent;
|
|
57
|
+
border-radius: var(--ncss-radius-sm);
|
|
58
|
+
color: var(--ncss-color-text);
|
|
59
|
+
font-weight: var(--ncss-font-weight-semibold);
|
|
60
|
+
font-variant-numeric: tabular-nums;
|
|
61
|
+
text-decoration: none;
|
|
62
|
+
transition: background-color var(--ncss-motion-duration) var(--ncss-motion-easing);
|
|
63
|
+
}
|
|
64
|
+
.ncss-pagination a[href]:active {
|
|
65
|
+
background-color: color-mix(in oklch, currentColor 12%, transparent);
|
|
66
|
+
}
|
|
67
|
+
@media (hover: hover) and (pointer: fine) {
|
|
68
|
+
.ncss-pagination a[href]:hover:not(:active):not([aria-current]) {
|
|
69
|
+
background-color: color-mix(in oklch, currentColor 6%, transparent);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.ncss-pagination a[aria-current="page"] {
|
|
73
|
+
background-color: var(--ncss-color-brand);
|
|
74
|
+
color: var(--ncss-color-brand-contrast);
|
|
75
|
+
}
|
|
76
|
+
.ncss-pagination a:not([href]) {
|
|
77
|
+
color: var(--ncss-color-text-muted);
|
|
78
|
+
opacity: 0.6;
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
81
|
+
.ncss-pagination-gap {
|
|
82
|
+
min-inline-size: 1.5rem;
|
|
83
|
+
text-align: center;
|
|
84
|
+
color: var(--ncss-color-text-muted);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Pfeile vor/nach der Beschriftung - als Text-Zeichen statt Icon-Datei (erbt Farbe, auch in
|
|
88
|
+
erzwungenen Farben sichtbar). Spiegelt sich in RTL automatisch über :dir(). */
|
|
89
|
+
.ncss-pagination-prev::before { content: "\2190" / ""; }
|
|
90
|
+
.ncss-pagination-next::after { content: "\2192" / ""; }
|
|
91
|
+
.ncss-pagination:dir(rtl) .ncss-pagination-prev::before { content: "\2192" / ""; }
|
|
92
|
+
.ncss-pagination:dir(rtl) .ncss-pagination-next::after { content: "\2190" / ""; }
|
|
93
|
+
|
|
94
|
+
/* Nur für Screenreader ("Seite 4") - eigene Regel statt helpers/a11y.css, damit die Datei
|
|
95
|
+
allein läuft. */
|
|
96
|
+
.ncss-pagination-sr {
|
|
97
|
+
position: absolute;
|
|
98
|
+
width: 1px;
|
|
99
|
+
height: 1px;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
clip-path: inset(50%);
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* --- Kompakt: wenig eigener Platz ------------------------------------------------------ */
|
|
106
|
+
/* -- ncss container-query: ncss-pagination, compact (32rem) -- */
|
|
107
|
+
@container ncss-pagination (max-width: 31.99rem) {
|
|
108
|
+
.ncss-pagination li:not(:first-child, :last-child, :nth-child(2), :nth-last-child(2)):not(:has(> [aria-current])) {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
.ncss-pagination-label {
|
|
112
|
+
position: absolute;
|
|
113
|
+
width: 1px;
|
|
114
|
+
height: 1px;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
clip-path: inset(50%);
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
.ncss-pagination--compact li:not(:first-child, :last-child, :nth-child(2), :nth-last-child(2)):not(:has(> [aria-current])) {
|
|
121
|
+
display: none;
|
|
122
|
+
}
|
|
123
|
+
.ncss-pagination--compact .ncss-pagination-label {
|
|
124
|
+
position: absolute;
|
|
125
|
+
width: 1px;
|
|
126
|
+
height: 1px;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
clip-path: inset(50%);
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (forced-colors: active) {
|
|
133
|
+
.ncss-pagination a[aria-current="page"] {
|
|
134
|
+
border-color: Highlight;
|
|
135
|
+
forced-color-adjust: none;
|
|
136
|
+
background-color: Highlight;
|
|
137
|
+
color: HighlightText;
|
|
138
|
+
}
|
|
139
|
+
}
|