sixseconds-modules 2.0.2 → 2.0.4

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/dist/styles.css CHANGED
@@ -9,21 +9,18 @@
9
9
  only things that cross a shadow boundary, so we neutralise them once
10
10
  here and re-establish our own baseline. Host author rules cannot
11
11
  reach past the boundary at all.
12
- 2. `.sixseconds-header-root` — a defensive reset for the light DOM. It
13
- applies when this stylesheet is used outside the shadow root (e.g. a
14
- consumer imports `sixseconds-modules/styles`, or during the brief
15
- pre-mount window), so leaked host rules for bare tags (button, a, ul,
16
- li, *, resets) get reverted before our styles apply.
17
-
18
- IMPORTANT specificity/order contract:
19
- `.sixseconds-header-root, .sixseconds-header-root *` is specificity
20
- (0,1,0), identical to an Emotion-generated class. This reset is declared
21
- ABOVE all component rules, so at equal specificity our own MUI/Emotion
22
- styles (injected/declared later) always win. Never raise this reset to
23
- an element-qualified selector or add `!important` — that would beat the
24
- header's own styling. `all: revert` also intentionally leaves custom
25
- properties, `direction` and `unicode-bidi` untouched, so RTL keeps
26
- working.
12
+ 2. `:where(.sixseconds-header-root …)` — a small, zero-specificity baseline
13
+ (box-sizing, replaced-element sizing) that replaces the host normalize the
14
+ boundary blocks, without ever overriding the component's own styles.
15
+
16
+ Inside the shadow tree the boundary already blocks the host's author CSS, so
17
+ NO aggressive `all: revert` is used here — that would strip the very baseline
18
+ the header needs (the host's global normalize no longer reaches inside the
19
+ boundary), which is what made replaced elements render at their intrinsic
20
+ size. Instead we provide our own small baseline below, written with `:where()`
21
+ so it has ZERO specificity and can never override the component's own Emotion
22
+ styles (a plain `.sixseconds-header-root svg {}` would be (0,1,1) and would
23
+ clobber MUI icon sizing).
27
24
  ========================================================================== */
28
25
  :host {
29
26
  /* `!important` is load-bearing: for NORMAL declarations the outer (document)
@@ -44,14 +41,29 @@
44
41
  -webkit-font-smoothing: antialiased !important;
45
42
  }
46
43
 
47
- .sixseconds-header-root,
48
- .sixseconds-header-root *,
49
- .sixseconds-header-root *::before,
50
- .sixseconds-header-root *::after {
51
- all: revert;
44
+ /* Baseline for the isolated tree — replaces what the host's normalize used to
45
+ provide. `:where()` keeps specificity at 0 so Emotion/MUI always win; these
46
+ rules only fill in defaults nothing else sets. */
47
+ :where(.sixseconds-header-root),
48
+ :where(.sixseconds-header-root *),
49
+ :where(.sixseconds-header-root *::before),
50
+ :where(.sixseconds-header-root *::after) {
52
51
  box-sizing: border-box;
53
52
  }
54
53
 
54
+ :where(.sixseconds-header-root img),
55
+ :where(.sixseconds-header-root svg),
56
+ :where(.sixseconds-header-root video),
57
+ :where(.sixseconds-header-root canvas) {
58
+ max-width: 100%;
59
+ }
60
+
61
+ :where(.sixseconds-header-root img),
62
+ :where(.sixseconds-header-root svg),
63
+ :where(.sixseconds-header-root video) {
64
+ height: auto;
65
+ }
66
+
55
67
  .sixseconds-header-root blockquote,
56
68
  .sixseconds-header-root dl,
57
69
  .sixseconds-header-root dd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sixseconds-modules",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",