Skip to content

Commit 21eed89

Browse files
authored
Fix tera breakpoint in <Grid /> (#305)
* Add > 1280px handling in Grid * Fix snapshot
1 parent 3b41f27 commit 21eed89

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

src/components/Grid/Grid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const baseStyles = ({ theme }) => css`
2424
${getBreakPointStyles(theme, 'kilo')};
2525
${getBreakPointStyles(theme, 'mega')};
2626
${getBreakPointStyles(theme, 'giga')};
27-
${getBreakPointStyles(theme, 'tera')};
27+
${getBreakPointStyles(theme, 'afterTera')};
2828
`;
2929

3030
/**

src/components/Grid/__snapshots__/Grid.spec.js.snap

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ exports[`Grid should render with default styles 1`] = `
3838
}
3939
}
4040
41+
@media (min-width:1280px) {
42+
.circuit-0 {
43+
max-width: 1200px;
44+
padding-left: calc(24px / 2);
45+
padding-right: calc(24px / 2);
46+
}
47+
}
48+
4149
<div
4250
className="circuit-0 circuit-1"
4351
/>

src/themes/circuit.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ export const grid = {
205205
cols: 12,
206206
maxWidth: '880px',
207207
gutter: spacings.giga
208+
},
209+
afterTera: {
210+
priority: 5,
211+
breakpoint: 'tera',
212+
cols: 12,
213+
maxWidth: '1200px',
214+
gutter: spacings.giga
208215
}
209216
};
210217

@@ -217,7 +224,8 @@ export const breakpoints = {
217224
megaToGiga: '(min-width: 768px) and (max-width: 959px)',
218225
giga: 960,
219226
gigaToTera: '(min-width: 960px) and (max-width: 1279px)',
220-
tera: 1280
227+
tera: 1280,
228+
afterTera: '(min-width: 1280px)'
221229
};
222230

223231
export const mq = createMediaQueries(breakpoints);

0 commit comments

Comments
 (0)