Skip to content

Commit

Permalink
[breakpoints] Increase step to 5, fix media query matching on Safari (#…
Browse files Browse the repository at this point in the history
…8846)

Fixes #8843
  • Loading branch information
dangh authored and oliviertassinari committed Oct 25, 2017
1 parent 16b4ec4 commit 24be02e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/styles/createBreakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function createBreakpoints(breakpoints: Object) {
xl: 1920,
},
unit = 'px',
step = 1,
step = 5,
...other
} = breakpoints;

Expand Down
6 changes: 3 additions & 3 deletions src/styles/createBreakpoints.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ describe('createBreakpoints', () => {

describe('down', () => {
it('should work', () => {
assert.strictEqual(breakpoints.down('md'), '@media (max-width:959.99px)');
assert.strictEqual(breakpoints.down('md'), '@media (max-width:959.95px)');
});
});

describe('between', () => {
it('should work', () => {
assert.strictEqual(
breakpoints.between('sm', 'md'),
'@media (min-width:600px) and (max-width:1279.99px)',
'@media (min-width:600px) and (max-width:1279.95px)',
);
});
});
Expand All @@ -39,7 +39,7 @@ describe('createBreakpoints', () => {
it('should work', () => {
assert.strictEqual(
breakpoints.only('md'),
'@media (min-width:960px) and (max-width:1279.99px)',
'@media (min-width:960px) and (max-width:1279.95px)',
);
});

Expand Down

0 comments on commit 24be02e

Please sign in to comment.