@bookklik/senangstart-css 0.2.4 → 0.2.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.
Files changed (154) hide show
  1. package/.agent/skills/add-utility/scripts/scaffold-utility.js +209 -0
  2. package/.agent/skills/compiler-development/SKILL.md +272 -0
  3. package/.agent/skills/jit-engine/SKILL.md +241 -0
  4. package/.agent/skills/jit-engine/examples/add-visual-utility.js +117 -0
  5. package/.agent/skills/jit-engine/examples/scale-based-utilities.js +130 -0
  6. package/.agent/skills/jit-engine/examples/state-responsive-handling.js +177 -0
  7. package/.agent/skills/senangstart-architecture/SKILL.md +163 -0
  8. package/.agent/skills/tailwind-conversion/SKILL.md +264 -0
  9. package/.agent/workflows/add-utility.md +155 -0
  10. package/.agent/workflows/build.md +97 -0
  11. package/.agent/workflows/dev.md +58 -0
  12. package/.agent/workflows/docs.md +113 -0
  13. package/.agent/workflows/test.md +103 -0
  14. package/dist/senangstart-css.js +165 -20
  15. package/dist/senangstart-css.min.js +39 -26
  16. package/dist/senangstart-tw.js +262 -52
  17. package/dist/senangstart-tw.min.js +1 -1
  18. package/docs/.vitepress/config.js +10 -2
  19. package/docs/guide/cdn.md +1 -1
  20. package/docs/ms/guide/cdn.md +1 -1
  21. package/docs/ms/reference/layout/position.md +4 -4
  22. package/docs/ms/reference/layout/z-index.md +8 -8
  23. package/docs/ms/reference/space/gap.md +1 -1
  24. package/docs/ms/reference/space/height.md +42 -7
  25. package/docs/ms/reference/space/margin.md +1 -1
  26. package/docs/ms/reference/space/padding.md +1 -1
  27. package/docs/ms/reference/space/scale-reference.md +46 -17
  28. package/docs/ms/reference/space/width.md +40 -5
  29. package/docs/ms/reference/space.md +1 -1
  30. package/docs/ms/reference/spacing.md +103 -21
  31. package/docs/ms/reference/visual/animation-fill.md +8 -8
  32. package/docs/ms/reference/visual/backdrop-blur.md +4 -4
  33. package/docs/ms/reference/visual/backdrop-brightness.md +8 -8
  34. package/docs/ms/reference/visual/backdrop-grayscale.md +6 -6
  35. package/docs/ms/reference/visual/backdrop-sepia.md +6 -6
  36. package/docs/ms/reference/visual/background-clip.md +2 -2
  37. package/docs/ms/reference/visual/background-image.md +4 -4
  38. package/docs/ms/reference/visual/divide-reverse.md +66 -0
  39. package/docs/ms/reference/visual/divide-style.md +80 -0
  40. package/docs/ms/reference/visual/divide-width.md +89 -0
  41. package/docs/ms/reference/visual/divide.md +115 -0
  42. package/docs/ms/reference/visual/filter-brightness.md +4 -4
  43. package/docs/ms/reference/visual/filter-contrast.md +4 -4
  44. package/docs/ms/reference/visual/filter-drop-shadow.md +6 -6
  45. package/docs/ms/reference/visual/filter-grayscale.md +4 -4
  46. package/docs/ms/reference/visual/filter-hue-rotate.md +4 -4
  47. package/docs/ms/reference/visual/filter-invert.md +2 -2
  48. package/docs/ms/reference/visual/filter-saturate.md +4 -4
  49. package/docs/ms/reference/visual/filter-sepia.md +4 -4
  50. package/docs/ms/reference/visual/font-family.md +2 -2
  51. package/docs/ms/reference/visual/gradient-from.md +57 -57
  52. package/docs/ms/reference/visual/gradient-to.md +57 -57
  53. package/docs/ms/reference/visual/gradient-via.md +54 -54
  54. package/docs/ms/reference/visual/letter-spacing.md +2 -2
  55. package/docs/ms/reference/visual/line-clamp.md +2 -2
  56. package/docs/ms/reference/visual/line-height.md +2 -2
  57. package/docs/ms/reference/visual/outline.md +2 -2
  58. package/docs/ms/reference/visual/ring-color.md +29 -0
  59. package/docs/ms/reference/visual/ring-offset.md +30 -0
  60. package/docs/ms/reference/visual/ring.md +62 -0
  61. package/docs/ms/reference/visual/stroke-width.md +6 -6
  62. package/docs/ms/reference/visual/stroke.md +4 -4
  63. package/docs/ms/reference/visual/text-indent.md +2 -2
  64. package/docs/ms/reference/visual/text-overflow.md +2 -2
  65. package/docs/ms/reference/visual/text-size.md +2 -2
  66. package/docs/ms/reference/visual/text-wrap.md +2 -2
  67. package/docs/ms/reference/visual/transform-backface.md +4 -4
  68. package/docs/ms/reference/visual/transform-perspective-origin.md +6 -6
  69. package/docs/ms/reference/visual/transform-perspective.md +6 -6
  70. package/docs/ms/reference/visual/transform-rotate-3d.md +6 -6
  71. package/docs/ms/reference/visual/transform-style.md +4 -4
  72. package/docs/ms/reference/visual/transform-translate-z.md +6 -6
  73. package/docs/ms/reference/visual/transform-translate.md +2 -2
  74. package/docs/ms/reference/visual/whitespace.md +2 -2
  75. package/docs/ms/reference/visual/word-break.md +2 -2
  76. package/docs/public/assets/senangstart-css.min.js +39 -26
  77. package/docs/public/llms.txt +1756 -0
  78. package/docs/reference/layout/position.md +4 -4
  79. package/docs/reference/layout/z-index.md +8 -8
  80. package/docs/reference/space/gap.md +1 -1
  81. package/docs/reference/space/height.md +42 -7
  82. package/docs/reference/space/margin.md +1 -1
  83. package/docs/reference/space/padding.md +1 -1
  84. package/docs/reference/space/scale-reference.md +46 -17
  85. package/docs/reference/space/width.md +40 -5
  86. package/docs/reference/space.md +1 -1
  87. package/docs/reference/spacing.md +103 -21
  88. package/docs/reference/visual/animation-fill.md +8 -8
  89. package/docs/reference/visual/backdrop-blur.md +4 -4
  90. package/docs/reference/visual/backdrop-brightness.md +8 -8
  91. package/docs/reference/visual/backdrop-grayscale.md +6 -6
  92. package/docs/reference/visual/backdrop-sepia.md +6 -6
  93. package/docs/reference/visual/background-clip.md +2 -2
  94. package/docs/reference/visual/background-image.md +4 -4
  95. package/docs/reference/visual/divide-reverse.md +66 -0
  96. package/docs/reference/visual/divide-style.md +80 -0
  97. package/docs/reference/visual/divide-width.md +89 -0
  98. package/docs/reference/visual/divide.md +115 -0
  99. package/docs/reference/visual/filter-brightness.md +4 -4
  100. package/docs/reference/visual/filter-contrast.md +4 -4
  101. package/docs/reference/visual/filter-drop-shadow.md +6 -6
  102. package/docs/reference/visual/filter-grayscale.md +4 -4
  103. package/docs/reference/visual/filter-hue-rotate.md +4 -4
  104. package/docs/reference/visual/filter-invert.md +2 -2
  105. package/docs/reference/visual/filter-saturate.md +4 -4
  106. package/docs/reference/visual/filter-sepia.md +4 -4
  107. package/docs/reference/visual/font-family.md +2 -2
  108. package/docs/reference/visual/gradient-from.md +57 -57
  109. package/docs/reference/visual/gradient-to.md +57 -57
  110. package/docs/reference/visual/gradient-via.md +54 -54
  111. package/docs/reference/visual/letter-spacing.md +2 -2
  112. package/docs/reference/visual/line-clamp.md +2 -2
  113. package/docs/reference/visual/line-height.md +2 -2
  114. package/docs/reference/visual/outline.md +2 -2
  115. package/docs/reference/visual/ring-color.md +29 -0
  116. package/docs/reference/visual/ring-offset.md +30 -0
  117. package/docs/reference/visual/ring.md +62 -0
  118. package/docs/reference/visual/stroke-width.md +6 -6
  119. package/docs/reference/visual/stroke.md +4 -4
  120. package/docs/reference/visual/text-indent.md +2 -2
  121. package/docs/reference/visual/text-overflow.md +2 -2
  122. package/docs/reference/visual/text-size.md +2 -2
  123. package/docs/reference/visual/text-wrap.md +2 -2
  124. package/docs/reference/visual/transform-backface.md +4 -4
  125. package/docs/reference/visual/transform-perspective-origin.md +6 -6
  126. package/docs/reference/visual/transform-perspective.md +6 -6
  127. package/docs/reference/visual/transform-rotate-3d.md +6 -6
  128. package/docs/reference/visual/transform-style.md +4 -4
  129. package/docs/reference/visual/transform-translate-z.md +6 -6
  130. package/docs/reference/visual/transform-translate.md +2 -2
  131. package/docs/reference/visual/whitespace.md +2 -2
  132. package/docs/reference/visual/word-break.md +2 -2
  133. package/docs/reference/visual.md +8 -2
  134. package/package.json +4 -2
  135. package/scripts/build-dist.js +2 -2
  136. package/scripts/bundle-jit.js +3 -3
  137. package/scripts/convert-tailwind.js +250 -2
  138. package/scripts/generate-llms-txt.js +264 -0
  139. package/src/cdn/{jit.js → senangstart-engine.js} +184 -38
  140. package/src/cdn/tw-conversion-engine.js +282 -68
  141. package/src/compiler/generators/css.js +115 -2
  142. package/src/config/defaults.js +37 -11
  143. package/src/core/constants.js +37 -8
  144. package/src/definitions/index.js +3 -0
  145. package/src/definitions/space.js +97 -20
  146. package/src/definitions/visual-borders.js +80 -1
  147. package/src/definitions/visual-divide.js +225 -0
  148. package/src/definitions/visual-transform3d.js +16 -16
  149. package/src/definitions/visual-transforms.js +1 -1
  150. package/src/definitions/visual-transitions.js +4 -4
  151. package/src/definitions/visual-typography.js +6 -6
  152. package/src/definitions/visual.js +4 -4
  153. package/tests/unit/compiler/generators/css.test.js +267 -3
  154. package/tests/unit/convert-tailwind.test.js +59 -1
