@webority/theme 0.2.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Webority shared design system — Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -32,6 +32,6 @@
32
32
  "sass": "~1.77.8"
33
33
  },
34
34
  "scripts": {
35
- "build": "sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps"
35
+ "build": "sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps && node ../../scripts/sync-rcl-assets.mjs theme"
36
36
  }
37
37
  }
@@ -697,3 +697,45 @@ html.is-scrolling *::-webkit-scrollbar-thumb {
697
697
  transition: none;
698
698
  }
699
699
  }
700
+
701
+
702
+ // ---- Theme-flipped typography utilities ------------------------------------
703
+ // Bootstrap builds `.text-body` as `rgba(var(--bs-body-color-rgb), …)` — an RGB
704
+ // TRIPLET baked in at compile time (37, 47, 74). Bridging `--bs-body-color`
705
+ // cannot reach it, so the utility keeps the light-mode colour under
706
+ // [data-theme="dark"]. Redefined against the token, with !important to match
707
+ // Bootstrap's own utility declaration.
708
+ //
709
+ // `.text-body-secondary`, `.text-muted` and `.text-body-emphasis` are NOT
710
+ // redefined: they resolve --bs-secondary-color / --bs-emphasis-color, which the
711
+ // alias layer already bridges, so they flip correctly on their own.
712
+ .text-body {
713
+ color: var(--color-text) !important;
714
+ }
715
+
716
+ // Font-family utilities Bootstrap has no equivalent for. Products were declaring
717
+ // these locally, which is how a font choice drifts between surfaces.
718
+ .font-mono {
719
+ font-family: var(--bs-font-monospace);
720
+ }
721
+ .font-display {
722
+ font-family: var(--bs-body-font-family);
723
+ font-weight: 500;
724
+ letter-spacing: -0.02em;
725
+ }
726
+
727
+ // A hairline rule that follows the theme. `<hr>` carries Bootstrap's own opacity
728
+ // maths, which does not read as a divider on a dark surface.
729
+ .divider {
730
+ height: 1px;
731
+ border: 0;
732
+ margin: 0;
733
+ background: var(--color-border);
734
+ }
735
+ .divider-vertical {
736
+ width: 1px;
737
+ height: auto;
738
+ align-self: stretch;
739
+ border: 0;
740
+ background: var(--color-border);
741
+ }
@@ -200,3 +200,20 @@ $link-hover-decoration: underline;
200
200
  $focus-ring-width: 3px;
201
201
  $focus-ring-color: rgba($primary, 0.30); // tracks $primary automatically
202
202
  $focus-ring-blur: 0;
203
+
204
+
205
+ // ---- Table ----------------------------------------------------------
206
+ // Set HERE, not in the component layer, and the reason is specificity.
207
+ // Bootstrap emits `.table > :not(caption) > * > * { padding: … }` at (0,1,1).
208
+ // The base table rules are wrapped in `:where()` — deliberately, so variants like
209
+ // `.table-ledger` (0,1,2) can override them — which makes them (0,0,3). A class
210
+ // beats three type selectors, so a `padding` declared there loses to Bootstrap's
211
+ // and never applies.
212
+ //
213
+ // Overriding the SCSS variable makes Bootstrap's own high-specificity rule emit our
214
+ // value, so the base table is styled without the component layer having to outrank
215
+ // Bootstrap. Variants that set their own padding are unaffected — theirs still wins.
216
+ // (Cell colour and header background take the same approach one level down, through
217
+ // `--bs-table-color` / `--bs-table-bg`; see the base `.table` rules.)
218
+ $table-cell-padding-y: 0.75rem; // 12px
219
+ $table-cell-padding-x: 0.75rem; // 12px