Skip to content

Commit

Permalink
chore: dialog t-shirt sizing
Browse files Browse the repository at this point in the history
- adds deprecation notice for --small/--medium/--large class names,
in favor of the t-shirt sizing class names.
- create changeset
  • Loading branch information
marissahuysentruyt committed Oct 24, 2024
1 parent ef34600 commit fff09f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/nasty-pillows-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@spectrum-css/dialog": patch
---

Dialog t-shirt sizes

Adds support for t-shirt sizing class names to dialog CSS. `@deprecated` comments were added to communicate that the old class names (`--small`, `--medium`, and `--large`) will be removed in S2.
10 changes: 7 additions & 3 deletions components/dialog/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,28 @@
/* Allow 100% width, taking into account padding */
box-sizing: border-box;

/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
inline-size: fit-content;
/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
inline-size: var(--mod-dialog-confirm-medium-width, var(--spectrum-dialog-confirm-medium-width));
min-inline-size: var(--mod-dialog-min-inline-size, var(--spectrum-dialog-min-inline-size));
max-inline-size: 100%;

max-block-size: inherit;

outline: none;
}

/* @deprecated .spectrum-Dialog--small */
.spectrum-Dialog--sizeS,
.spectrum-Dialog--small {
inline-size: var(--mod-dialog-confirm-small-width, var(--spectrum-dialog-confirm-small-width));
}

/* @deprecated .spectrum-Dialog--medium */
.spectrum-Dialog--medium {
inline-size: var(--mod-dialog-confirm-medium-width, var(--spectrum-dialog-confirm-medium-width));
}

/* @deprecated .spectrum-Dialog--large */
.spectrum-Dialog--sizeL,
.spectrum-Dialog--large {
inline-size: var(--mod-dialog-confirm-large-width, var(--spectrum-dialog-confirm-large-width));
}
Expand Down

0 comments on commit fff09f9

Please sign in to comment.