@@ -34,7 +34,7 @@ layout="[position-value]"
34
34
  <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>layout="relative"</code> - Element positioned relative to normal flow</p>
35
35
  <div layout="relative" space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
36
36
  <span space="p:small" visual="bg:primary text:white rounded:small">Relative Container</span>
37
- <span layout="absolute" style="top: 0; right: 0;" space="p:tiny" visual="bg:danger text:white rounded:small">Abs</span>
37
+ <span layout="absolute top:0 right:0" space="p:tiny" visual="bg:danger text:white rounded:small">Abs</span>
38
38
  </div>
39
39
  </div>
40
40
 
@@ -44,7 +44,7 @@ layout="[position-value]"
44
44
  ```html
45
45
  <div layout="relative" space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
46
46
  <span space="p:small" visual="bg:primary text:white rounded:small">Relative Container</span>
47
- <span layout="absolute" style="top: 0; right: 0;" space="p:tiny" visual="bg:danger text:white rounded:small">Abs</span>
47
+ <span layout="absolute top:0 right:0" space="p:tiny" visual="bg:danger text:white rounded:small">Abs</span>
48
48
  </div>
49
49
  ```
50
50
 
@@ -59,7 +59,7 @@ layout="[position-value]"
59
59
  <div layout="flex col" space="g:medium">
60
60
  <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>layout="sticky"</code> - Element sticks when scrolling past it</p>
61
61
  <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
