Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions VIBE4_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,13 @@ Vibe 4 represents a major evolution of the design system, focusing on:
- **Task**: [Monday.com Task](https://monday.monday.com/boards/10027056258/pulses/9713029198)
- **PR**: TBD

#### Design Tokens
#### Design Tokens — Spacing

- **Change**: TBD
- **Reason**: TBD
- **Migration**: TBD
- **Codemod**: ❌ Manual
- [x] **Status**: Complete
- **Change**: Removed deprecated semantic spacing CSS custom properties (`--spacing-xs`, `--spacing-small`, `--spacing-medium`, `--spacing-large`, `--spacing-xl`, `--spacing-xxl`, `--spacing-xxxl`) from `@vibe/style`. All internal usages replaced with numeric spacing tokens (`--space-4`, `--space-8`, `--space-16`, `--space-24`, `--space-32`, `--space-48`, `--space-64`).
- **Reason**: The numeric naming convention is more scalable, unambiguous, and consistent with modern design token practices. The semantic names (`small`, `medium`, `large`) don't scale beyond `xxxl` and create ambiguity about exact values.
- **Migration**: Replace all usages of old spacing tokens with their numeric equivalents. Run `npx stylelint --fix "**/*.scss"` with `@vibe/style/use-new-spacing-tokens` rule enabled to auto-fix.
- **Codemod**: ✅ Stylelint auto-fix via `@vibe/style/use-new-spacing-tokens` rule
Comment on lines +528 to +534
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Docs reference removed spacing vars 🐞 Bug ✓ Correctness

After removing --spacing-* tokens from @vibe/style, the v4 changelog/migration guide still
describe the “Input Padding” change using var(--spacing-medium)/var(--spacing-small), which are
no longer defined. Consumers may copy these snippets and end up with broken/ineffective CSS
variables.
Agent Prompt
### Issue description
The PR removes legacy semantic spacing CSS vars (`--spacing-*`), but some v4 documentation sections still reference those removed tokens (notably the “Input Padding” change). This makes the migration guidance inaccurate post-change.

### Issue Context
Consumers rely on VIBE4_CHANGELOG.md and VIBE4_MIGRATION_GUIDE.md for copy/paste-ready examples. After removing the token definitions, any remaining references to `--spacing-small`/`--spacing-medium` will not resolve.

### Fix Focus Areas
- VIBE4_CHANGELOG.md[508-513]
- VIBE4_MIGRATION_GUIDE.md[536-572]
- packages/style/src/spacing.scss[1-14]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

- **PR**: TBD

<!-- Add styling changes as they are identified -->
Expand Down
48 changes: 48 additions & 0 deletions VIBE4_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,54 @@ const renderer: (item: VirtualizedGridItemType, index: number, style: CSSPropert

For component-specific migration details, see [VIBE4_CHANGELOG.md](./VIBE4_CHANGELOG.md).

---

## CSS Design Tokens

### Spacing Tokens

The deprecated semantic spacing CSS custom properties have been removed. Replace them with the numeric spacing tokens:

| Removed Token | Replacement |
|---|---|
| `--spacing-xs` | `--space-4` |
| `--spacing-small` | `--space-8` |
| `--spacing-medium` | `--space-16` |
| `--spacing-large` | `--space-24` |
| `--spacing-xl` | `--space-32` |
| `--spacing-xxl` | `--space-48` |
| `--spacing-xxxl` | `--space-64` |

**Before (v3)**

```scss
.my-component {
padding: var(--spacing-small) var(--spacing-medium);
margin-block-end: var(--spacing-large);
gap: var(--spacing-xs);
}
```

**After (v4)**

```scss
.my-component {
padding: var(--space-8) var(--space-16);
margin-block-end: var(--space-24);
gap: var(--space-4);
}
```

**Automated fix:** If you have the `@vibe/style` stylelint plugin configured, run:

```bash
npx stylelint --fix "**/*.scss"
```

The `@vibe/style/use-new-spacing-tokens` rule will automatically replace all legacy token references.

---

## Common Migration Patterns

### Prop Renames
Expand Down
10 changes: 5 additions & 5 deletions packages/base/src/BaseInput/BaseInput.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
position: relative;
display: flex;
align-items: center;
gap: var(--spacing-small);
padding-block: var(--spacing-xs);
padding-inline: var(--spacing-medium) var(--spacing-xs);
gap: var(--space-8);
padding-block: var(--space-4);
padding-inline: var(--space-16) var(--space-4);

@include vibe-text(text1, normal);
@include smoothing-text;
Expand All @@ -33,11 +33,11 @@
&.large {
min-height: 48px;
height: 48px;
padding-block: var(--spacing-small);
padding-block: var(--space-8);
}

&.rightThinnerPadding {
padding-inline-end: var(--spacing-medium);
padding-inline-end: var(--space-16);
}

&:hover {
Expand Down
18 changes: 9 additions & 9 deletions packages/components/button/src/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ $disabled-on-primary-color-opacity: 0.5;
}

.marginRight {
margin-inline-end: var(--spacing-small);
margin-inline-end: var(--space-8);
}

.marginLeft {
margin-inline-start: var(--spacing-small);
margin-inline-start: var(--space-8);
}

.rightFlat {
Expand All @@ -78,33 +78,33 @@ $disabled-on-primary-color-opacity: 0.5;
}

.button .leftIcon {
margin-inline-end: var(--spacing-small);
margin-inline-end: var(--space-8);
}

.button .rightIcon {
margin-inline-start: var(--spacing-small);
margin-inline-start: var(--space-8);
}

.sizeXxs {
@include smoothing-text;
@include vibe-text(text2, normal);
padding: 2px var(--spacing-xs);
padding: 2px var(--space-4);
height: 16px;
line-height: 16px;
}

.sizeXs {
@include smoothing-text;
@include vibe-text(text2, normal);
padding: var(--spacing-xs) var(--spacing-small);
padding: var(--space-4) var(--space-8);
height: 24px;
line-height: 21px;
}

.sizeSmall {
@include smoothing-text;
@include vibe-text(text2, normal);
padding: var(--spacing-xs) var(--spacing-small);
padding: var(--space-4) var(--space-8);
height: 32px;
line-height: 24px;
}
Expand All @@ -116,14 +116,14 @@ $disabled-on-primary-color-opacity: 0.5;
.sizeMedium {
@include smoothing-text;
@include vibe-text(text1, normal);
padding: var(--spacing-small) var(--spacing-medium);
padding: var(--space-8) var(--space-16);
height: 40px;
}

.sizeLarge {
@include smoothing-text;
@include vibe-text(text1, normal);
padding: 12px var(--spacing-large);
padding: 12px var(--space-24);
height: 48px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
}

.sizeSmall {
padding: var(--spacing-small);
padding: var(--space-8);
}

.sizeMedium {
padding: var(--spacing-medium);
padding: var(--space-16);
}

.sizeLarge {
padding: var(--spacing-large);
padding: var(--space-24);
}

.typePopover {
Expand Down
14 changes: 7 additions & 7 deletions packages/components/layout/src/Box/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/* stylelint-disable scss/at-if-no-null */
$utility-spacing-vars: (
0: 0,
xs: var(--spacing-xs),
small: var(--spacing-small),
medium: var(--spacing-medium),
large: var(--spacing-large),
xl: var(--spacing-xl),
xxl: var(--spacing-xxl),
xxxl: var(--spacing-xxxl)
xs: var(--space-4),
small: var(--space-8),
medium: var(--space-16),
large: var(--space-24),
xl: var(--space-32),
xxl: var(--space-48),
xxxl: var(--space-64)
);

$utility-border-colors-vars: (
Expand Down
8 changes: 7 additions & 1 deletion packages/components/layout/src/Flex/Flex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ const Flex = forwardRef(
if (typeof gap === "number") {
return { gap: `${gap}px` };
}
return { gap: `var(--spacing-${gap})` };
const gapTokenMap: Record<string, string> = {
xs: "var(--space-4)",
small: "var(--space-8)",
medium: "var(--space-16)",
large: "var(--space-24)"
};
return { gap: gapTokenMap[gap] };
}, [gap]);

const flexStyle = useMemo(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/tooltip/src/Tooltip/Tooltip.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
.content {
word-break: break-word;
display: inline-block;
padding: var(--tooltip-padding, #{var(--spacing-small) var(--spacing-medium)});
padding: var(--tooltip-padding, #{var(--space-8) var(--space-16)});
}
}

.tooltip.paddingSizeMd {
border-radius: var(--border-radius-medium);
padding: var(--spacing-medium);
padding: var(--space-16);
@include vibe-text(text2, normal);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/components/typography/src/Text/Text.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ p:first-of-type.text {
}

p.text + p {
margin-block-start: var(--spacing-large);
margin-block-start: var(--space-24);
margin-block-end: 0;
}

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
min-width: 0;
align-items: center;
justify-content: center;
padding-inline-start: var(--spacing-medium);
padding-inline-start: var(--space-16);
}

.closeButtonWrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
}

.marginLeft {
margin-inline-start: var(--spacing-small);
margin-inline-start: var(--space-8);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
}

.marginLeft {
margin-inline-start: var(--spacing-small);
margin-inline-start: var(--space-8);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
}

.marginLeft {
margin-inline-start: var(--spacing-small);
margin-inline-start: var(--space-8);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
}

.avatarContainer {
margin-inline-start: calc(-1 * var(--spacing-small));
margin-inline-start: calc(-1 * var(--space-8));
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: flex;
justify-content: center;
align-items: center;
margin-inline-start: calc(-1 * var(--spacing-small));
margin-inline-start: calc(-1 * var(--space-8));
z-index: 1;
border: 1px solid var(--primary-background-color);

Expand Down Expand Up @@ -36,7 +36,7 @@
}
&.large {
@include counterSize($avatar-size-large);
padding: 0 var(--spacing-xs);
padding: 0 var(--space-4);
}

&.primary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

.tooltipContainer {
max-height: 300px;
padding-inline-end: var(--spacing-medium);
padding-inline-end: var(--space-16);
align-items: flex-start !important;
overflow-x: visible;
overflow-y: auto;
margin-top: var(--spacing-small);
margin-top: var(--space-8);
&:focus,
&:focus-visible,
&.focus-visible { /* stylelint-disable-line selector-class-pattern */
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/components/BaseItem/BaseItem.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.wrapper {
display: flex;
align-items: center;
gap: var(--spacing-xs);
gap: var(--space-4);
border-radius: var(--border-radius-small);
color: var(--primary-text-color);
cursor: pointer;
Expand Down Expand Up @@ -33,7 +33,7 @@
}

&.small {
padding: 6px var(--spacing-small);
padding: 6px var(--space-8);
}

&.medium {
Expand All @@ -54,7 +54,7 @@
}

.endElement {
padding-inline-start: var(--spacing-small);
padding-inline-start: var(--space-8);
margin-inline-start: auto;
display: flex;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/Checkbox/Checkbox.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $checkbox-size: 16px;
@include smoothing-text;
cursor: pointer;
user-select: none;
margin-inline-start: var(--spacing-small);
margin-inline-start: var(--space-8);
}

/* Since it is not possible to change the design of the checkbox according to the requirements using css, */
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/components/Chips/Chips.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
padding: 0 8px;
align-items: center;
justify-content: center;
margin: var(--chips-margin, #{0 var(--spacing-xs)});
margin: var(--chips-margin, #{0 var(--space-4)});
user-select: none;
@include smoothing-text;
color: var(--primary-text-color);
Expand Down Expand Up @@ -40,13 +40,13 @@
.customRenderer {
min-width: 18px;
&.left {
margin-inline-end: var(--spacing-xs);
margin-inline-end: var(--space-4);
}
&.right {
margin-inline-start: var(--spacing-xs);
margin-inline-start: var(--space-4);
}
&.close {
margin-inline-start: var(--spacing-xs);
margin-inline-start: var(--space-4);
color: var(--primary-text-color);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.clearColorIcon {
margin-inline-end: var(--spacing-small);
margin-inline-end: var(--space-8);
}

.clearColorButton {
margin-top: var(--spacing-small);
margin-top: var(--space-8);
}
Loading