@webmate-studio/builder 0.2.177 → 0.2.178
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 +1 -1
- package/src/design-tokens-v2-css.js +22 -4
package/package.json
CHANGED
|
@@ -1164,10 +1164,28 @@ function generateSpacingStyles(t) {
|
|
|
1164
1164
|
css += '\n margin-top: var(--spacing-component);';
|
|
1165
1165
|
css += '\n}';
|
|
1166
1166
|
|
|
1167
|
-
// Spacing-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1167
|
+
// Spacing presets (factor × design-system spacing)
|
|
1168
|
+
const factors = [
|
|
1169
|
+
{ attr: 'none', factor: '0' },
|
|
1170
|
+
{ attr: '0.25', factor: '0.25' },
|
|
1171
|
+
{ attr: '0.5', factor: '0.5' },
|
|
1172
|
+
{ attr: '0.75', factor: '0.75' },
|
|
1173
|
+
// 'standard' = no attribute, uses default margin-top
|
|
1174
|
+
{ attr: '1.25', factor: '1.25' },
|
|
1175
|
+
{ attr: '1.5', factor: '1.5' },
|
|
1176
|
+
{ attr: '1.75', factor: '1.75' },
|
|
1177
|
+
{ attr: '2', factor: '2' },
|
|
1178
|
+
// Legacy aliases
|
|
1179
|
+
{ attr: 'half', factor: '0.5' },
|
|
1180
|
+
{ attr: 'double', factor: '2' }
|
|
1181
|
+
];
|
|
1182
|
+
for (const { attr, factor } of factors) {
|
|
1183
|
+
if (factor === '0') {
|
|
1184
|
+
css += `\n[data-spacing="${attr}"] { margin-top: 0 !important; }`;
|
|
1185
|
+
} else {
|
|
1186
|
+
css += `\n[data-spacing="${attr}"] { margin-top: calc(var(--spacing-component) * ${factor}) !important; }`;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1171
1189
|
|
|
1172
1190
|
// Responsive Overrides
|
|
1173
1191
|
for (const [bp, minWidth] of Object.entries(breakpoints)) {
|