62
- <span layout="sticky" style="top: 0;" space="p:small" visual="bg:primary text:white rounded:small">Sticky Header</span>
62
+ <span layout="sticky top:0" space="p:small" visual="bg:primary text:white rounded:small">Sticky Header</span>
63
63
  </div>
64
64
  </div>
65
65
 
@@ -68,7 +68,7 @@ layout="[position-value]"
68
68
 
69
69
  ```html
70
70
  <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
71
- <span layout="sticky" style="top: 0;" space="p:small" visual="bg:primary text:white rounded:small">Sticky Header</span>
71
+ <span layout="sticky top:0" space="p:small" visual="bg:primary text:white rounded:small">Sticky Header</span>
72
72
  </div>
73
73
  ```
74
74
 
@@ -32,10 +32,10 @@ layout="z:[value]"
32
32
  <div layout="flex col" space="g:medium">
33
33
  <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>layout="z:high"</code> - Control stacking order of positioned elements</p>
34
34
  <div layout="relative" space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 80px;">
35
- <span layout="absolute z:base" style="left: 0; top: 10px;" space="p:small" visual="bg:neutral-400 text:white rounded:small">z:base</span>
36
- <span layout="absolute z:low" style="left: 30px; top: 20px;" space="p:small" visual="bg:neutral-500 text:white rounded:small">z:low</span>
37
- <span layout="absolute z:mid" style="left: 60px; top: 30px;" space="p:small" visual="bg:neutral-600 text:white rounded:small">z:mid</span>
38
- <span layout="absolute z:high" style="left: 90px; top: 40px;" space="p:small" visual="bg:primary text:white rounded:small">z:high</span>
35
+ <span layout="absolute z:base left:0 top:10px" space="p:small" visual="bg:neutral-400 text:white rounded:small">z:base</span>
36
+ <span layout="absolute z:low left:30px top:20px" space="p:small" visual="bg:neutral-500 text:white rounded:small">z:low</span>
37
+ <span layout="absolute z:mid left:60px top:30px" space="p:small" visual="bg:neutral-600 text:white rounded:small">z:mid</span>
38
+ <span layout="absolute z:high left:90px top:40px" space="p:small" visual="bg:primary text:white rounded:small">z:high</span>
39
39
  </div>
40
40
  </div>
41
41
 
@@ -44,10 +44,10 @@ layout="z:[value]"
44
44
 
45
45
  ```html
46
46
  <div layout="relative" space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 80px;">
47
- <span layout="absolute z:base" style="left: 0; top: 10px;" space="p:small" visual="bg:neutral-400 text:white rounded:small">z:base</span>
48
- <span layout="absolute z:low" style="left: 30px; top: 20px;" space="p:small" visual="bg:neutral-500 text:white rounded:small">z:low</span>
49
- <span layout="absolute z:mid" style="left: 60px; top: 30px;" space="p:small" visual="bg:neutral-600 text:white rounded:small">z:mid</span>
50
- <span layout="absolute z:high" style="left: 90px; top: 40px;" space="p:small" visual="bg:primary text:white rounded:small">z:high</span>
47
+ <span layout="absolute z:base left:0 top:10px" space="p:small" visual="bg:neutral-400 text:white rounded:small">z:base</span>
48
+ <span layout="absolute z:low left:30px top:20px" space="p:small" visual="bg:neutral-500 text:white rounded:small">z:low</span>
49
+ <span layout="absolute z:mid left:60px top:30px" space="p:small" visual="bg:neutral-600 text:white rounded:small">z:mid</span>
50
+ <span layout="absolute z:high left:90px top:40px" space="p:small" visual="bg:primary text:white rounded:small">z:high</span>
51
51
  </div>
52
52
  ```
53
53
 
@@ -17,7 +17,7 @@ space="g:[value]" or space="g-{axis}:[value]"
17
17
 
18
18
  ## Scale Values
19
19
 
20
- `none`, `tiny`, `small`, `medium`, `big`, `giant`, `vast`
20
+ `none`, `thin`, `regular`, `thick`, `tiny`, `tiny-2x`, `small`, `small-2x`, `small-3x`, `small-4x`, `medium`, `medium-2x`, `medium-3x`, `medium-4x`, `large`, `large-2x`, `large-3x`, `large-4x`, `big`, `big-2x`, `big-3x`, `big-4x`, `giant`, `giant-2x`, `giant-3x`, `giant-4x`, `vast`, `vast-2x`, `vast-3x`, `vast-4x`, `vast-5x`, `vast-6x`, `vast-7x`, `vast-8x`, `vast-9x`, `vast-10x`
21
21
 
22
22
  ## Examples
23
23
 
@@ -17,13 +17,16 @@ space="h:[value]"
17
17
 
18
18
  ## Scale Values
19
19
 
20
- `none`, `tiny`, `small`, `medium`, `big`, `giant`, `vast`
20
+ `none`, `thin`, `regular`, `thick`, `tiny`, `tiny-2x`, `small`, `small-2x`, `small-3x`, `small-4x`, `medium`, `medium-2x`, `medium-3x`, `medium-4x`, `large`, `large-2x`, `large-3x`, `large-4x`, `big`, `big-2x`, `big-3x`, `big-4x`, `giant`, `giant-2x`, `giant-3x`, `giant-4x`, `vast`, `vast-2x`, `vast-3x`, `vast-4x`, `vast-5x`, `vast-6x`, `vast-7x`, `vast-8x`, `vast-9x`, `vast-10x`, `min`, `max`, `fit`
21
21
 
22
22
  ## Examples
23
23
 
24
24
  ```html
25
25
  <div space="h:[100vh]">Full viewport height</div>
26
26
  <div space="min-h:[400px]">Min height</div>
27
+ <div space="h:max">Content height</div>
28
+ <div space="max-h:max">Max content height</div>
29
+ <div space="min-h:min">Min content height</div>
27
30
  ```
28
31
 
29
32
  ## Preview
@@ -58,12 +61,14 @@ space="h:[value]"
58
61
 
