Skip to content

Commit b88b79d

Browse files
josephperrottjelbourn
authored andcommitted
fix(breakpoints): set max-widths for breakpoints to non-integers to handle subpixel queries (#13828)
1 parent 41cb8aa commit b88b79d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/cdk/layout/breakpoints.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
// PascalCase is being used as Breakpoints is used like an enum.
99
// tslint:disable-next-line:variable-name
1010
export const Breakpoints = {
11-
XSmall: '(max-width: 599px)',
12-
Small: '(min-width: 600px) and (max-width: 959px)',
13-
Medium: '(min-width: 960px) and (max-width: 1279px)',
14-
Large: '(min-width: 1280px) and (max-width: 1919px)',
11+
XSmall: '(max-width: 599.99px)',
12+
Small: '(min-width: 600px) and (max-width: 959.99px)',
13+
Medium: '(min-width: 960px) and (max-width: 1279.99px)',
14+
Large: '(min-width: 1280px) and (max-width: 1919.99px)',
1515
XLarge: '(min-width: 1920px)',
1616

17-
Handset: '(max-width: 599px) and (orientation: portrait), ' +
18-
'(max-width: 959px) and (orientation: landscape)',
19-
Tablet: '(min-width: 600px) and (max-width: 839px) and (orientation: portrait), ' +
20-
'(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)',
17+
Handset: '(max-width: 599.99px) and (orientation: portrait), ' +
18+
'(max-width: 959.99px) and (orientation: landscape)',
19+
Tablet: '(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), ' +
20+
'(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)',
2121
Web: '(min-width: 840px) and (orientation: portrait), ' +
2222
'(min-width: 1280px) and (orientation: landscape)',
2323

24-
HandsetPortrait: '(max-width: 599px) and (orientation: portrait)',
25-
TabletPortrait: '(min-width: 600px) and (max-width: 839px) and (orientation: portrait)',
24+
HandsetPortrait: '(max-width: 599.99px) and (orientation: portrait)',
25+
TabletPortrait: '(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)',
2626
WebPortrait: '(min-width: 840px) and (orientation: portrait)',
2727

28-
HandsetLandscape: '(max-width: 959px) and (orientation: landscape)',
29-
TabletLandscape: '(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)',
28+
HandsetLandscape: '(max-width: 959.99px) and (orientation: landscape)',
29+
TabletLandscape: '(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)',
3030
WebLandscape: '(min-width: 1280px) and (orientation: landscape)',
3131
};

0 commit comments

Comments
 (0)