Skip to content

Commit 5d9afe0

Browse files
nmergetgithub-actions[bot]mfranzke
authored
feat: add container and screen sizes (#4486)
* feat: add container and screen sizes * auto update snapshots (#4488) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Maximilian Franzke <[email protected]>
1 parent 4378c6f commit 5d9afe0

File tree

14 files changed

+108
-10
lines changed

14 files changed

+108
-10
lines changed
Loading
4 Bytes
Loading
-157 Bytes
Loading
Loading
-455 Bytes
Loading
-1.27 KB
Loading
-731 Bytes
Loading

docs/migration/v2.x.x-to-v3.0.0.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ Please provide the correct `type` property in your code anyhow as a best practis
1616
We removed the `state` property from the `db-button`/`DBButton` component for now.
1717
It wasn't implemented in any framework causing some confusion, and we will reintroduce it in a future version.
1818

19+
## breakpoints
20+
21+
We updated some breakpoints to align with design:
22+
23+
- `$db-screen-size-xs: 360` ➡️ `$db-screen-size-xs: 320`
24+
- `$db-screen-size-sm: 720` ➡️ `$db-screen-size-sm: 768`
25+
1926
## icon-before/-after
2027

2128
We renamed the `data-icon-after` and `data-icon-before` properties to `data-icon-trailing` and `data-icon-leading`,

packages/components/src/styles/internal/_popover-component.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
225225
}
226226
}
227227

228-
$max-mobile-size: calc(100vw - 2 * #{variables.$db-spacing-fixed-md});
229-
230228
%default-popover {
231229
@extend %default-card;
232230
@extend %popover-placement;
@@ -238,13 +236,12 @@ $max-mobile-size: calc(100vw - 2 * #{variables.$db-spacing-fixed-md});
238236
z-index: 1337;
239237
// revert this if popover is included in button
240238
white-space: normal;
241-
max-inline-size: $max-mobile-size;
239+
max-inline-size: variables.$db-container-xs;
242240
block-size: fit-content;
243241
inline-size: fit-content;
244242

245243
&[data-width="fixed"] {
246244
inline-size: max-content;
247-
max-inline-size: min(#{variables.$db-sizing-3xl}, #{$max-mobile-size});
248245
text-align: initial;
249246
}
250247
}

packages/foundations/scss/_screen-sizes.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@use "helpers";
22
@use "sass:map";
33

4-
$db-screen-size-xs: 360; // mobile
5-
$db-screen-size-sm: 720; // tablet
4+
$db-screen-size-xs: 320; // mobile
5+
$db-screen-size-sm: 768; // tablet
66
$db-screen-size-md: 1024; // small desktop
77
$db-screen-size-lg: 1440; // regular desktop
88
$db-screen-size-xl: 1920; // large desktop
@@ -14,25 +14,25 @@ $db-breakpoint-lg: helpers.px-to-em($db-screen-size-lg);
1414
$db-breakpoint-xl: helpers.px-to-em($db-screen-size-xl);
1515

1616
@mixin get-breakpoint-properties() {
17-
@property --db-breakpoint-xs {
17+
@property --db-screen-xs {
1818
syntax: "*";
1919
inherits: true;
2020
initial-value: #{$db-breakpoint-xs};
2121
}
2222

23-
@property --db-breakpoint-sm {
23+
@property --db-screen-sm {
2424
syntax: "*";
2525
inherits: true;
2626
initial-value: #{$db-breakpoint-sm};
2727
}
2828

29-
@property --db-breakpoint-md {
29+
@property --db-screen-md {
3030
syntax: "*";
3131
inherits: true;
3232
initial-value: #{$db-breakpoint-md};
3333
}
3434

35-
@property --db-breakpoint-xl {
35+
@property --db-screen-xl {
3636
syntax: "*";
3737
inherits: true;
3838
initial-value: #{$db-breakpoint-xl};

0 commit comments

Comments
 (0)