59
62
  <div space="p-x:big p-b:medium m-t:medium" visual="border-w:thin border:neutral-100 dark:border:neutral-800 rounded:medium">
60
63
 
61
- ### Min Height
64
+ ### Content-Based Height
62
65
 
63
66
  <div layout="flex col" space="g:medium">
64
- <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>space="min-h:[80px]"</code> - Set minimum height constraint</p>
65
- <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
66
- <div space="min-h:[80px] p:small" visual="bg:primary text:white rounded:small" layout="flex center">min-h:[80px]</div>
67
+ <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>space="h:max"</code> - Use min, max, or fit for content-based height</p>
68
+ <div layout="flex" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
69
+ <div space="h:min p:small" visual="bg:primary text:white rounded:small">h:min</div>
70
+ <div space="h:max p:small" visual="bg:pink-600 text:white rounded:small">h:max<br>Multi<br>Line</div>
71
+ <div space="h:fit p:small" visual="bg:amber-600 text:white rounded:small">h:fit</div>
67
72
  </div>
68
73
  </div>
69
74
 
@@ -71,8 +76,38 @@ space="h:[value]"
71
76
  <summary>View Code</summary>
72
77
 
73
78
  ```html
74
- <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
75
- <div space="min-h:[80px] p:small" visual="bg:primary text:white rounded:small" layout="flex center">min-h:[80px]</div>
79
+ <div layout="flex" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
80
+ <div space="h:min p:small" visual="bg:primary text:white rounded:small">h:min</div>
81
+ <div space="h:max p:small" visual="bg:pink-600 text:white rounded:small">h:max<br>Multi<br>Line</div>
82
+ <div space="h:fit p:small" visual="bg:amber-600 text:white rounded:small">h:fit</div>
83
+ </div>
84
+ ```
85
+
86
+ </details>
87
+
88
+ </div>
89
+
90
+ <div space="p-x:big p-b:medium m-t:medium" visual="border-w:thin border:neutral-100 dark:border:neutral-800 rounded:medium">
91
+
92
+ ### Min/Max Height with Content Values
93
+
94
+ <div layout="flex col" space="g:medium">
95
+ <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>space="min-h:min"</code> - Constrain height using content values</p>
96
+ <div layout="flex" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
97
+ <div space="min-h:min p:small" visual="bg:primary text:white rounded:small">min-h:min</div>
98
+ <div space="max-h:max p:small" visual="bg:pink-600 text:white rounded:small">max-h:max</div>
99
+ <div space="min-h:[80px] p:small" visual="bg:amber-600 text:white rounded:small" layout="flex center">min-h:[80px]</div>
100
+ </div>
101
+ </div>
102
+
103
+ <details>
104
+ <summary>View Code</summary>
105
+
106
+ ```html
107
+ <div layout="flex" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
108
+ <div space="min-h:min p:small" visual="bg:primary text:white rounded:small">min-h:min</div>
109
+ <div space="max-h:max p:small" visual="bg:pink-600 text:white rounded:small">max-h:max</div>
110
+ <div space="min-h:[80px] p:small" visual="bg:amber-600 text:white rounded:small" layout="flex center">min-h:[80px]</div>
76
111
  </div>
77
112
  ```
78
113
 
@@ -21,7 +21,7 @@ space="m:[value]" or space="m-{side}:[value]"
21
21
 
22
22
  ## Scale Values
23
23
 
24
- `none`, `tiny`, `small`, `medium`, `big`, `giant`, `vast`, `auto`
24
+ `none`, `thin`, `regular`, `thick`, `tiny`, `tiny-2x`, `small`, `small-2x`, `small-3x`, `small-4x`, `medium`, `medium-2x`, `medium-3x`, `medium-4x`, `large`, `large-2x`, `large-3x`, `large-4x`, `big`, `big-2x`, `big-3x`, `big-4x`, `giant`, `giant-2x`, `giant-3x`, `giant-4x`, `vast`, `vast-2x`, `vast-3x`, `vast-4x`, `vast-5x`, `vast-6x`, `vast-7x`, `vast-8x`, `vast-9x`, `vast-10x`, `auto`
25
25
 
26
26
  ## Examples
27
27
 
@@ -21,7 +21,7 @@ space="p:[value]" or space="p-{side}:[value]"
21
21
 
22
22
  ## Scale Values
23
23
 
24
- `none`, `tiny`, `small`, `medium`, `big`, `giant`, `vast`
24
+ `none`, `thin`, `regular`, `thick`, `tiny`, `tiny-2x`, `small`, `small-2x`, `small-3x`, `small-4x`, `medium`, `medium-2x`, `medium-3x`, `medium-4x`, `large`, `large-2x`, `large-3x`, `large-4x`, `big`, `big-2x`, `big-3x`, `big-4x`, `giant`, `giant-2x`, `giant-3x`, `giant-4x`, `vast`, `vast-2x`, `vast-3x`, `vast-4x`, `vast-5x`, `vast-6x`, `vast-7x`, `vast-8x`, `vast-9x`, `vast-10x`
25
25
 
26
26
  ## Examples
27
27
 
@@ -4,15 +4,44 @@ The natural scale used for spacing properties.
4
4
 
5
5
  ## Scale Values
6
6
 
