@seyuna/postcss 1.0.0-canary.35 → 1.0.0-canary.37

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
@@ -1,3 +1,17 @@
1
+ # [1.0.0-canary.37](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.36...v1.0.0-canary.37) (2026-01-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * implement resilient color variable strategy with CSS fallbacks ([0dce33c](https://github.com/seyuna-corp/seyuna-postcss/commit/0dce33cea479f6941638baccabf9cb4eead3ba52))
7
+
8
+ # [1.0.0-canary.36](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.35...v1.0.0-canary.36) (2026-01-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update default line-height to 1.5 in global reset ([21e7229](https://github.com/seyuna-corp/seyuna-postcss/commit/21e7229cf2bb75822d9d9710a078237fff581875))
14
+
1
15
  # [1.0.0-canary.35](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.34...v1.0.0-canary.35) (2026-01-22)
2
16
 
3
17
 
@@ -25,17 +25,25 @@ function getColorVariables(context, color, type) {
25
25
  // Auto-detect based on config
26
26
  const isStandard = color in hues;
27
27
  const isFixed = color in colors || color in lightColors || color in darkColors;
28
- if (isStandard) {
28
+ if (isStandard && !isFixed) {
29
29
  return {
30
30
  l: "var(--lightness)",
31
31
  c: "var(--chroma)",
32
32
  h: `var(--${color}-hue)`,
33
33
  };
34
34
  }
35
- // Default to fixed color pattern (graceful degradation for multi-file scenarios)
35
+ if (isFixed && !isStandard) {
36
+ return {
37
+ l: `var(--${color}-lightness)`,
38
+ c: `var(--${color}-chroma)`,
39
+ h: `var(--${color}-hue)`,
40
+ };
41
+ }
42
+ // Resilient fallback (graceful degradation for multi-file scenarios or name collisions)
43
+ // Use specific color variable if it exists, otherwise fall back to theme defaults
36
44
  return {
37
- l: `var(--${color}-lightness)`,
38
- c: `var(--${color}-chroma)`,
45
+ l: `var(--${color}-lightness, var(--lightness))`,
46
+ c: `var(--${color}-chroma, var(--chroma))`,
39
47
  h: `var(--${color}-hue)`,
40
48
  };
41
49
  }
@@ -10,7 +10,7 @@
10
10
  box-sizing: border-box;
11
11
  margin: 0;
12
12
  padding: 0;
13
- line-height: 2;
13
+ line-height: 1.5;
14
14
  font-family: inherit;
15
15
  }
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seyuna/postcss",
3
- "version": "1.0.0-canary.35",
3
+ "version": "1.0.0-canary.37",
4
4
  "description": "Seyuna UI's postcss plugin",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@ function getColorVariables(
35
35
  const isFixed =
36
36
  color in colors || color in lightColors || color in darkColors;
37
37
 
38
- if (isStandard) {
38
+ if (isStandard && !isFixed) {
39
39
  return {
40
40
  l: "var(--lightness)",
41
41
  c: "var(--chroma)",
@@ -43,10 +43,19 @@ function getColorVariables(
43
43
  };
44
44
  }
45
45
 
46
- // Default to fixed color pattern (graceful degradation for multi-file scenarios)
46
+ if (isFixed && !isStandard) {
47
+ return {
48
+ l: `var(--${color}-lightness)`,
49
+ c: `var(--${color}-chroma)`,
50
+ h: `var(--${color}-hue)`,
51
+ };
52
+ }
53
+
54
+ // Resilient fallback (graceful degradation for multi-file scenarios or name collisions)
55
+ // Use specific color variable if it exists, otherwise fall back to theme defaults
47
56
  return {
48
- l: `var(--${color}-lightness)`,
49
- c: `var(--${color}-chroma)`,
57
+ l: `var(--${color}-lightness, var(--lightness))`,
58
+ c: `var(--${color}-chroma, var(--chroma))`,
50
59
  h: `var(--${color}-hue)`,
51
60
  };
52
61
  }
@@ -10,7 +10,7 @@
10
10
  box-sizing: border-box;
11
11
  margin: 0;
12
12
  padding: 0;
13
- line-height: 2;
13
+ line-height: 1.5;
14
14
  font-family: inherit;
15
15
  }
16
16
 
@@ -227,4 +227,18 @@ describe("Seyuna PostCSS Plugin", () => {
227
227
  expect(result.css).toContain("all: unset;");
228
228
  expect(result.css).toContain("scroll-margin-block: 1rem;");
229
229
  });
230
+
231
+ it("uses resilient variables for untyped functions in config-less environments", async () => {
232
+ const input = ".test { color: SeyunaAlpha(unknown, 0.5); }";
233
+ const result = await postcss([plugin({ config: undefined })]).process(
234
+ input,
235
+ {
236
+ from: undefined,
237
+ },
238
+ );
239
+
240
+ expect(result.css).toContain(
241
+ "color: oklch(var(--unknown-lightness, var(--lightness)) var(--unknown-chroma, var(--chroma)) var(--unknown-hue) / 0.5)",
242
+ );
243
+ });
230
244
  });