@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,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Animation-Helper (Layer "helpers"). Keyframes + Utility-Klassen, ausschließlich
|
|
3
|
+
* über --ncss-motion-duration/-slow und --ncss-motion-easing (tokens.css) getimt.
|
|
4
|
+
* prefers-reduced-motion wird bereits GLOBAL in reset.css respektiert (Dauer auf 0.01ms
|
|
5
|
+
* gekappt) - hier keine Einzelfall-Behandlung nötig, jede Animation unten erbt das.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@keyframes ncss-fade-in {
|
|
9
|
+
from { opacity: 0; }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes ncss-fade-out {
|
|
13
|
+
to { opacity: 0; }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes ncss-slide-in-up {
|
|
17
|
+
from { opacity: 0; translate: 0 var(--ncss-space-sm); }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes ncss-slide-in-down {
|
|
21
|
+
from { opacity: 0; translate: 0 calc(-1 * var(--ncss-space-sm)); }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes ncss-slide-in-left {
|
|
25
|
+
from { opacity: 0; translate: calc(-1 * var(--ncss-space-sm)) 0; }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes ncss-slide-in-right {
|
|
29
|
+
from { opacity: 0; translate: var(--ncss-space-sm) 0; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes ncss-scale-in {
|
|
33
|
+
from { opacity: 0; scale: 0.96; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Für dialog/popover-Open-Transitions (siehe components/lightbox.css) - animiert vom
|
|
37
|
+
Top-Layer-Start weg, überbrückt zusammen mit @starting-style den Sprung zwischen
|
|
38
|
+
display:none und sichtbar. */
|
|
39
|
+
@keyframes ncss-backdrop-fade-in {
|
|
40
|
+
from { opacity: 0; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ncss-animate-fade-in { animation: ncss-fade-in var(--ncss-motion-duration) var(--ncss-motion-easing) both; }
|
|
44
|
+
.ncss-animate-fade-out { animation: ncss-fade-out var(--ncss-motion-duration) var(--ncss-motion-easing) both; }
|
|
45
|
+
.ncss-animate-slide-in-up { animation: ncss-slide-in-up var(--ncss-motion-duration-slow) var(--ncss-motion-easing) both; }
|
|
46
|
+
.ncss-animate-slide-in-down { animation: ncss-slide-in-down var(--ncss-motion-duration-slow) var(--ncss-motion-easing) both; }
|
|
47
|
+
.ncss-animate-slide-in-left { animation: ncss-slide-in-left var(--ncss-motion-duration-slow) var(--ncss-motion-easing) both; }
|
|
48
|
+
.ncss-animate-slide-in-right { animation: ncss-slide-in-right var(--ncss-motion-duration-slow) var(--ncss-motion-easing) both; }
|
|
49
|
+
.ncss-animate-scale-in { animation: ncss-scale-in var(--ncss-motion-duration) var(--ncss-motion-easing) both; }
|
|
50
|
+
|
|
51
|
+
/* --- Endlos-Animationen (Aufmerksamkeit/Ladezustand) --------------------------------------
|
|
52
|
+
animation-iteration-count wird unter prefers-reduced-motion GLOBAL auf 1 gekappt (siehe
|
|
53
|
+
reset.css) - eine Endlos-Animation läuft dort also nur einen einzigen, praktisch
|
|
54
|
+
unsichtbaren 0.01ms-Frame statt endlos zu blinken/rotieren. Kein Extra-Code nötig. */
|
|
55
|
+
@keyframes ncss-spin {
|
|
56
|
+
to { rotate: 360deg; }
|
|
57
|
+
}
|
|
58
|
+
@keyframes ncss-pulse {
|
|
59
|
+
0%, 100% { opacity: 1; }
|
|
60
|
+
50% { opacity: 0.5; }
|
|
61
|
+
}
|
|
62
|
+
@keyframes ncss-shake {
|
|
63
|
+
10%, 90% { translate: -0.1rem 0; }
|
|
64
|
+
20%, 80% { translate: 0.2rem 0; }
|
|
65
|
+
30%, 50%, 70% { translate: -0.3rem 0; }
|
|
66
|
+
40%, 60% { translate: 0.3rem 0; }
|
|
67
|
+
}
|
|
68
|
+
@keyframes ncss-shimmer {
|
|
69
|
+
to { background-position-x: -20%; }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ncss-animate-spin { animation: ncss-spin 1s linear infinite; }
|
|
73
|
+
.ncss-animate-pulse { animation: ncss-pulse 1.6s var(--ncss-motion-easing) infinite; }
|
|
74
|
+
/* Einmalig statt Loop (z.B. bei ungültiger Formulareingabe per JS getriggert:
|
|
75
|
+
el.classList.add("ncss-animate-shake") und nach Ablauf wieder entfernen). */
|
|
76
|
+
.ncss-animate-shake { animation: ncss-shake var(--ncss-motion-duration-slow) var(--ncss-motion-easing) both; }
|
|
77
|
+
|
|
78
|
+
/* --- Skeleton (Lade-Platzhalter) ------------------------------------------------------------
|
|
79
|
+
Ergänzt .ncss-placeholder (components/placeholder.css, "Inhalt fehlt") um den Fall
|
|
80
|
+
"Inhalt lädt noch" - derselbe Ausgangspunkt (dezente Fläche), zusätzlich ein wandernder
|
|
81
|
+
Schimmer per background-position-Animation (kein zusätzliches Markup/Pseudo-Element
|
|
82
|
+
nötig, ein Gradient reicht). */
|
|
83
|
+
.ncss-skeleton {
|
|
84
|
+
background: linear-gradient(
|
|
85
|
+
100deg,
|
|
86
|
+
var(--ncss-color-bg-subtle) 40%,
|
|
87
|
+
var(--ncss-color-border) 50%,
|
|
88
|
+
var(--ncss-color-bg-subtle) 60%
|
|
89
|
+
);
|
|
90
|
+
background-size: 200% 100%;
|
|
91
|
+
background-position-x: 100%;
|
|
92
|
+
border-radius: var(--ncss-radius-md);
|
|
93
|
+
animation: ncss-shimmer 1.6s linear infinite;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* --- Mikro-Interaktionen (Hover/Press) -----------------------------------------------------
|
|
97
|
+
Transition-basiert statt Keyframes (Zustand, kein einmaliger Ablauf) - opt-in, nirgends
|
|
98
|
+
automatisch angewendet. transition-duration erbt denselben globalen reduced-motion-Cap. */
|
|
99
|
+
.ncss-hover-lift {
|
|
100
|
+
transition: translate var(--ncss-motion-duration) var(--ncss-motion-easing),
|
|
101
|
+
box-shadow var(--ncss-motion-duration) var(--ncss-motion-easing);
|
|
102
|
+
}
|
|
103
|
+
.ncss-hover-grow {
|
|
104
|
+
transition: scale var(--ncss-motion-duration) var(--ncss-motion-easing);
|
|
105
|
+
}
|
|
106
|
+
/* Nur Geräte mit echtem Zeigegerät (Maus/Trackpad) - siehe README "Touch-Geräte haben
|
|
107
|
+
kein :hover". Für Touch stattdessen .ncss-press (unten, :active statt :hover)
|
|
108
|
+
kombinieren, falls auch dort eine taktile Rückmeldung gewünscht ist. */
|
|
109
|
+
@media (hover: hover) and (pointer: fine) {
|
|
110
|
+
.ncss-hover-lift:hover {
|
|
111
|
+
translate: 0 -0.15rem;
|
|
112
|
+
box-shadow: var(--ncss-shadow-md);
|
|
113
|
+
}
|
|
114
|
+
.ncss-hover-grow:hover {
|
|
115
|
+
scale: 1.03;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Taktiles "Drücken" für Buttons/Karten - :active statt :hover, funktioniert auch per
|
|
120
|
+
Touch (kein Hover-Zustand nötig). */
|
|
121
|
+
.ncss-press {
|
|
122
|
+
transition: scale var(--ncss-motion-duration) var(--ncss-motion-easing);
|
|
123
|
+
}
|
|
124
|
+
/* transition-duration überschreibt hier NUR den Einstieg in :active (schneller als ein
|
|
125
|
+
kurzer Tap oft dauert, siehe helpers/forms.css ".ncss-btn" für dieselbe Begründung) -
|
|
126
|
+
das Zurückfedern beim Loslassen bleibt bei der normalen, oben deklarierten Dauer. */
|
|
127
|
+
.ncss-press:active {
|
|
128
|
+
scale: 0.95;
|
|
129
|
+
transition-duration: var(--ncss-motion-duration-fast);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* --- GPU-Compositing-Hinweis (Opt-in) ------------------------------------------------------
|
|
133
|
+
translateZ(0) "hebt" ein Element auf eine eigene Compositor-Ebene - klassischer Trick
|
|
134
|
+
gegen Ruckeln bei häufig animierten/gescrollten Elementen mit teurem Repaint (z.B. ein
|
|
135
|
+
großes Bild). Nutzt die eigenständige transform-Eigenschaft, NICHT translate/scale/rotate
|
|
136
|
+
(siehe .ncss-hover-lift/-grow oben) - beide Eigenschaften komponieren automatisch
|
|
137
|
+
miteinander, .ncss-gpu-boost lässt sich also gefahrlos MIT .ncss-hover-lift/-grow/-press
|
|
138
|
+
kombinieren, ohne dass eine Deklaration die andere überschreibt.
|
|
139
|
+
BEWUSST NICHT automatisch auf irgendeine Komponente angewendet: jede zusätzliche
|
|
140
|
+
Compositor-Ebene kostet Grafikspeicher ("Layer-Explosion" bei zu freizügigem Einsatz ist
|
|
141
|
+
ein bekanntes eigenes Performance-Problem) - gezielt einsetzen bei sichtbarem Ruckeln,
|
|
142
|
+
nicht vorsorglich überall. Für ein Element, das SELBST schon transform nutzt (z.B. die
|
|
143
|
+
@keyframes von .ncss-hero--parallax), diese Klasse NICHT zusätzlich setzen (die beiden
|
|
144
|
+
transform-Deklarationen würden sich gegenseitig überschreiben statt zu kombinieren) -
|
|
145
|
+
dort stattdessen den --ncss-gpu-hint-Token direkt in der eigenen transform-Deklaration
|
|
146
|
+
verwenden (siehe tokens.css und components/hero.css). */
|
|
147
|
+
.ncss-gpu-boost {
|
|
148
|
+
transform: translateZ(0);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Transition-Utilities für zustandsbasierte Übergänge (Hover, Klassenwechsel per JS) statt
|
|
152
|
+
Keyframes - dieselben Tokens, damit Timing überall konsistent bleibt. */
|
|
153
|
+
.ncss-transition {
|
|
154
|
+
transition-duration: var(--ncss-motion-duration);
|
|
155
|
+
transition-timing-function: var(--ncss-motion-easing);
|
|
156
|
+
}
|
|
157
|
+
.ncss-transition-slow {
|
|
158
|
+
transition-duration: var(--ncss-motion-duration-slow);
|
|
159
|
+
}
|
|
160
|
+
.ncss-transition-colors {
|
|
161
|
+
transition-property: color, background-color, border-color;
|
|
162
|
+
transition-duration: var(--ncss-motion-duration);
|
|
163
|
+
transition-timing-function: var(--ncss-motion-easing);
|
|
164
|
+
}
|
|
165
|
+
.ncss-transition-transform {
|
|
166
|
+
transition-property: translate, scale, rotate;
|
|
167
|
+
transition-duration: var(--ncss-motion-duration);
|
|
168
|
+
transition-timing-function: var(--ncss-motion-easing);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Scroll-getriebene Reveal-Animationen (IntersectionObserver-Ersatz, kein JS) - Element
|
|
172
|
+
animiert ein, sobald es in den Viewport scrollt. animation-timeline: view() (Chrome/Edge
|
|
173
|
+
115+, Safari 18+, Firefox hinter Flag - Stand August 2026, ~84% global) hängt den
|
|
174
|
+
Animations-Fortschritt an die Scroll-Position statt an Zeit. Ohne Unterstützung bleibt
|
|
175
|
+
das Element schlicht permanent sichtbar (kein "both"-Fill ohne aktive Timeline, daher
|
|
176
|
+
reicht der @supports-Block allein als Fallback, kein zusätzlicher Code nötig).
|
|
177
|
+
Für clip-path-Formen (Kreis/Wipe/Split/Zoom/Expand), einen Einmal-Modus (--once) und
|
|
178
|
+
einen JS-Fallback siehe helpers/reveal.css (.ncss-reveal) - dieselbe Idee als
|
|
179
|
+
eigenständige, größere Variante, .ncss-animate-on-scroll bleibt der schlanke Kurzweg. */
|
|
180
|
+
@supports (animation-timeline: view()) {
|
|
181
|
+
.ncss-animate-on-scroll {
|
|
182
|
+
animation: ncss-fade-in var(--ncss-motion-duration) linear both;
|
|
183
|
+
animation-timeline: view();
|
|
184
|
+
animation-range: entry 0% cover 30%;
|
|
185
|
+
}
|
|
186
|
+
.ncss-animate-on-scroll--slide-up {
|
|
187
|
+
animation: ncss-slide-in-up var(--ncss-motion-duration-slow) linear both;
|
|
188
|
+
animation-timeline: view();
|
|
189
|
+
animation-range: entry 0% cover 30%;
|
|
190
|
+
}
|
|
191
|
+
.ncss-animate-on-scroll--scale {
|
|
192
|
+
animation: ncss-scale-in var(--ncss-motion-duration) linear both;
|
|
193
|
+
animation-timeline: view();
|
|
194
|
+
animation-range: entry 0% cover 30%;
|
|
195
|
+
}
|
|
196
|
+
.ncss-animate-on-scroll--slide-left {
|
|
197
|
+
animation: ncss-slide-in-left var(--ncss-motion-duration-slow) linear both;
|
|
198
|
+
animation-timeline: view();
|
|
199
|
+
animation-range: entry 0% cover 30%;
|
|
200
|
+
}
|
|
201
|
+
.ncss-animate-on-scroll--slide-right {
|
|
202
|
+
animation: ncss-slide-in-right var(--ncss-motion-duration-slow) linear both;
|
|
203
|
+
animation-timeline: view();
|
|
204
|
+
animation-range: entry 0% cover 30%;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Ecken, Rahmen, Schatten (Layer "helpers"). Bewusst als eigenständige, allgemeine
|
|
3
|
+
* Utilities statt in Komponenten wie card.css eingebacken - ob etwas abgerundet ist,
|
|
4
|
+
* einen Rahmen hat, einen Schatten (und ob der beim Hover wächst), ist eine
|
|
5
|
+
* gestalterische Entscheidung, keine Eigenschaft, die eine Komponente für einen
|
|
6
|
+
* vorschreiben sollte. Frei kombinierbar auf JEDEM Element, nicht nur Cards - z.B. genauso
|
|
7
|
+
* auf einem Bild, einem eigenen Panel oder einer Media-Query-freien Sektion.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* --- Ecken --------------------------------------------------------------------------- */
|
|
11
|
+
.ncss-radius-sm { border-radius: var(--ncss-radius-sm); }
|
|
12
|
+
.ncss-radius-md { border-radius: var(--ncss-radius-md); }
|
|
13
|
+
.ncss-radius-lg { border-radius: var(--ncss-radius-lg); }
|
|
14
|
+
.ncss-radius-full { border-radius: var(--ncss-radius-full); }
|
|
15
|
+
.ncss-radius-none { border-radius: 0; }
|
|
16
|
+
|
|
17
|
+
/* Rundet ab, AUSSER das Element berührt gerade beide Bildschirmränder gleichzeitig (z.B.
|
|
18
|
+
eine Karte, die auf Mobile edge-to-edge geht, aber auf Desktop Außenabstand hat) - dann
|
|
19
|
+
automatisch 0, ganz ohne @media/Breakpoint. Klassischer Trick (Ben Frain/CSS-Tricks,
|
|
20
|
+
"Conditional Border Radius"), Formel + Erklärung in tokens.css
|
|
21
|
+
(--ncss-radius-adaptive-sm/md/lg) - hier nur die fertigen Klassen. Anders als bei einer
|
|
22
|
+
echten @container-Abfrage bezieht sich das auf den ECHTEN Browser-Viewport, nicht den
|
|
23
|
+
eigenen Container - für "berührt den Bildschirmrand" ist das genau richtig, hilft aber
|
|
24
|
+
NICHT innerhalb eines schmaleren, selbst scrollenden Unterbereichs. Demo:
|
|
25
|
+
demo/stacked-cards.html, Handbuch: docs/de/cards.html. */
|
|
26
|
+
.ncss-radius-adaptive-sm { border-radius: var(--ncss-radius-adaptive-sm); }
|
|
27
|
+
.ncss-radius-adaptive-md { border-radius: var(--ncss-radius-adaptive-md); }
|
|
28
|
+
.ncss-radius-adaptive-lg { border-radius: var(--ncss-radius-adaptive-lg); }
|
|
29
|
+
|
|
30
|
+
/* --- Rahmen -------------------------------------------------------------------------- */
|
|
31
|
+
.ncss-border {
|
|
32
|
+
border: var(--ncss-border-width) solid var(--ncss-color-border);
|
|
33
|
+
}
|
|
34
|
+
.ncss-border-none {
|
|
35
|
+
border: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* --- Schatten ------------------------------------------------------------------------
|
|
39
|
+
Eigene Stufen statt an eine Komponente gebunden (z.B. war .ncss-card--elevated früher
|
|
40
|
+
nur innerhalb von card.css nutzbar) - .ncss-shadow-lg wirkt genauso auf einem Bild, einem
|
|
41
|
+
Popover-artigen eigenen Panel usw. */
|
|
42
|
+
.ncss-shadow-sm { box-shadow: var(--ncss-shadow-sm); }
|
|
43
|
+
.ncss-shadow-md { box-shadow: var(--ncss-shadow-md); }
|
|
44
|
+
.ncss-shadow-lg { box-shadow: var(--ncss-shadow-lg); }
|
|
45
|
+
.ncss-shadow-none { box-shadow: none; }
|
|
46
|
+
|
|
47
|
+
/* Schatten wächst beim Hover (z.B. von sm auf md) - eigenständig von der Basis-Schatten-
|
|
48
|
+
Klasse, damit die Ausgangsstufe frei wählbar bleibt. Markup:
|
|
49
|
+
<div class="ncss-card ncss-shadow-sm ncss-shadow-hover-md">...</div> */
|
|
50
|
+
.ncss-shadow-hover-sm,
|
|
51
|
+
.ncss-shadow-hover-md,
|
|
52
|
+
.ncss-shadow-hover-lg {
|
|
53
|
+
transition: box-shadow var(--ncss-motion-duration) var(--ncss-motion-easing);
|
|
54
|
+
}
|
|
55
|
+
/* Nur Geräte mit echtem Zeigegerät (Maus/Trackpad) - siehe README "Touch-Geräte haben
|
|
56
|
+
kein :hover". Rein dekorativ (Schatten-Vertiefung), kein Touch-Äquivalent nötig - eine
|
|
57
|
+
:active-Variante würde nur beim Loslassen wieder verschwinden, ohne echten Zweck auf
|
|
58
|
+
einer nicht-klickbaren Karte. */
|
|
59
|
+
@media (hover: hover) and (pointer: fine) {
|
|
60
|
+
.ncss-shadow-hover-sm:hover { box-shadow: var(--ncss-shadow-sm); }
|
|
61
|
+
.ncss-shadow-hover-md:hover { box-shadow: var(--ncss-shadow-md); }
|
|
62
|
+
.ncss-shadow-hover-lg:hover { box-shadow: var(--ncss-shadow-lg); }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* --- Blend-Modi -----------------------------------------------------------------------
|
|
66
|
+
1:1-Utilities für mix-blend-mode (Element blendet mit dem, was DAHINTER liegt - für ein
|
|
67
|
+
Overlay-Bild/Farbfläche über einem Foto o.ä.). Kein Token dahinter, reine CSS-Keywords -
|
|
68
|
+
deshalb hier als vollständige Aufzählung statt einer kuratierten Teilmenge, jede Klasse
|
|
69
|
+
genau eine Deklaration. background-blend-mode (Blend NUR zwischen den eigenen background-
|
|
70
|
+
Ebenen desselben Elements, nicht mit dahinterliegendem Seiteninhalt) ist ein anderer Fall
|
|
71
|
+
mit anderem Einsatzzweck - siehe components/effects.css' --ncss-grain-blend für ein
|
|
72
|
+
Beispiel, wo genau das gebraucht wird. */
|
|
73
|
+
.ncss-blend-multiply { mix-blend-mode: multiply; }
|
|
74
|
+
.ncss-blend-screen { mix-blend-mode: screen; }
|
|
75
|
+
.ncss-blend-overlay { mix-blend-mode: overlay; }
|
|
76
|
+
.ncss-blend-darken { mix-blend-mode: darken; }
|
|
77
|
+
.ncss-blend-lighten { mix-blend-mode: lighten; }
|
|
78
|
+
.ncss-blend-color-dodge { mix-blend-mode: color-dodge; }
|
|
79
|
+
.ncss-blend-color-burn { mix-blend-mode: color-burn; }
|
|
80
|
+
.ncss-blend-hard-light { mix-blend-mode: hard-light; }
|
|
81
|
+
.ncss-blend-soft-light { mix-blend-mode: soft-light; }
|
|
82
|
+
.ncss-blend-difference { mix-blend-mode: difference; }
|
|
83
|
+
.ncss-blend-exclusion { mix-blend-mode: exclusion; }
|
|
84
|
+
.ncss-blend-hue { mix-blend-mode: hue; }
|
|
85
|
+
.ncss-blend-saturation { mix-blend-mode: saturation; }
|
|
86
|
+
.ncss-blend-color { mix-blend-mode: color; }
|
|
87
|
+
.ncss-blend-luminosity { mix-blend-mode: luminosity; }
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - Textumfluss (Layer "helpers"): Text soll um ein Element (typischerweise ein Bild)
|
|
3
|
+
* herumfließen. Es gibt dafür KEINEN moderneren Ersatz - Grid/Flexbox positionieren
|
|
4
|
+
* Elemente NEBENEINANDER, lassen Text aber nicht dynamisch um eine Form herumfließen. Der
|
|
5
|
+
* vermeintliche Nachfolger (CSS Exclusions, wrap-flow/wrap-through) ist nie in Browsern
|
|
6
|
+
* gelandet (nur ein toter Adobe/Microsoft-Prototyp von ~2012, MDN hat dafür keine Seite).
|
|
7
|
+
* float bleibt also der richtige, nicht "veraltete" Werkzeug für GENAU diesen Zweck - die
|
|
8
|
+
* "float ist schlecht"-Kritik gilt für Seiten-LAYOUT (dafür Grid/Flexbox nutzen), nicht für
|
|
9
|
+
* Textumfluss.
|
|
10
|
+
*
|
|
11
|
+
* Responsive über Container Queries statt Viewport-Breakpoint: erst ab einer gewissen
|
|
12
|
+
* Breite des UMGEBENDEN Containers wird tatsächlich gefloatet - bei schmalem Container
|
|
13
|
+
* (z.B. eine Sidebar) bleibt das Bild ein normaler Block, Text quetscht sich sonst in eine
|
|
14
|
+
* unlesbar schmale Restspalte. Braucht einen Vorfahren mit container-type: inline-size
|
|
15
|
+
* (z.B. .ncss-container aus helpers/layout.css).
|
|
16
|
+
*
|
|
17
|
+
* Markup: <img class="ncss-float-start" src="..." alt="...">Text fließt drumherum...
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
.ncss-float-start,
|
|
21
|
+
.ncss-float-end {
|
|
22
|
+
max-width: var(--ncss-float-max-width);
|
|
23
|
+
margin-block-end: var(--ncss-space-sm);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* -- ncss container-query: float-wrap (28rem) -- */
|
|
27
|
+
@container ncss-container (min-width: 28rem) {
|
|
28
|
+
.ncss-float-start {
|
|
29
|
+
float: inline-start;
|
|
30
|
+
margin-inline-end: var(--ncss-space-md);
|
|
31
|
+
}
|
|
32
|
+
.ncss-float-end {
|
|
33
|
+
float: inline-end;
|
|
34
|
+
margin-inline-start: var(--ncss-space-md);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ncss-clear {
|
|
39
|
+
clear: both;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* --- Gefloatetes Element, das zu EINER Seite bis zum Bildschirmrand ausbricht -----------
|
|
43
|
+
Kombiniert Textumfluss (oben) mit dem Bleed-Trick aus helpers/layout.css
|
|
44
|
+
(.ncss-bleed-start/-end) - beide EINZELN lassen sich NICHT einfach kombinieren (per
|
|
45
|
+
echtem Test geprüft): .ncss-bleed-*'s Breiten-Rechnung setzt voraus, dass das Element im
|
|
46
|
+
normalen Fluss mit width:auto "den verfügbaren Platz füllt" - ein Float mit width:auto
|
|
47
|
+
verhält sich stattdessen "shrink-to-fit" (schrumpft auf den Inhalt), die Box kollabierte
|
|
48
|
+
im Test auf 0 Breite. Deshalb eine eigene, dedizierte Klasse mit EXPLIZITER width statt
|
|
49
|
+
der impliziten Breiten-Berechnung.
|
|
50
|
+
shape-outside NICHT nötig: ein rechteckiger Float wickelt Text per Spezifikation bereits
|
|
51
|
+
um seine eigene Margin-Box - der Bleed-Rand (negative Margin auf der Außenseite) wird
|
|
52
|
+
dadurch automatisch mitberücksichtigt, ganz ohne zusätzliche Deklaration (per echtem Test
|
|
53
|
+
bestätigt: Ergebnis identisch mit/ohne shape-outside:margin-box).
|
|
54
|
+
Dieselbe float-wrap-Schwelle (28rem) wie .ncss-float-start/-end: auf schmalem Container
|
|
55
|
+
ein normaler, nicht ausbrechender Block statt eines kaputt wirkenden Bleeds.
|
|
56
|
+
Markup: <img class="ncss-float-bleed-start" src="..." alt="...">Text fließt drumherum,
|
|
57
|
+
das Bild bricht nach links bis zum Bildschirmrand aus. */
|
|
58
|
+
.ncss-float-bleed-start,
|
|
59
|
+
.ncss-float-bleed-end {
|
|
60
|
+
width: var(--ncss-float-max-width);
|
|
61
|
+
margin-block-end: var(--ncss-space-sm);
|
|
62
|
+
}
|
|
63
|
+
/* -- ncss container-query: float-wrap (28rem) -- */
|
|
64
|
+
@container ncss-container (min-width: 28rem) {
|
|
65
|
+
.ncss-float-bleed-start {
|
|
66
|
+
float: inline-start;
|
|
67
|
+
margin-inline-end: var(--ncss-space-md);
|
|
68
|
+
margin-inline-start: calc(50% - 50vw);
|
|
69
|
+
}
|
|
70
|
+
.ncss-float-bleed-end {
|
|
71
|
+
float: inline-end;
|
|
72
|
+
margin-inline-start: var(--ncss-space-md);
|
|
73
|
+
margin-inline-end: calc(50% - 50vw);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Nicht-rechteckiges Umfließen: Text folgt der tatsächlichen Form statt der rechteckigen
|
|
78
|
+
Bounding Box. shape-outside wirkt NUR auf gefloateten Elementen (siehe oben) - hier
|
|
79
|
+
zusätzlich clip-path, damit das Bild auch VISUELL rund ist, nicht nur der Textfluss
|
|
80
|
+
(sonst würde Text um einen unsichtbaren Kreis fließen, während das Bild weiter eckig
|
|
81
|
+
aussieht). */
|
|
82
|
+
.ncss-float-shape-circle {
|
|
83
|
+
shape-outside: circle(50%);
|
|
84
|
+
clip-path: circle(50%);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* --- Verhalten bei schmalem Container ("wird zum Block") --------------------------------
|
|
88
|
+
Unterhalb der float-wrap-Schwelle (28rem) floatet .ncss-float-start/-end nicht mehr,
|
|
89
|
+
sondern wird ein normaler Block - per Default LINKSBÜNDIG (einfach die normale
|
|
90
|
+
Flussrichtung, keine eigene Regel nötig). Das ist nicht immer richtig: manchmal soll das
|
|
91
|
+
Bild in diesem schmalen Zustand zentriert wirken, manchmal die volle Breite ausfüllen.
|
|
92
|
+
Bewusst NICHT auf .ncss-float-* beschränkt - dieselben zwei Modifier funktionieren an
|
|
93
|
+
JEDEM Element, das unterhalb einer schmalen Container-Breite anders ausgerichtet werden
|
|
94
|
+
soll, auch ganz ohne Float (z.B. ein eigenständiges Bild in einer Sidebar-Karte).
|
|
95
|
+
Markup: <img class="ncss-float-start ncss-center-narrow" ...> oder eigenständig
|
|
96
|
+
<img class="ncss-full-narrow" ...> */
|
|
97
|
+
.ncss-center-narrow {
|
|
98
|
+
margin-inline: auto;
|
|
99
|
+
}
|
|
100
|
+
.ncss-full-narrow {
|
|
101
|
+
width: 100%;
|
|
102
|
+
max-width: none;
|
|
103
|
+
}
|
|
104
|
+
/* -- ncss container-query: float-wrap (28rem) -- */
|
|
105
|
+
@container ncss-container (min-width: 28rem) {
|
|
106
|
+
/* Ab hier übernimmt (bei .ncss-float-start/-end) wieder der Float die Breite/
|
|
107
|
+
Ausrichtung - die beiden Modifier oben gelten bewusst nur unterhalb der Schwelle. */
|
|
108
|
+
.ncss-center-narrow {
|
|
109
|
+
margin-inline: 0;
|
|
110
|
+
}
|
|
111
|
+
.ncss-full-narrow {
|
|
112
|
+
width: auto;
|
|
113
|
+
max-width: var(--ncss-float-max-width);
|
|
114
|
+
}
|
|
115
|
+
/* Zusammen mit einem Float: .ncss-center-narrow (margin-inline:auto bzw. 0) und
|
|
116
|
+
.ncss-full-narrow (width) stehen weiter unten in der Datei als die Float-Regeln und
|
|
117
|
+
würden deren Abstand zum Text bzw. die Bleed-Breite überschreiben (Bild klebte ohne
|
|
118
|
+
Abstand am Text) - ab der Schwelle gelten deshalb wieder die Float-Werte. */
|
|
119
|
+
.ncss-center-narrow:is(.ncss-float-start, .ncss-float-bleed-start) {
|
|
120
|
+
margin-inline-end: var(--ncss-space-md);
|
|
121
|
+
}
|
|
122
|
+
.ncss-center-narrow:is(.ncss-float-end, .ncss-float-bleed-end) {
|
|
123
|
+
margin-inline-start: var(--ncss-space-md);
|
|
124
|
+
}
|
|
125
|
+
.ncss-center-narrow.ncss-float-bleed-start {
|
|
126
|
+
margin-inline-start: calc(50% - 50vw);
|
|
127
|
+
}
|
|
128
|
+
.ncss-center-narrow.ncss-float-bleed-end {
|
|
129
|
+
margin-inline-end: calc(50% - 50vw);
|
|
130
|
+
}
|
|
131
|
+
.ncss-full-narrow:is(.ncss-float-bleed-start, .ncss-float-bleed-end) {
|
|
132
|
+
width: var(--ncss-float-max-width);
|
|
133
|
+
max-width: none;
|
|
134
|
+
}
|
|
135
|
+
}
|