7
- | Keyword | Default Value |
8
- |---------|---------------|
9
- | `none` | 0px |
10
- | `tiny` | 4px |
11
- | `small` | 8px |
12
- | `medium` | 16px |
13
- | `big` | 32px |
14
- | `giant` | 64px |
15
- | `vast` | 128px |
7
+ | Keyword | Value | Use Case |
8
+ |---------|-------|----------|
9
+ | `none` | 0px | Reset spacing |
10
+ | `thin` | 1px | Hairline borders |
11
+ | `regular` | 2px | Standard borders |
12
+ | `thick` | 3px | Bold borders |
13
+ | `tiny` | 4px | Small offsets |
14
+ | `tiny-2x` | 6px | Tiny multiplied |
15
+ | `small` | 8px | Group related items |
16
+ | `small-2x` | 10px | Small multiplied |
17
+ | `small-3x` | 12px | Small multiplied |
18
+ | `small-4x` | 14px | Small multiplied |
19
+ | `medium` | 16px | Standard default |
20
+ | `medium-2x` | 20px | Medium multiplied |
21
+ | `medium-3x` | 24px | Medium multiplied |
22
+ | `medium-4x` | 28px | Medium multiplied |
23
+ | `large` | 32px | Separate sections |
24
+ | `large-2x` | 36px | Large multiplied |
25
+ | `large-3x` | 40px | Large multiplied |
26
+ | `large-4x` | 44px | Large multiplied |
27
+ | `big` | 48px | Layout sections |
28
+ | `big-2x` | 56px | Big multiplied |
29
+ | `big-3x` | 64px | Big multiplied |
30
+ | `big-4x` | 80px | Big multiplied |
31
+ | `giant` | 96px | Hero sections |
32
+ | `giant-2x` | 112px | Giant multiplied |
33
+ | `giant-3x` | 128px | Giant multiplied |
34
+ | `giant-4x` | 144px | Giant multiplied |
35
+ | `vast` | 160px | Page-level spacing |
36
+ | `vast-2x` | 176px | Vast multiplied |
37
+ | `vast-3x` | 192px | Vast multiplied |
38
+ | `vast-4x` | 208px | Vast multiplied |
39
+ | `vast-5x` | 224px | Vast multiplied |
40
+ | `vast-6x` | 240px | Vast multiplied |
41
+ | `vast-7x` | 256px | Vast multiplied |
42
+ | `vast-8x` | 288px | Vast multiplied |
43
+ | `vast-9x` | 320px | Vast multiplied |
44
+ | `vast-10x` | 384px | Vast multiplied |
16
45
 
17
46
  ## Customization
18
47
 
@@ -20,18 +49,18 @@ Override scale values in your configuration:
20
49
 
21
50
  ```js
22
51
  // senangstart.config.js
23
- module.exports = {
24
- scale: {
25
- tiny: '2px',
26
- small: '4px',
27
- medium: '8px',
28
- big: '16px',
29
- giant: '32px',
30
- vast: '64px'
52
+ export default {
53
+ theme: {
54
+ spacing: {
55
+ 'tiny': '2px', // Override existing
56
+ 'micro': '1px', // Add new custom value
57
+ 'humongous': '512px' // Extrapolate scale
58
+ }
31
59
  }
32
60
  }
33
61
  ```
34
62
 
63
+
35
64
  ## Usage
36
65
 
37
66
  All spacing properties use the same scale:
@@ -17,7 +17,7 @@ space="w:[value]"
17
17
 
18
18
  ## Scale Values
19
19
 
20
- `none`, `tiny`, `small`, `medium`, `big`, `giant`, `vast`
20
+ `none`, `thin`, `regular`, `thick`, `tiny`, `tiny-2x`, `small`, `small-2x`, `small-3x`, `small-4x`, `medium`, `medium-2x`, `medium-3x`, `medium-4x`, `large`, `large-2x`, `large-3x`, `large-4x`, `big`, `big-2x`, `big-3x`, `big-4x`, `giant`, `giant-2x`, `giant-3x`, `giant-4x`, `vast`, `vast-2x`, `vast-3x`, `vast-4x`, `vast-5x`, `vast-6x`, `vast-7x`, `vast-8x`, `vast-9x`, `vast-10x`, `min`, `max`, `fit`
21
21
 
22
22
  ## Examples
23
23
 
@@ -25,6 +25,9 @@ space="w:[value]"
25
25
  <div space="w:[100%]">Full width</div>
26
26
  <div space="max-w:[1200px]">Max width container</div>
27
27
  <div space="min-w:[300px]">Min width</div>
28
+ <div space="w:max">Content width</div>
29
+ <div space="max-w:max">Max content width</div>
30
+ <div space="min-w:min">Min content width</div>
28
31
  ```
29
32
 
30
33
  ## Preview
@@ -59,12 +62,14 @@ space="w:[value]"
59
62
 
60
63
  <div space="p-x:big p-b:medium m-t:medium" visual="border-w:thin border:neutral-100 dark:border:neutral-800 rounded:medium">
61
64
 
62
- ### Max Width
65
+ ### Content-Based Sizing
63
66
 
64
67
  <div layout="flex col" space="g:medium">
65
- <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>space="max-w:[200px]"</code> - Constrain maximum width</p>
68
+ <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>space="w:max"</code> - Use min, max, or fit for content-based sizing</p>
66
69
  <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
67
- <div space="max-w:[200px] p:small" visual="bg:primary text:white rounded:small">max-w:[200px]</div>
70
+ <div space="w:min p:small m-b:small" visual="bg:primary text:white rounded:small">w:min shrinks to minimum</div>
71
+ <div space="w:max p:small m-b:small" visual="bg:pink-600 text:white rounded:small">w:max expands to fit all content without wrapping</div>
72
+ <div space="w:fit p:small" visual="bg:green-600 text:white rounded:small">w:fit adapts to available space while respecting content</div>
68
73
  </div>
69
74
  </div>
70
75
 
@@ -73,7 +78,37 @@ space="w:[value]"
73
78
 
74
79
  ```html
75
80
  <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
