@skerbis/nativecss 1.2.0 → 1.2.1

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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Alle nennenswerten Änderungen an NativeCSS. Versionierung nach [Semantic Versioning](https://semver.org/lang/de/).
4
4
 
5
+ ## [1.2.1] - 2026-11-20
6
+
7
+ ### Behoben
8
+
9
+ - Automatischer Kompakt-Modus: eine Nav-Liste mit `justify-content: flex-end` (oder `center`, RTL) lief zum Zeilenanfang über die Marke, ohne dass `js/nav.js` das erkannte - `scrollWidth` misst nur Überlauf zum Zeilenende. Jetzt werden die äußeren Kanten der Punkte geprüft.
10
+
5
11
  ## [1.2.0] - 2026-11-20
6
12
 
7
13
  ### Geändert (Verhalten)
package/dist/js/nav.js CHANGED
@@ -51,6 +51,16 @@
51
51
  if (list.scrollWidth > list.clientWidth + 1 || nav.scrollWidth > nav.clientWidth + 1) {
52
52
  return false;
53
53
  }
54
+ /* scrollWidth erfasst nur Überlauf zum Zeilenende - bei justify-content:flex-end/center
55
+ (oder RTL) ragen die Punkte zum Anfang hinaus, über die Marke. Deshalb zusätzlich die
56
+ äußeren Kanten der Punkte gegen die Liste prüfen. */
57
+ var lb = list.getBoundingClientRect();
58
+ for (var j = 0; j < list.children.length; j++) {
59
+ var ib = list.children[j].getBoundingClientRect();
60
+ if (ib.width && (ib.left < lb.left - 1 || ib.right > lb.right + 1)) {
61
+ return false;
62
+ }
63
+ }
54
64
  if (row.scrollWidth > row.clientWidth + 1) {
55
65
  return false;
56
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skerbis/nativecss",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Natives CSS-Designsystem ohne Build-Schritt: Cascade Layers, Container Queries, light-dark(), native Elemente und Light-DOM-Web-Components. Einzeln einbindbar.",
5
5
  "keywords": [
6
6
  "css",