Skip to content

Commit 853ce33

Browse files
authored
feat(display): reduce default breakpoint sizes (#19759)
1 parent fb382d5 commit 853ce33

5 files changed

Lines changed: 33 additions & 33 deletions

File tree

packages/docs/src/components/features/BreakpointsTable.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,35 +76,35 @@
7676
device: 'small',
7777
code: 'sm',
7878
type: 'breakpoints-table.small-to-medium-tablet',
79-
range: '600px > < 960px',
79+
range: '600px > < 840px',
8080
},
8181
{
8282
icon: 'mdi-laptop',
8383
device: 'medium',
8484
code: 'md',
8585
type: 'breakpoints-table.large-tablet-to-laptop',
86-
range: '960px > < 1280px',
86+
range: '840px > < 1145px',
8787
},
8888
{
8989
icon: 'mdi-monitor-small',
9090
device: 'large',
9191
code: 'lg',
9292
type: 'breakpoints-table.desktop',
93-
range: '1280px > < 1920px',
93+
range: '1145px > < 1545px',
9494
},
9595
{
9696
icon: 'mdi-monitor',
9797
device: 'extra-large',
9898
code: 'xl',
9999
type: 'breakpoints-table.large-to-extra-large',
100-
range: '1920px > < 2560px',
100+
range: '1545px > < 2138px',
101101
},
102102
{
103103
icon: 'mdi-monitor-screenshot',
104104
device: 'extra-extra-large',
105105
code: 'xxl',
106106
type: 'breakpoints-table.extra-large-to-extra-extra-large',
107-
range: '> 2560px',
107+
range: '> 2138px',
108108
},
109109
]
110110

packages/docs/src/pages/en/features/display-and-platform.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,19 @@ In the following example, we use a switch statement and the current breakpoint n
148148
{
149149
// Breakpoints
150150
xs: boolean // 0 - 599
151-
sm: boolean // 600 - 959
152-
md: boolean // 960 - 1279
153-
lg: boolean // 1280 - 1919
154-
xl: boolean // > 1920
155-
xxl: boolean
156-
smAndDown: boolean // < 960
157-
smAndUp: boolean // > 600
158-
mdAndDown: boolean // < 1280
159-
mdAndUp: boolean // > 960
160-
lgAndDown: boolean // < 1919
161-
lgAndUp: boolean // > 1280
162-
xlAndDown: boolean
163-
xlAndUp: boolean // < 1920
151+
sm: boolean // 600 - 839
152+
md: boolean // 840 - 1144
153+
lg: boolean // 1145 - 1544
154+
xl: boolean // 1545 - 2137
155+
xxl: boolean // >= 2138
156+
smAndDown: boolean // < 840
157+
smAndUp: boolean // > 599
158+
mdAndDown: boolean // < 1145
159+
mdAndUp: boolean // > 839
160+
lgAndDown: boolean // < 1545
161+
lgAndUp: boolean // > 1144
162+
xlAndDown: boolean // < 2138
163+
xlAndUp: boolean // > 1544
164164

165165
// true if screen width < mobileBreakpoint
166166
mobile: boolean

packages/vuetify/src/composables/__tests__/display.spec.browser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ describe('display', () => {
186186
description: 'WSXGA+ (landscape)',
187187
width: 1680,
188188
height: 1050,
189-
name: 'lg',
189+
name: 'xl',
190190
},
191191
[
192-
'lg',
192+
'xl',
193193
'smAndUp',
194194
'mdAndUp',
195-
'lgAndDown',
196195
'lgAndUp',
197196
'xlAndDown',
197+
'xlAndUp',
198198
],
199199
],
200200
[

packages/vuetify/src/composables/display.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ const defaultDisplayOptions: DisplayOptions = {
8888
thresholds: {
8989
xs: 0,
9090
sm: 600,
91-
md: 960,
92-
lg: 1280,
93-
xl: 1920,
94-
xxl: 2560,
91+
md: 840,
92+
lg: 1145,
93+
xl: 1545,
94+
xxl: 2138,
9595
},
9696
}
9797

packages/vuetify/src/styles/settings/_variables.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ $grid-breakpoints: map-deep-merge(
125125
(
126126
'xs': 0,
127127
'sm': 600px,
128-
'md': 960px,
129-
'lg': 1280px,
130-
'xl': 1920px,
131-
'xxl': 2560px,
128+
'md': 840px,
129+
'lg': 1145px,
130+
'xl': 1545px,
131+
'xxl': 2138px,
132132
),
133133
$grid-breakpoints
134134
);
@@ -155,10 +155,10 @@ $container-max-widths: map-deep-merge(
155155
(
156156
'xs': null,
157157
'sm': null,
158-
'md': map.get($grid-breakpoints, 'md') * 0.9375,
159-
'lg': map.get($grid-breakpoints, 'lg') * 0.9375,
160-
'xl': map.get($grid-breakpoints, 'xl') * 0.9375,
161-
'xxl': map.get($grid-breakpoints, 'xxl') * 0.9375,
158+
'md': 100 * math.floor(map.get($grid-breakpoints, 'md') * 0.009375),
159+
'lg': 100 * math.floor(map.get($grid-breakpoints, 'lg') * 0.009375),
160+
'xl': 100 * math.floor(map.get($grid-breakpoints, 'xl') * 0.009375),
161+
'xxl': 100 * math.floor(map.get($grid-breakpoints, 'xxl') * 0.009375),
162162
),
163163
$container-max-widths
164164
);

0 commit comments

Comments
 (0)