76
- <div space="max-w:[200px] p:small" visual="bg:primary text:white rounded:small">max-w:[200px]</div>
81
+ <div space="w:min p:small m-b:small" visual="bg:primary text:white rounded:small">w:min shrinks to minimum</div>
82
+ <div space="w:max p:small m-b:small" visual="bg:pink-600 text:white rounded:small">w:max expands to fit all content without wrapping</div>
83
+ <div space="w:fit p:small" visual="bg:green-600 text:white rounded:small">w:fit adapts to available space while respecting content</div>
84
+ </div>
85
+ ```
86
+
87
+ </details>
88
+
89
+ </div>
90
+
91
+ <div space="p-x:big p-b:medium m-t:medium" visual="border-w:thin border:neutral-100 dark:border:neutral-800 rounded:medium">
92
+
93
+ ### Max Width with Content Values
94
+
95
+ <div layout="flex col" space="g:medium">
96
+ <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>space="max-w:min"</code> - Constrain maximum width using content values</p>
97
+ <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
98
+ <div space="max-w:min p:small m-b:small" visual="bg:primary text:white rounded:small">max-w:min - Text will wrap to minimum width needed</div>
99
+ <div space="max-w:max p:small m-b:small" visual="bg:pink-600 text:white rounded:small">max-w:max - Expands to content</div>
100
+ <div space="max-w:[200px] p:small" visual="bg:green-600 text:white rounded:small">max-w:[200px] - Fixed max</div>
101
+ </div>
102
+ </div>
103
+
104
+ <details>
105
+ <summary>View Code</summary>
106
+
107
+ ```html
108
+ <div space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
109
+ <div space="max-w:min p:small m-b:small" visual="bg:primary text:white rounded:small">max-w:min - Text will wrap to minimum width needed</div>
110
+ <div space="max-w:max p:small m-b:small" visual="bg:pink-600 text:white rounded:small">max-w:max - Expands to content</div>
111
+ <div space="max-w:[200px] p:small" visual="bg:green-600 text:white rounded:small">max-w:[200px] - Fixed max</div>
77
112
  </div>
78
113
  ```
79
114
 
@@ -10,7 +10,7 @@ The `space` attribute controls sizing and spacing.
10
10
 
11
11
  **Breakpoints:** `mob:`, `tab:`, `lap:`, `desk:`
12
12
 
13
- **Scale values:** `none`, `tiny`, `small`, `medium`, `big`, `giant`, `vast`
13
+ **Scale values:** `none`, `thin`, `regular`, `thick`, `tiny`, `small`, `medium`, `large`, `big`, `giant`, `vast` (and numeric multipliers)
14
14
 
15
15
  ## Spacing
16
16
 
@@ -11,11 +11,37 @@ Complete reference for the spacing scale.
11
11
  | `regular` | 2px | Standard borders |
12
12
  | `thick` | 3px | Bold borders |
13
13
  | `tiny` | 4px | Small offsets |
14
+ | `tiny-2x` | 6px | Tiny multiplied |
14
15
  | `small` | 8px | Group related items |
16
+ | `small-2x` | 10px | Small multiplied |
17
+ | `small-3x` | 12px | Small multiplied |
18
+ | `small-4x` | 14px | Small multiplied |
15
19
  | `medium` | 16px | Standard default |
16
- | `big` | 32px | Separate sections |
17
- | `giant` | 64px | Layout divisions |
18
- | `vast` | 128px | Hero sections |
20
+ | `medium-2x` | 20px | Medium multiplied |
21
+ | `medium-3x` | 24px | Medium multiplied |
22
+ | `medium-4x` | 28px | Medium multiplied |
23
+ | `large` | 32px | Separate sections |
24
+ | `large-2x` | 36px | Large multiplied |
25
+ | `large-3x` | 40px | Large multiplied |
26
+ | `large-4x` | 44px | Large multiplied |
27
+ | `big` | 48px | Layout sections |
28
+ | `big-2x` | 56px | Big multiplied |
29
+ | `big-3x` | 64px | Big multiplied |
30
+ | `big-4x` | 80px | Big multiplied |
31
+ | `giant` | 96px | Hero sections |
32
+ | `giant-2x` | 112px | Giant multiplied |
33
+ | `giant-3x` | 128px | Giant multiplied |
34
+ | `giant-4x` | 144px | Giant multiplied |
35
+ | `vast` | 160px | Page-level spacing |
36
+ | `vast-2x` | 176px | Vast multiplied |
37
+ | `vast-3x` | 192px | Vast multiplied |
38
+ | `vast-4x` | 208px | Vast multiplied |
39
+ | `vast-5x` | 224px | Vast multiplied |
40
+ | `vast-6x` | 240px | Vast multiplied |
41
+ | `vast-7x` | 256px | Vast multiplied |
42
+ | `vast-8x` | 288px | Vast multiplied |
43
+ | `vast-9x` | 320px | Vast multiplied |
44
+ | `vast-10x` | 384px | Vast multiplied |
19
45
 
20
46
  ## CSS Variables
21
47
 
@@ -28,11 +54,37 @@ The spacing scale generates these CSS variables:
28
54
  --s-regular: 2px;
29
55
  --s-thick: 3px;
30
56
  --s-tiny: 4px;
57
+ --s-tiny-2x: 6px;
31
58
  --s-small: 8px;
59
+ --s-small-2x: 10px;
60
+ --s-small-3x: 12px;
61
+ --s-small-4x: 14px;
32
62
  --s-medium: 16px;
33
- --s-big: 32px;
34
- --s-giant: 64px;
35
- --s-vast: 128px;
63
+ --s-medium-2x: 20px;
64
+ --s-medium-3x: 24px;
65
+ --s-medium-4x: 28px;
66
+ --s-large: 32px;
67
+ --s-large-2x: 36px;
68
+ --s-large-3x: 40px;
69
+ --s-large-4x: 44px;
70
+ --s-big: 48px;
71
+ --s-big-2x: 56px;
72
+ --s-big-3x: 64px;
73
+ --s-big-4x: 80px;
74
+ --s-giant: 96px;
75
+ --s-giant-2x: 112px;
76
+ --s-giant-3x: 128px;
77
+ --s-giant-4x: 144px;
78
+ --s-vast: 160px;
79
+ --s-vast-2x: 176px;
80
+ --s-vast-3x: 192px;
81
+ --s-vast-4x: 208px;
82
+ --s-vast-5x: 224px;
83
+ --s-vast-6x: 240px;
84
+ --s-vast-7x: 256px;
85
+ --s-vast-8x: 288px;
86
+ --s-vast-9x: 320px;
87
+ --s-vast-10x: 384px;
36
88
  }
37
89
  ```
