@podoba/tailwind 0.0.8 → 0.0.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +22 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podoba/tailwind",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "description": "podoba Tailwind preset — binds @podoba/tokens CSS custom properties to theme.extend.",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -16,6 +16,7 @@
16
16
  // config so conflicting utilities dedupe correctly. Keep the two in sync.
17
17
 
18
18
  import typography from "@tailwindcss/typography";
19
+ import plugin from "tailwindcss/plugin";
19
20
  import type { Config } from "tailwindcss";
20
21
 
21
22
  export const podobaPreset: Omit<Config, "content"> = {
@@ -86,6 +87,18 @@ export const podobaPreset: Omit<Config, "content"> = {
86
87
  sans: "var(--font-sans)",
87
88
  mono: "var(--font-mono)",
88
89
  },
90
+ // NC Fontina reads best light, so the whole weight scale is shifted down one
91
+ // step (-100 from Tailwind's defaults): light 300→200, normal 400→300,
92
+ // medium 500→400, semibold 600→500, bold 700→600. Every value stays inside
93
+ // NC Fontina's 200–700 wght axis. The unused extremes (thin/extralight/
94
+ // extrabold/black) are left at Tailwind defaults — they fall outside the axis.
95
+ fontWeight: {
96
+ light: "200",
97
+ normal: "300",
98
+ medium: "400",
99
+ semibold: "500",
100
+ bold: "600",
101
+ },
89
102
  fontSize: {
90
103
  micro: "var(--font-size-micro)",
91
104
  caption: "var(--font-size-caption)",
@@ -125,7 +138,15 @@ export const podobaPreset: Omit<Config, "content"> = {
125
138
  },
126
139
  },
127
140
  },
128
- plugins: [typography],
141
+ plugins: [
142
+ typography,
143
+ // Base body weight follows `font-normal` (300) so UNSTYLED text (no explicit
144
+ // weight class) renders at 300 rather than the browser default 400. Tied to
145
+ // the token via theme('fontWeight.normal') so it can't drift from the scale.
146
+ plugin(({ addBase, theme }) => {
147
+ addBase({ html: { fontWeight: theme("fontWeight.normal") } });
148
+ }),
149
+ ],
129
150
  };
130
151
 
131
152
  export default podobaPreset;