@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,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss - View-Transitions-Enhancement für .ncss-accordion-split (kein CSS-Layer, reines
|
|
3
|
+
* opt-in JS). Der Bildwechsel in .ncss-accordion-split-media läuft heute per CSS
|
|
4
|
+
* :has()-Trick als harter display:none/block-Schnitt, ohne Übergang (User-Report:
|
|
5
|
+
* "fehlen Transitions ... Bild sollte einfaden oder gleiten"). Same-Document View
|
|
6
|
+
* Transitions (document.startViewTransition()) sind der dafür vorgesehene native
|
|
7
|
+
* Mechanismus - anders als die bereits vorhandenen Cross-Document View Transitions
|
|
8
|
+
* (page-transitions.css) gibt es dafür KEINE rein deklarative CSS-Form, ein kurzer
|
|
9
|
+
* JS-Trigger ist unvermeidlich (Stand jetzt, Spec-bedingt).
|
|
10
|
+
*
|
|
11
|
+
* Browser-Support (Stand August 2026, per Recherche + echtem Playwright-Test bestätigt:
|
|
12
|
+
* `typeof document.startViewTransition === 'function'`): Chrome/Edge 111+, Safari 18+,
|
|
13
|
+
* Firefox 133+. Ohne Unterstützung bleibt der native, sofortige <details>-Toggle
|
|
14
|
+
* unverändert erhalten (`if (!document.startViewTransition) return` unten) - kein
|
|
15
|
+
* Funktionsverlust.
|
|
16
|
+
*
|
|
17
|
+
* MECHANIK: <details> feuert (Stand jetzt) KEIN abbrechbares `beforetoggle` (anders als
|
|
18
|
+
* <dialog>/Popover - siehe whatwg/html#9743, offener Spec-Issue, per Recherche
|
|
19
|
+
* bestätigt) - der native Toggle lässt sich deshalb nicht darüber abfangen. Funktionierender
|
|
20
|
+
* Weg: Klick auf <summary> abfangen und per `preventDefault()` verhindern (das IST
|
|
21
|
+
* möglich, `<summary>`s Aktivierungsverhalten ist abbrechbar), dann `.open` MANUELL
|
|
22
|
+
* innerhalb von `document.startViewTransition(...)` umschalten - dadurch sieht die
|
|
23
|
+
* View-Transitions-API einen echten Vorher-/Nachher-Zustand. Per echtem Test in
|
|
24
|
+
* Chromium/WebKit/Firefox bestätigt: das funktioniert auch für EXKLUSIVE Gruppen
|
|
25
|
+
* (`<details name="...">`) - das Schließen der Geschwister-Punkte passiert weiterhin
|
|
26
|
+
* automatisch, obwohl `.open` per JS statt durch echten Nutzer-Klick gesetzt wird (Teil
|
|
27
|
+
* des <details>-eigenen Algorithmus, nicht an "war es ein echter Klick" gebunden).
|
|
28
|
+
*
|
|
29
|
+
* NAME vs. KLASSE: `view-transition-name` muss unter simultan sichtbaren Elementen
|
|
30
|
+
* EINDEUTIG sein (Spec) - bei mehreren .ncss-accordion-split-Instanzen auf derselben
|
|
31
|
+
* Seite bekommt jede ihren eigenen Namen (Instanz-Index). Für die Presets (siehe unten)
|
|
32
|
+
* reicht ein fester Name aber NICHT aus, weil CSS' `::view-transition-group()`-Selektor
|
|
33
|
+
* nur exakte Namen oder den Universalselektor `*` kennt (per Recherche + echtem Test
|
|
34
|
+
* bestätigt: KEIN Scoping über eine DOM-Vorfahren-Bedingung wie `[data-transition]
|
|
35
|
+
* ::view-transition-group(...)` möglich, die Pseudo-Elemente hängen an einem eigenen,
|
|
36
|
+
* von :root ausgehenden Baum, nicht am normalen DOM). Deshalb zusätzlich
|
|
37
|
+
* `view-transition-class` (Level 2, per echtem Test in allen drei Engines bestätigt:
|
|
38
|
+
* `::view-transition-group(*.klassenname)` trifft nur Gruppen mit dieser Klasse, egal
|
|
39
|
+
* welchen eindeutigen Namen sie einzeln tragen) - das eigentliche Preset-Styling in
|
|
40
|
+
* accordion-split.css zielt auf die KLASSE, nicht auf den Namen.
|
|
41
|
+
*
|
|
42
|
+
* NICHT `.ncss-accordion-split`-spezifisch geschrieben, obwohl aktuell nur dafür verkabelt
|
|
43
|
+
* - `enhanceExclusiveDetailsGroup()` funktioniert an jeder `<details name="...">`-Gruppe
|
|
44
|
+
* mit einem Medien-Element, das per View Transition wechseln soll. Künftige Komponenten
|
|
45
|
+
* mit demselben Bedürfnis (z.B. ein Tab-Wechsler) können dieselbe Funktion wiederverwenden.
|
|
46
|
+
*/
|
|
47
|
+
(function () {
|
|
48
|
+
"use strict";
|
|
49
|
+
// Bewegung reduzieren? Systemeinstellung ODER ausdrückliche Wahl am <html>
|
|
50
|
+
// (data-motion="reduce"/"full", gesetzt von js/preferences.js) - "full" hebt ein
|
|
51
|
+
// System-"reduce" nur als bewusste Nutzerwahl auf, nie von selbst.
|
|
52
|
+
function ncssReducedMotion() {
|
|
53
|
+
var choice = document.documentElement.getAttribute("data-motion");
|
|
54
|
+
if (choice === "reduce") return true;
|
|
55
|
+
if (choice === "full") return false;
|
|
56
|
+
return !!(window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!document.startViewTransition) return;
|
|
60
|
+
if (ncssReducedMotion()) return;
|
|
61
|
+
|
|
62
|
+
function enhanceExclusiveDetailsGroup(container, itemSelector, mediaItemSelector, namePrefix, transitionClass) {
|
|
63
|
+
var mediaItems = container.querySelectorAll(mediaItemSelector);
|
|
64
|
+
mediaItems.forEach(function (el) {
|
|
65
|
+
el.style.viewTransitionName = namePrefix;
|
|
66
|
+
if (transitionClass) el.style.viewTransitionClass = transitionClass;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
var summaries = container.querySelectorAll(itemSelector + " > summary");
|
|
70
|
+
summaries.forEach(function (summary) {
|
|
71
|
+
summary.addEventListener("click", function (event) {
|
|
72
|
+
var details = summary.parentElement;
|
|
73
|
+
event.preventDefault();
|
|
74
|
+
document.startViewTransition(function () {
|
|
75
|
+
details.open = !details.open;
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Fortlaufender Instanz-Zähler statt forEach-Index - auch später eingefügte Container
|
|
82
|
+
// (siehe scan() unten) bekommen so einen seitenweit eindeutigen view-transition-name.
|
|
83
|
+
var containerCount = 0;
|
|
84
|
+
function init(container) {
|
|
85
|
+
var containerIndex = containerCount++;
|
|
86
|
+
var preset = container.dataset.transition || "";
|
|
87
|
+
var transitionClass = preset === "slide" ? "ncss-vt-slide" : preset === "3d" ? "ncss-vt-3d" : "";
|
|
88
|
+
enhanceExclusiveDetailsGroup(
|
|
89
|
+
container,
|
|
90
|
+
".ncss-accordion-split-item",
|
|
91
|
+
".ncss-accordion-split-media > *",
|
|
92
|
+
"ncss-accordion-split-media-" + containerIndex,
|
|
93
|
+
transitionClass
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Dynamische Inhalte (htmx, fetch+innerHTML, REDAXO-Frontend-Editing): scan() ist
|
|
98
|
+
// idempotent - bereits verarbeitete Elemente merkt sich ein WeakSet, bewusst KEIN
|
|
99
|
+
// data-Attribut (per innerHTML kopiertes Markup trüge sonst eine veraltete Markierung
|
|
100
|
+
// mit). Läuft beim Laden und bei jedem "ncss-content-change"-Event (detail.root = neu
|
|
101
|
+
// eingefügtes Element, ohne Angabe das ganze Dokument), siehe js/content-observer.js.
|
|
102
|
+
var SELECTOR = ".ncss-accordion-split-container";
|
|
103
|
+
var seen = new WeakSet();
|
|
104
|
+
function scan(root) {
|
|
105
|
+
if (!root || !root.querySelectorAll) return;
|
|
106
|
+
var list = Array.prototype.slice.call(root.querySelectorAll(SELECTOR));
|
|
107
|
+
if (root.matches && root.matches(SELECTOR)) list.unshift(root);
|
|
108
|
+
list.forEach(function (el) {
|
|
109
|
+
if (seen.has(el)) return;
|
|
110
|
+
seen.add(el);
|
|
111
|
+
init(el);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
scan(document);
|
|
115
|
+
document.addEventListener("ncss-content-change", function (event) {
|
|
116
|
+
scan((event.detail && event.detail.root) || document);
|
|
117
|
+
});
|
|
118
|
+
})();
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NativeCSS - schließt offene <wa-dropdown>/<wa-popover>-Panels, sobald die Seite
|
|
3
|
+
* gescrollt wird. Web Awesomes Popup-Baustein hält ein offenes Panel ABSICHTLICH
|
|
4
|
+
* während des Scrollens an seinem Anker positioniert (siehe vendor/webawesome/dist-cdn/
|
|
5
|
+
* skills/webawesome/references/components/popup.md: "keep them positioned together as
|
|
6
|
+
* the page scrolls") - sitzt der Anker in einer position:sticky-Kopfleiste, kann diese
|
|
7
|
+
* ständige Neuberechnung sichtbar glitchen (User-Report: Text/Panel "verdoppelte" sich
|
|
8
|
+
* beim Scrollen wie ein Glitch-Effekt) - betraf sowohl <wa-dropdown> als auch
|
|
9
|
+
* <wa-popover> gleichermaßen, unabhängig von backdrop-filter/Glassmorphism (die dafür
|
|
10
|
+
* zuerst verantwortlich vermutete Ursache, siehe SKILL.md Punkt 21) - ein generelles
|
|
11
|
+
* Web-Awesome-/Floating-UI-Verhalten, kein ncss-CSS-Problem, deshalb hier nicht per CSS
|
|
12
|
+
* lösbar. Schließen statt weiter mitpositionieren ist dieselbe, verbreitete Lösung wie
|
|
13
|
+
* bei den meisten Mega-/Dropdown-Menüs anderer Sites - kein Repositionierungs-Kampf
|
|
14
|
+
* mehr, weil das Panel dann einfach nicht mehr da ist.
|
|
15
|
+
*
|
|
16
|
+
* Einbindung (nur auf Seiten mit <wa-dropdown>/<wa-popover> nötig):
|
|
17
|
+
* <script src="../components/wa-close-on-scroll.js" defer></script>
|
|
18
|
+
*
|
|
19
|
+
* Sucht zusätzlich gezielt INNERHALB jedes <ncss-container> (siehe ncss-container.js) -
|
|
20
|
+
* dessen Inhalt liegt in einem Shadow Root, den ein normales querySelectorAll() nicht
|
|
21
|
+
* durchquert. Bewusst NICHT der generische "jedes Element auf .shadowRoot prüfen"-Ansatz
|
|
22
|
+
* wie in den anderen Fallback-Scripts (deren Suche läuft nur EINMAL beim Laden) - dieser
|
|
23
|
+
* Handler läuft bei JEDEM Scroll-Event, ein voller DOM-Walk wäre dort spürbar teurer als
|
|
24
|
+
* die gezielte Suche nach der einzigen Quelle von Shadow Roots, die auf einer
|
|
25
|
+
* ncss-Seite realistisch vorkommt. Zusätzlich jetzt per requestAnimationFrame gedrosselt
|
|
26
|
+
* (vorher ungedrosselt bei jedem einzelnen Scroll-Event) - dieselbe Technik wie die
|
|
27
|
+
* übrigen Scroll-Fallback-Scripts.
|
|
28
|
+
*/
|
|
29
|
+
(function () {
|
|
30
|
+
"use strict";
|
|
31
|
+
|
|
32
|
+
function closeOpenPopups(root) {
|
|
33
|
+
root.querySelectorAll("wa-dropdown[open], wa-popover[open]").forEach((el) => {
|
|
34
|
+
el.open = false;
|
|
35
|
+
});
|
|
36
|
+
root.querySelectorAll("ncss-container").forEach((container) => {
|
|
37
|
+
if (container.shadowRoot) {
|
|
38
|
+
closeOpenPopups(container.shadowRoot);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var ticking = false;
|
|
44
|
+
document.addEventListener(
|
|
45
|
+
"scroll",
|
|
46
|
+
() => {
|
|
47
|
+
if (ticking) return;
|
|
48
|
+
ticking = true;
|
|
49
|
+
requestAnimationFrame(() => {
|
|
50
|
+
closeOpenPopups(document);
|
|
51
|
+
ticking = false;
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
{ passive: true },
|
|
55
|
+
);
|
|
56
|
+
})();
|
package/dist/ncss.css
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ncss (native css) - eigenständiges Design System, kein UIkit-Erbe.
|
|
3
|
+
*
|
|
4
|
+
* Aufbau (in genau dieser Reihenfolge geladen und in Cascade Layers dieser Priorität,
|
|
5
|
+
* niedrig -> hoch): tokens < reset < base < helpers < components < webawesome-bridge <
|
|
6
|
+
* browser-fixes. Der Layer "webawesome-bridge" bleibt HIER registriert, auch wenn diese
|
|
7
|
+
* Datei selbst nichts mehr hineinlädt (siehe unten, Web Awesome ist komplett opt-in) -
|
|
8
|
+
* die Layer-ORDER ist seitenweit global, ein Projekt, das integrations/
|
|
9
|
+
* webawesome-bridge.css später selbst einbindet, landet automatisch an genau dieser
|
|
10
|
+
* Prioritätsposition, unabhängig von der eigenen <link>-Reihenfolge.
|
|
11
|
+
*
|
|
12
|
+
* @layer regelt die Priorität EXPLIZIT statt über Selektor-Spezifität/!important zu
|
|
13
|
+
* kämpfen (siehe uikit_theme_builder diese Session: genau das war die Ursache mehrerer
|
|
14
|
+
* Bugs - Bridge-CSS vs. info_center, revert-Hacks etc.). Eine spätere Layer-Regel
|
|
15
|
+
* gewinnt immer gegen eine frühere, unabhängig von Selektor-Spezifität. Unlayered CSS
|
|
16
|
+
* (z.B. Inline-Styles, ein <style> ohne @layer) schlägt IMMER jede Layer-Regel - das
|
|
17
|
+
* ist Absicht der Spec und praktisch: Utility-Overrides im Markup funktionieren immer.
|
|
18
|
+
*
|
|
19
|
+
* Die wa-*-Namen vorne (wa-native, wa-base, ...) sind Web Awesomes EIGENE Layer (siehe
|
|
20
|
+
* vendor/webawesome/dist-cdn/styles/layers.css) - hier mit aufgeführt und vor unsere
|
|
21
|
+
* eigenen Layer gesetzt, damit die Priorität GARANTIERT unabhängig von der <link>-
|
|
22
|
+
* Reihenfolge im HTML ist (die Layer-Order ist seitenweit global, nicht pro Stylesheet -
|
|
23
|
+
* ohne diese Zeile würde gewinnen, welche Bibliothek zufällig zuerst geladen wird). So
|
|
24
|
+
* schlägt integrations/webawesome-bridge.css IMMER Web Awesomes eigenes Default-Theme,
|
|
25
|
+
* ganz ohne !important.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
@layer wa-native, wa-base, wa-utilities, wa-color-palette, wa-color-variant, wa-theme, wa-theme-dimension, wa-theme-overrides,
|
|
29
|
+
tokens, reset, base, helpers, components, webawesome-bridge, browser-fixes;
|
|
30
|
+
|
|
31
|
+
@import url("colors.css") layer(tokens);
|
|
32
|
+
@import url("tokens.css") layer(tokens);
|
|
33
|
+
@import url("reset.css") layer(reset);
|
|
34
|
+
@import url("base.css") layer(base);
|
|
35
|
+
|
|
36
|
+
@import url("helpers/icons.css") layer(helpers);
|
|
37
|
+
@import url("helpers/layout.css") layer(helpers);
|
|
38
|
+
@import url("helpers/typography.css") layer(helpers);
|
|
39
|
+
@import url("helpers/a11y.css") layer(helpers);
|
|
40
|
+
@import url("helpers/visibility.css") layer(helpers);
|
|
41
|
+
@import url("helpers/forms.css") layer(helpers);
|
|
42
|
+
@import url("helpers/tables.css") layer(helpers);
|
|
43
|
+
@import url("helpers/media.css") layer(helpers);
|
|
44
|
+
@import url("helpers/scroll.css") layer(helpers);
|
|
45
|
+
@import url("helpers/scroll-shadow.css") layer(helpers);
|
|
46
|
+
@import url("helpers/surfaces.css") layer(helpers);
|
|
47
|
+
@import url("helpers/float.css") layer(helpers);
|
|
48
|
+
@import url("helpers/animations.css") layer(helpers);
|
|
49
|
+
@import url("helpers/reveal.css") layer(helpers);
|
|
50
|
+
@import url("helpers/elevation.css") layer(helpers);
|
|
51
|
+
|
|
52
|
+
@import url("components/hero.css") layer(components);
|
|
53
|
+
@import url("components/search.css") layer(components);
|
|
54
|
+
@import url("components/livesearch.css") layer(components);
|
|
55
|
+
@import url("components/select.css") layer(components);
|
|
56
|
+
@import url("components/input-group.css") layer(components);
|
|
57
|
+
@import url("components/combobox.css") layer(components);
|
|
58
|
+
@import url("components/placeholder.css") layer(components);
|
|
59
|
+
@import url("components/sparkline.css") layer(components);
|
|
60
|
+
@import url("components/video.css") layer(components);
|
|
61
|
+
@import url("components/audio.css") layer(components);
|
|
62
|
+
@import url("components/video-player.css") layer(components);
|
|
63
|
+
@import url("components/audio-player.css") layer(components);
|
|
64
|
+
@import url("components/scroll-video.css") layer(components);
|
|
65
|
+
@import url("components/scroll-frames.css") layer(components);
|
|
66
|
+
@import url("components/video-bg.css") layer(components);
|
|
67
|
+
@import url("components/video-text.css") layer(components);
|
|
68
|
+
@import url("components/video-float.css") layer(components);
|
|
69
|
+
@import url("components/video-card.css") layer(components);
|
|
70
|
+
@import url("components/card.css") layer(components);
|
|
71
|
+
@import url("components/split.css") layer(components);
|
|
72
|
+
@import url("components/tile.css") layer(components);
|
|
73
|
+
@import url("components/accordion-split.css") layer(components);
|
|
74
|
+
@import url("components/marginnote.css") layer(components);
|
|
75
|
+
@import url("components/slideshow.css") layer(components);
|
|
76
|
+
@import url("components/filter.css") layer(components);
|
|
77
|
+
@import url("components/dialog-close.css") layer(components);
|
|
78
|
+
@import url("components/theme-toggle.css") layer(components);
|
|
79
|
+
@import url("components/modal.css") layer(components);
|
|
80
|
+
@import url("components/lightbox.css") layer(components);
|
|
81
|
+
@import url("components/scroll-progress.css") layer(components);
|
|
82
|
+
@import url("components/scroll-stack.css") layer(components);
|
|
83
|
+
@import url("components/roadmap.css") layer(components);
|
|
84
|
+
@import url("components/topbar.css") layer(components);
|
|
85
|
+
@import url("components/off-canvas.css") layer(components);
|
|
86
|
+
@import url("components/nav.css") layer(components);
|
|
87
|
+
@import url("components/disclosure.css") layer(components);
|
|
88
|
+
@import url("components/badge.css") layer(components);
|
|
89
|
+
@import url("components/breadcrumb.css") layer(components);
|
|
90
|
+
@import url("components/subnav.css") layer(components);
|
|
91
|
+
@import url("components/lists.css") layer(components);
|
|
92
|
+
@import url("components/cover.css") layer(components);
|
|
93
|
+
@import url("components/overlay.css") layer(components);
|
|
94
|
+
@import url("components/footer.css") layer(components);
|
|
95
|
+
@import url("components/effects.css") layer(components);
|
|
96
|
+
@import url("components/spotlight.css") layer(components);
|
|
97
|
+
@import url("components/compare.css") layer(components);
|
|
98
|
+
@import url("components/expand-panels.css") layer(components);
|
|
99
|
+
@import url("components/command-palette.css") layer(components);
|
|
100
|
+
@import url("components/hovercard.css") layer(components);
|
|
101
|
+
@import url("components/notification.css") layer(components);
|
|
102
|
+
@import url("components/aurora.css") layer(components);
|
|
103
|
+
@import url("components/backdrop.css") layer(components);
|
|
104
|
+
@import url("components/code-block.css") layer(components);
|
|
105
|
+
@import url("components/events.css") layer(components);
|
|
106
|
+
@import url("components/downloads.css") layer(components);
|
|
107
|
+
@import url("components/curtain.css") layer(components);
|
|
108
|
+
@import url("components/scroll-horizontal.css") layer(components);
|
|
109
|
+
@import url("components/text-reveal.css") layer(components);
|
|
110
|
+
@import url("components/scrolly.css") layer(components);
|
|
111
|
+
@import url("components/count-up.css") layer(components);
|
|
112
|
+
@import url("components/marquee.css") layer(components);
|
|
113
|
+
@import url("components/reveal-pin.css") layer(components);
|
|
114
|
+
@import url("components/morph.css") layer(components);
|
|
115
|
+
@import url("components/tabs.css") layer(components);
|
|
116
|
+
@import url("components/tooltip.css") layer(components);
|
|
117
|
+
@import url("components/pagination.css") layer(components);
|
|
118
|
+
@import url("components/alert.css") layer(components);
|
|
119
|
+
@import url("components/avatar.css") layer(components);
|
|
120
|
+
@import url("components/tag.css") layer(components);
|
|
121
|
+
@import url("components/stat.css") layer(components);
|
|
122
|
+
@import url("components/empty-state.css") layer(components);
|
|
123
|
+
@import url("components/spinner.css") layer(components);
|
|
124
|
+
@import url("components/kbd.css") layer(components);
|
|
125
|
+
@import url("components/floating-label.css") layer(components);
|
|
126
|
+
@import url("components/segmented.css") layer(components);
|
|
127
|
+
@import url("components/pill-group.css") layer(components);
|
|
128
|
+
@import url("components/toolbar.css") layer(components);
|
|
129
|
+
@import url("components/rating.css") layer(components);
|
|
130
|
+
@import url("components/timeline.css") layer(components);
|
|
131
|
+
@import url("components/stepper.css") layer(components);
|
|
132
|
+
@import url("components/testimonial.css") layer(components);
|
|
133
|
+
@import url("components/pricing.css") layer(components);
|
|
134
|
+
@import url("components/leaders.css") layer(components);
|
|
135
|
+
@import url("components/comments.css") layer(components);
|
|
136
|
+
@import url("components/dropzone.css") layer(components);
|
|
137
|
+
@import url("components/countdown.css") layer(components);
|
|
138
|
+
@import url("components/back-to-top.css") layer(components);
|
|
139
|
+
@import url("components/app-shell.css") layer(components);
|
|
140
|
+
@import url("components/preferences.css") layer(components);
|
|
141
|
+
@import url("components/map.css") layer(components);
|
|
142
|
+
@import url("components/dropdown.css") layer(components);
|
|
143
|
+
@import url("components/table-sort.css") layer(components);
|
|
144
|
+
@import url("components/sortable.css") layer(components);
|
|
145
|
+
/* Weitere Komponenten folgen hier, je eine Datei.
|
|
146
|
+
JS liegt gesammelt unter js/, nicht neben dem jeweiligen Komponenten-CSS - separat
|
|
147
|
+
einbinden (<script src="ncss/js/command-fallback.js">) - generischer Fallback für
|
|
148
|
+
command/commandfor (Modal/Off-Canvas/Nav), nur nötig für Browser ohne native
|
|
149
|
+
Unterstützung, siehe die Datei selbst. */
|
|
150
|
+
|
|
151
|
+
/* Web Awesome/Font Awesome sind komplett OPT-IN - ncss.css importiert dafür bewusst
|
|
152
|
+
NICHTS (auch nicht die Bridge), damit ein Projekt ohne Web Awesome keine Zeile davon
|
|
153
|
+
ausliefert. Wird Web Awesome tatsächlich genutzt, integrations/webawesome-bridge.css
|
|
154
|
+
selbst zusätzlich laden (NACH ncss.css, wegen der Layer-Reihenfolge unten - die
|
|
155
|
+
@layer-Deklaration registriert "webawesome-bridge" bereits an der richtigen Stelle,
|
|
156
|
+
unabhängig davon, welche Datei tatsächlich etwas in diesen Layer einträgt):
|
|
157
|
+
<link rel="stylesheet" href="ncss.css">
|
|
158
|
+
<link rel="stylesheet" href="integrations/webawesome-bridge.css">
|
|
159
|
+
Siehe integrations/webawesome-bridge.css für das Token-Mapping,
|
|
160
|
+
integrations/fontawesome-font-display-fix.css für den separaten Font-Awesome-Fix
|
|
161
|
+
(ebenfalls opt-in, gleicher Ordner). */
|
|
162
|
+
|
|
163
|
+
/* Browser-spezifische Workarounds, immer zuletzt geladen (höchste Priorität) - siehe
|
|
164
|
+
browser-fixes.css für die Begründung, warum das eine eigene Datei ist. */
|
|
165
|
+
@import url("browser-fixes.css") layer(browser-fixes);
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NativeCSS - Seitenübergänge zwischen Navigationen (Cross-Document View Transitions).
|
|
3
|
+
* Eigene, OPT-IN Datei (wie theme.css) - NICHT Teil von ncss.css, weil das eine
|
|
4
|
+
* seitenweite Navigations-Entscheidung ist, kein wiederverwendbarer Baustein.
|
|
5
|
+
*
|
|
6
|
+
* Einbindung: auf JEDER Seite laden, zwischen der ein weicher Übergang erscheinen soll
|
|
7
|
+
* (Cross-Document View Transitions brauchen die Zustimmung BEIDER Seiten - Quelle UND
|
|
8
|
+
* Ziel der Navigation -, sonst bleibt es beim normalen, sofortigen Seitenwechsel):
|
|
9
|
+
* <link rel="stylesheet" href="page-transitions.css">
|
|
10
|
+
*
|
|
11
|
+
* Reines CSS, kein JavaScript, kein document.startViewTransition() nötig - @view-
|
|
12
|
+
* transition { navigation: auto } genügt, der Browser übernimmt Navigation-Erkennung
|
|
13
|
+
* und Screenshot-Vorher/Nachher selbst. Aktuell NICHT Baseline (Chromium-Familie und
|
|
14
|
+
* Safari 18.2+, Firefox noch in Arbeit, Stand dieser Recherche) - unbekannte @-Regeln
|
|
15
|
+
* werden von Browsern OHNE Unterstützung per CSS-Grundprinzip einfach ignoriert, kein
|
|
16
|
+
* @supports nötig, keine Auswirkung auf ältere Browser: die Navigation bleibt dort
|
|
17
|
+
* schlicht der normale, sofortige Seitenwechsel von vorher, kein Darstellungsfehler.
|
|
18
|
+
*
|
|
19
|
+
* Bekannte Konsolen-Meldung (kein ncss-Bug): "Unhandled Promise Rejection: AbortError:
|
|
20
|
+
* Skipping view transition because skipTransition() was called" - tritt (Stand jetzt
|
|
21
|
+
* v.a. in WebKit/Safari, bugs.webkit.org #289078) auf, wenn eine laufende Transition
|
|
22
|
+
* durch eine weitere Navigation übersprungen wird (typisch: schneller Zurück-/
|
|
23
|
+
* Vorwärts-Klick), spec-bedingt erwartet, betrifft die eigentliche Navigation nicht.
|
|
24
|
+
* Weil diese Datei bewusst rein deklarativ bleibt, hat die Seite selbst keine
|
|
25
|
+
* Referenz auf die Transition, um die Meldung per `.catch()` abzufangen - optionaler,
|
|
26
|
+
* separater Begleiter dafür: js/page-transitions-quiet.js (siehe dortiger
|
|
27
|
+
* Kommentar für die vollständige Erklärung/Quellen).
|
|
28
|
+
*
|
|
29
|
+
* NUR unter prefers-reduced-motion:no-preference aktiv - anders als die meisten
|
|
30
|
+
* Animationen hier (die global über reset.css gedrosselt werden) reagiert die View-
|
|
31
|
+
* Transitions-API NICHT von selbst auf prefers-reduced-motion, das @media-Gate hier ist
|
|
32
|
+
* deshalb nicht redundant, sondern notwendig.
|
|
33
|
+
*
|
|
34
|
+
* --- Mehrere Presets, nicht nur Kreuzblende --------------------------------------------
|
|
35
|
+
* Default (keine weitere Angabe) ist die Kreuzblende unten. Für ein anderes Preset auf
|
|
36
|
+
* einer bestimmten Seite den `types`-Deskriptor setzen - dafür die GESAMTE @view-
|
|
37
|
+
* transition-Regel (inkl. navigation: auto) in einem eigenen <style> NACH dieser Datei
|
|
38
|
+
* wiederholen, nicht nur `types` allein deklarieren (ob einzelne Deskriptoren über
|
|
39
|
+
* mehrere @view-transition-Regeln hinweg kaskadieren oder die ganze Regel ersetzt wird,
|
|
40
|
+
* ist nicht abschließend geklärt - die komplette Regel zu wiederholen ist in jedem Fall
|
|
41
|
+
* sicher, siehe demo/landing.html für ein Beispiel):
|
|
42
|
+
* @media (prefers-reduced-motion: no-preference) {
|
|
43
|
+
* @view-transition { navigation: auto; types: slide; }
|
|
44
|
+
* }
|
|
45
|
+
* Verfügbare Presets: `slide` (horizontal, wie ein Vorwärtsblättern), `zoom` (sanftes
|
|
46
|
+
* Heran-/Wegzoomen), `wipe` (Kreis-Reveal von oben, clip-path). Eigenes Preset ergänzen:
|
|
47
|
+
* dieselbe Struktur wie unten (html:active-view-transition-type(name) { ... }) - Namen
|
|
48
|
+
* frei wählbar, keine feste Liste in der Spec.
|
|
49
|
+
*/
|
|
50
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
51
|
+
@view-transition {
|
|
52
|
+
navigation: auto;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Eigene Dauer/Kurve statt des Browser-Default (meist 0.25s ease) - dieselben Tokens wie
|
|
57
|
+
der Rest von NativeCSS, damit sich der Seitenübergang nicht wie ein Fremdkörper
|
|
58
|
+
anfühlt. ::view-transition-old/-new(root) sind die beiden "Fotos" (alte/neue Seite),
|
|
59
|
+
die der Browser automatisch erzeugt - hier nur Timing überschrieben, keine eigene
|
|
60
|
+
Crossfade-Logik nötig (Browser-Default dafür bereits gut). */
|
|
61
|
+
::view-transition-old(root),
|
|
62
|
+
::view-transition-new(root) {
|
|
63
|
+
animation-duration: var(--ncss-motion-duration-slow, 400ms);
|
|
64
|
+
animation-timing-function: var(--ncss-motion-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Geteilte Elemente (gleicher view-transition-name auf Quell- UND Zielseite) morphen
|
|
68
|
+
nahtlos ineinander statt zu kreuzblenden - der Browser berechnet Position/Größe
|
|
69
|
+
automatisch zwischen beiden Zuständen ("early days nav matching"-Idee, hier mit der
|
|
70
|
+
tatsächlich schon verfügbaren Technik statt der in der Recherche gefundenen, noch
|
|
71
|
+
nicht implementierten @location/@navigation/:nav-source-Spec). .ncss-topbar auf jeder
|
|
72
|
+
Seite mit identischem view-transition-name sorgt dafür, dass die Kopfleiste beim
|
|
73
|
+
Seitenwechsel an Ort und Stelle bleibt, statt mit dem Rest der Seite zu kreuzblenden -
|
|
74
|
+
WICHTIG: der Name muss auf JEDER teilnehmenden Seite exakt gleich sein, sonst behandelt
|
|
75
|
+
der Browser es als zwei unabhängige, sich überschneidende Elemente statt eines
|
|
76
|
+
gemeinsamen (sichtbares Flackern/doppeltes Element). */
|
|
77
|
+
.ncss-topbar {
|
|
78
|
+
view-transition-name: ncss-page-topbar;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* --- Preset: slide (horizontal, wie ein Vorwärtsblättern) --------------------------------
|
|
82
|
+
Kein Blend zwischen den beiden Bewegungsrichtungen - alt schiebt/faded nach links weg,
|
|
83
|
+
neu kommt von rechts. Nicht Scroll-Richtungs-bewusst (das bräuchte JS - die window/
|
|
84
|
+
navigation.activation-API zur Laufzeit auswerten, siehe Kommentar oben in der Recherche
|
|
85
|
+
- bewusst weggelassen, um diese Datei bei "reines CSS" zu halten). */
|
|
86
|
+
html:active-view-transition-type(slide) {
|
|
87
|
+
&::view-transition-old(root) {
|
|
88
|
+
animation-name: ncss-page-slide-out;
|
|
89
|
+
}
|
|
90
|
+
&::view-transition-new(root) {
|
|
91
|
+
animation-name: ncss-page-slide-in;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
@keyframes ncss-page-slide-out {
|
|
95
|
+
to {
|
|
96
|
+
transform: translateX(-6%);
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
@keyframes ncss-page-slide-in {
|
|
101
|
+
from {
|
|
102
|
+
transform: translateX(6%);
|
|
103
|
+
opacity: 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* --- Preset: zoom (sanftes Heran-/Wegzoomen) ---------------------------------------------- */
|
|
108
|
+
html:active-view-transition-type(zoom) {
|
|
109
|
+
&::view-transition-old(root) {
|
|
110
|
+
animation-name: ncss-page-zoom-out;
|
|
111
|
+
}
|
|
112
|
+
&::view-transition-new(root) {
|
|
113
|
+
animation-name: ncss-page-zoom-in;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
@keyframes ncss-page-zoom-out {
|
|
117
|
+
to {
|
|
118
|
+
transform: scale(0.94);
|
|
119
|
+
opacity: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
@keyframes ncss-page-zoom-in {
|
|
123
|
+
from {
|
|
124
|
+
transform: scale(1.06);
|
|
125
|
+
opacity: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* --- Preset: wipe (Kreis-Reveal von oben, clip-path) --------------------------------------
|
|
130
|
+
Die alte Seite bleibt bewusst STATISCH stehen (animation:none überschreibt die
|
|
131
|
+
geerbte Standard-Kreuzblende) - der Browser malt ::view-transition-new(root) per
|
|
132
|
+
Default bereits ÜBER ::view-transition-old(root), der wachsende Kreis der neuen Seite
|
|
133
|
+
legt sich dadurch sichtbar über die unverändert stehende alte Seite, statt dass beide
|
|
134
|
+
gleichzeitig faden. */
|
|
135
|
+
html:active-view-transition-type(wipe) {
|
|
136
|
+
&::view-transition-old(root) {
|
|
137
|
+
animation: none;
|
|
138
|
+
}
|
|
139
|
+
&::view-transition-new(root) {
|
|
140
|
+
animation-name: ncss-page-wipe-in;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
@keyframes ncss-page-wipe-in {
|
|
144
|
+
from {
|
|
145
|
+
clip-path: circle(0% at 50% 0%);
|
|
146
|
+
}
|
|
147
|
+
to {
|
|
148
|
+
clip-path: circle(150% at 50% 0%);
|
|
149
|
+
}
|
|
150
|
+
}
|