38
90
 
@@ -41,11 +93,11 @@ The spacing scale generates these CSS variables:
41
93
  ```html
42
94
  <!-- Padding -->
43
95
  <div space="p:medium">16px padding all sides</div>
44
- <div space="p-x:big">32px horizontal padding</div>
96
+ <div space="p-x:large">32px horizontal padding</div>
45
97
 
46
98
  <!-- Margin -->
47
99
  <div space="m:small">8px margin all sides</div>
48
- <div space="m-b:giant">64px bottom margin</div>
100
+ <div space="m-b:giant">96px bottom margin</div>
49
101
 
50
102
  <!-- Gap -->
51
103
  <div layout="flex" space="g:small">8px gap between items</div>
@@ -54,6 +106,10 @@ The spacing scale generates these CSS variables:
54
106
  <div visual="border:gray-300 border-w:thin">1px border</div>
55
107
  <div visual="border:gray-300 border-w:regular">2px border</div>
56
108
  <div visual="border:gray-300 border-w:thick">3px border</div>
109
+
110
+ <!-- Using multiplier variants -->
111
+ <div space="p:medium-2x">20px padding (medium × 2)</div>
112
+ <div space="m:large-3x">40px margin (large × 3)</div>
57
113
  ```
58
114
 
59
115
  ## Customization
@@ -64,9 +120,9 @@ Override in `senangstart.config.js`:
64
120
  export default {
65
121
  theme: {
66
122
  spacing: {
67
- 'tiny': '2px', // Override existing
68
- 'huge': '256px', // Add new
69
- 'massive': '512px' // Add new
123
+ 'tiny': '2px', // Override existing
124
+ 'huge': '256px', // Add new
125
+ 'massive': '512px' // Add new
70
126
  }
71
127
  }
72
128
  }
