Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 37a0b85

Browse files
ThomasBurlesonmmalerba
authored andcommitted
fix(breakpoints): support print media (#367)
Previous breakpoints defined mediaQueries like `screen and (max-width: 599px)`. This means that all responsive layouts (using .xs, .sm, etc.) will not print properly since `@media print` is excluded by the `screen and ...` breakpoint definitions. Remove all `screen and ` @media prefixes; so the layouts will appear the same on both display and print devices. Fixes #361.
1 parent 635c4f5 commit 37a0b85

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/lib/media-query/breakpoints/data/break-points.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -14,63 +14,63 @@ export const RESPONSIVE_ALIASES = [
1414
export const DEFAULT_BREAKPOINTS: BreakPoint[] = [
1515
{
1616
alias: 'xs',
17-
mediaQuery: 'screen and (max-width: 599px)'
17+
mediaQuery: '(max-width: 599px)'
1818
},
1919
{
2020
alias: 'gt-xs',
2121
overlapping: true,
22-
mediaQuery: 'screen and (min-width: 600px)'
22+
mediaQuery: '(min-width: 600px)'
2323
},
2424
{
2525
alias: 'lt-sm',
2626
overlapping: true,
27-
mediaQuery: 'screen and (max-width: 599px)'
27+
mediaQuery: '(max-width: 599px)'
2828
},
2929
{
3030
alias: 'sm',
31-
mediaQuery: 'screen and (min-width: 600px) and (max-width: 959px)'
31+
mediaQuery: '(min-width: 600px) and (max-width: 959px)'
3232
},
3333
{
3434
alias: 'gt-sm',
3535
overlapping: true,
36-
mediaQuery: 'screen and (min-width: 960px)'
36+
mediaQuery: '(min-width: 960px)'
3737
},
3838
{
3939
alias: 'lt-md',
4040
overlapping: true,
41-
mediaQuery: 'screen and (max-width: 959px)'
41+
mediaQuery: '(max-width: 959px)'
4242
},
4343
{
4444
alias: 'md',
45-
mediaQuery: 'screen and (min-width: 960px) and (max-width: 1279px)'
45+
mediaQuery: '(min-width: 960px) and (max-width: 1279px)'
4646
},
4747
{
4848
alias: 'gt-md',
4949
overlapping: true,
50-
mediaQuery: 'screen and (min-width: 1280px)'
50+
mediaQuery: '(min-width: 1280px)'
5151
},
5252
{
5353
alias: 'lt-lg',
5454
overlapping: true,
55-
mediaQuery: 'screen and (max-width: 1279px)'
55+
mediaQuery: '(max-width: 1279px)'
5656
},
5757
{
5858
alias: 'lg',
59-
mediaQuery: 'screen and (min-width: 1280px) and (max-width: 1919px)'
59+
mediaQuery: '(min-width: 1280px) and (max-width: 1919px)'
6060
},
6161
{
6262
alias: 'gt-lg',
6363
overlapping: true,
64-
mediaQuery: 'screen and (min-width: 1920px)'
64+
mediaQuery: '(min-width: 1920px)'
6565
},
6666
{
6767
alias: 'lt-xl',
6868
overlapping: true,
69-
mediaQuery: 'screen and (max-width: 1920px)'
69+
mediaQuery: '(max-width: 1920px)'
7070
},
7171
{
7272
alias: 'xl',
73-
mediaQuery: 'screen and (min-width: 1920px) and (max-width: 5000px)'
73+
mediaQuery: '(min-width: 1920px) and (max-width: 5000px)'
7474
}
7575
];
7676

0 commit comments

Comments
 (0)