@nimtech/nimpress 2.3.4 → 2.3.6
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/.claude/rules/changelog-entries.md +1 -1
- package/.claude/rules/style.md +12 -0
- package/dist/nimpress.es.js +901 -898
- package/dist/style.css +3 -0
- package/package.json +1 -1
|
@@ -224,6 +224,6 @@ The reader cares that the docs Try-It and the response panels show meaningful bo
|
|
|
224
224
|
|
|
225
225
|
2. Each entry is a row of `[version pill] [data.title] [chevron]`. Clicking the row expands the body.
|
|
226
226
|
|
|
227
|
-
3.
|
|
227
|
+
3. Every entry starts collapsed. A direct hash like `/path#v1.4.2` expands that entry and scrolls to it.
|
|
228
228
|
|
|
229
229
|
4. The right rail TOC lists every version as a level 2 heading. The left sidebar adds one child entry per version under the collection page, each pointing at the hash anchor.
|
package/.claude/rules/style.md
CHANGED
|
@@ -24,6 +24,16 @@ If none of those apply, keep the literal value in the component.
|
|
|
24
24
|
|
|
25
25
|
3. The class set on rendered chrome is the public API. Renames go through a major version bump.
|
|
26
26
|
|
|
27
|
+
## The cascade layer
|
|
28
|
+
|
|
29
|
+
Every stylesheet the library build emits is wrapped in `@layer nimpress` by the `nimpress:cascade-layer` plugin in `vite.config.ts`. An unlayered consumer rule therefore beats any nimpress rule regardless of specificity, so a plain `.np-card { }` wins against the scoped `.np-card.svelte-hash` nimpress ships.
|
|
30
|
+
|
|
31
|
+
1. Never write `!important` in library CSS or tell a consumer to. The layer already puts them ahead.
|
|
32
|
+
|
|
33
|
+
2. Never wrap consumer facing output in a layer. Page stylesheets are injected as raw `<style>` elements by `src/framework/pageStyles.ts` and must stay unlayered.
|
|
34
|
+
|
|
35
|
+
3. The class set on rendered chrome is the public override surface, documented per area under `docs/styling/`. Adding a class to a component means adding it there in the same change.
|
|
36
|
+
|
|
27
37
|
## Overrides from consumers
|
|
28
38
|
|
|
29
39
|
Consumers override Nimpress styles by:
|
|
@@ -59,3 +69,5 @@ No spacing token system. Spacing is per component. Keep values to multiples of 4
|
|
|
59
69
|
3. Do not introduce a CSS in JS library. Svelte's scoped `<style>` is the carrier.
|
|
60
70
|
|
|
61
71
|
4. Do not add `!important`. If you reach for it, the cascade is fighting your structure, fix the structure.
|
|
72
|
+
|
|
73
|
+
5. Do not remove the cascade layer wrap. Without it the documented class surface is not overridable and the styling docs become a lie.
|