@@ -75,14 +131,40 @@ export default {
75
131
  ## Visual Guide
76
132
 
77
133
  ```
78
- none │ (no space)
79
- thin │ 1px
80
- regular │▏ 2px
81
- thick │▎ 3px
82
- tiny │▌ 4px
83
- small │██ 8px
84
- medium │████ 16px
85
- big │████████ 32px
86
- giant │████████████████ 64px
87
- vast │████████████████████████████████ 128px
134
+ none │ (no space)
135
+ thin │ 1px
136
+ regular │▏ 2px
137
+ thick │▎ 3px
138
+ tiny │▌ 4px
139
+ tiny-2x │▌▏ 6px
140
+ small │██ 8px
141
+ small-2x │██▌ 10px
142
+ small-3x │███ 12px
143
+ small-4x │███▌ 14px
144
+ medium │████ 16px
145
+ medium-2x │█████ 20px
146
+ medium-3x │██████ 24px
147
+ medium-4x │███████ 28px
148
+ large │████████ 32px
149
+ large-2x │█████████ 36px
150
+ large-3x │██████████ 40px
151
+ large-4x │███████████ 44px
152
+ big │████████████ 48px
153
+ big-2x │██████████████ 56px
154
+ big-3x │████████████████ 64px
155
+ big-4x │████████████████████ 80px
156
+ giant │████████████████████████ 96px
157
+ giant-2x │████████████████████████████ 112px
158
+ giant-3x │████████████████████████████████ 128px
159
+ giant-4x │████████████████████████████████████ 144px
160
+ vast │████████████████████████████████████████ 160px
161
+ vast-2x │████████████████████████████████████████████ 176px
162
+ vast-3x │████████████████████████████████████████████████ 192px
163
+ vast-4x │████████████████████████████████████████████████████ 208px
164
+ vast-5x │████████████████████████████████████████████████████████ 224px
165
+ vast-6x │████████████████████████████████████████████████████████████ 240px
166
+ vast-7x │████████████████████████████████████████████████████████████████ 256px
167
+ vast-8x │████████████████████████████████████████████████████████████████████████ 288px
168
+ vast-9x │████████████████████████████████████████████████████████████████████████████████ 320px
169
+ vast-10x │██████████████████████████████████████████████████████████████████████████████████████████████ 384px
88
170
  ```
@@ -30,18 +30,18 @@ visual="animation-fill:[value]"
30
30
 
31
31
  <div layout="flex col" space="g:medium">
32
32
  <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>visual="animation-fill:forwards"</code> - Control state before/after animation. "forwards" keeps the final state, "none" returns to original.</p>
33
- <div layout="flex:col" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
33
+ <div layout="flex col" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
34
34
  <p visual="text-size:small text:neutral-600 dark:text:neutral-400">Hover to replay animation:</p>
35
35
  <div layout="flex" space="g:medium">
36
- <div layout="flex:col" space="g:tiny">
36
+ <div layout="flex col" space="g:tiny">
37
37
  <span visual="text-size:tiny text:neutral-500">none (returns)</span>
38
38
  <div space="p:small" visual="bg:primary text:white rounded:small animate:bounce animation-iteration:1 animation-fill:none hover:animate:bounce">⬆</div>
39
39
  </div>
40
- <div layout="flex:col" space="g:tiny">
40
+ <div layout="flex col" space="g:tiny">
41
41
  <span visual="text-size:tiny text:neutral-500">forwards (stays)</span>
42
42
  <div space="p:small" visual="bg:success text:white rounded:small animate:bounce animation-iteration:1 animation-fill:forwards hover:animate:bounce">⬆</div>
43
43
  </div>
44
- <div layout="flex:col" space="g:tiny">
44
+ <div layout="flex col" space="g:tiny">
45
45
  <span visual="text-size:tiny text:neutral-500">both</span>
46
46
  <div space="p:small" visual="bg:warning text:white rounded:small animate:bounce animation-iteration:1 animation-fill:both hover:animate:bounce">⬆</div>
47
47
  </div>
@@ -53,18 +53,18 @@ visual="animation-fill:[value]"
53
53
  <summary>View Code</summary>
54
54
 
55
55
  ```html
56
- <div layout="flex:col" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
56
+ <div layout="flex col" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
57
57
  <p visual="text-size:small text:neutral-600 dark:text:neutral-400">Hover to replay animation:</p>
58
58
  <div layout="flex" space="g:medium">
59
- <div layout="flex:col" space="g:tiny">
59
+ <div layout="flex col" space="g:tiny">
60
60
  <span visual="text-size:tiny text:neutral-500">none (returns)</span>
61
61
  <div space="p:small" visual="bg:primary text:white rounded:small animate:bounce animation-iteration:1 animation-fill:none hover:animate:bounce">⬆</div>
62
62
  </div>
63
- <div layout="flex:col" space="g:tiny">
63
+ <div layout="flex col" space="g:tiny">
64
64
  <span visual="text-size:tiny text:neutral-500">forwards (stays)</span>
65
65
  <div space="p:small" visual="bg:success text:white rounded:small animate:bounce animation-iteration:1 animation-fill:forwards hover:animate:bounce">⬆</div>
66
66
  </div>
67
- <div layout="flex:col" space="g:tiny">
67
+ <div layout="flex col" space="g:tiny">
68
68
  <span visual="text-size:tiny text:neutral-500">both</span>
69
69
  <div space="p:small" visual="bg:warning text:white rounded:small animate:bounce animation-iteration:1 animation-fill:both hover:animate:bounce">⬆</div>
70
70
  </div>
@@ -33,8 +33,8 @@ visual="backdrop-blur:[value]"
33
33
 
34
34
  <div layout="flex col" space="g:medium">
35
35
  <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>visual="backdrop-blur:medium"</code> - Creates a frosted glass effect on content behind the element</p>
36
- <div layout="relative" space="p:medium" visual="rounded:medium" style="background: linear-gradient(135deg, #3b82f6, #8b5cf6); min-height: 100px;">
37
- <div layout="absolute" style="top: 50%; left: 50%; transform: translate(-50%, -50%); backdrop-filter: blur(8px); background: rgba(255,255,255,0.2); padding: 1rem; border-radius: 0.5rem;">
36
+ <div layout="flex:center" space="p:large" visual="bg-image:gradient-to-br from:blue-500 to:violet-500 rounded:medium">
37
+ <div space="p:medium" visual="backdrop-blur:medium bg:[rgba(255,255,255,0.2)] rounded:small">
38
38
  <span visual="text:white">Frosted Glass</span>
39
39
  </div>
40
40
  </div>
@@ -44,8 +44,8 @@ visual="backdrop-blur:[value]"
44
44
  <summary>View Code</summary>
45
45
 
46
46
  ```html
47
- <div layout="relative" space="p:medium" visual="rounded:medium" style="background: linear-gradient(135deg, #3b82f6, #8b5cf6); min-height: 100px;">
48
- <div layout="absolute" style="top: 50%; left: 50%; transform: translate(-50%, -50%); backdrop-filter: blur(8px); background: rgba(255,255,255,0.2); padding: 1rem; border-radius: 0.5rem;">
47
+ <div layout="flex:center" space="p:large" visual="bg-image:gradient-to-br from:blue-500 to:violet-500 rounded:medium">
48
+ <div space="p:medium" visual="backdrop-blur:medium bg:[rgba(255,255,255,0.2)] rounded:small">
49
49
  <span visual="text:white">Frosted Glass</span>
50
50
  </div>
51
51
  </div>
@@ -31,10 +31,10 @@ visual="backdrop-brightness:[value]"
31
31
 
32
32
  <div layout="flex col" space="g:medium">
33
33
  <p space="m:none" visual="text:neutral-600 dark:text:neutral-400 text-sm"><code>visual="backdrop-brightness:dark"</code> - Dim or brighten the backdrop behind an overlay</p>
34
- <div layout="flex" space="g:medium p:medium" visual="rounded:medium" style="background: linear-gradient(135deg, #f97316, #ef4444);">
35
- <div space="p:small" visual="rounded:small text:white" style="backdrop-filter: brightness(0.5);">dim (50%)</div>
36
- <div space="p:small" visual="rounded:small text:white" style="backdrop-filter: brightness(1);">normal</div>
37
- <div space="p:small" visual="rounded:small text:white" style="backdrop-filter: brightness(1.5);">bright (150%)</div>
34
+ <div layout="flex" space="g:medium p:medium" visual="bg-image:gradient-to-br from:orange-500 to:red-500 rounded:medium">
35
+ <div space="p:small" visual="backdrop-brightness:dim rounded:small text:white">dim (50%)</div>
36
+ <div space="p:small" visual="backdrop-brightness:normal rounded:small text:white">normal</div>
37
+ <div space="p:small" visual="backdrop-brightness:vivid rounded:small text:white">bright (150%)</div>
38
38
  </div>
39
39
  </div>
40
40
 
@@ -42,10 +42,10 @@ visual="backdrop-brightness:[value]"
42
42
  <summary>View Code</summary>
43
43
 
44
44
  ```html
45
- <div layout="flex" space="g:medium p:medium" visual="rounded:medium" style="background: linear-gradient(135deg, #f97316, #ef4444);">
46
- <div space="p:small" visual="rounded:small text:white" style="backdrop-filter: brightness(0.5);">dim (50%)</div>
47
- <div space="p:small" visual="rounded:small text:white" style="backdrop-filter: brightness(1);">normal</div>
48
- <div space="p:small" visual="rounded:small text:white" style="backdrop-filter: brightness(1.5);">bright (150%)</div>
45
+ <div layout="flex" space="g:medium p:medium" visual="bg-image:gradient-to-br from:orange-500 to:red-500 rounded:medium">
46
+ <div space="p:small" visual="backdrop-brightness:dim rounded:small text:white">dim (50%)</div>
47
+ <div space="p:small" visual="backdrop-brightness:normal rounded:small text:white">normal</div>
48
+ <div space="p:small" visual="backdrop-brightness:vivid rounded:small text:white">bright (150%)</div>
49
49
  </div>
50
50
  ```
51
51