Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit b493935

Browse files
committed
Viewport: Add Breakpoints
1 parent 7e4ad28 commit b493935

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

scss/atoms/typography/_typography.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
body {
1313
font: $normal #{ map-get( $defaultFont, font-size ) }/1.5 $sans;
1414

15-
@media ( max-width: 800px ) {
15+
@media ( max-width: $viewport-md-min ) {
1616
font-size: 16px;
1717
}
18-
@media ( max-width: 500px ) {
18+
@media ( max-width: $viewport-sm-min ) {
1919
font-size: 14px;
2020
}
2121
}

scss/variables/breakpoints.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
( function( root, factory ) {
2+
if ( typeof define === "function" && define.amd ) {
3+
define( [ "./chassis" ], factory );
4+
} else if ( typeof exports === "object" ) {
5+
module.exports = factory( require( "./chassis" ) );
6+
} else {
7+
root.chassis = factory( root.chassis );
8+
}
9+
}( this, function( chassis ) {
10+
11+
chassis.breakpoints = {
12+
13+
"viewport-sm-min": {
14+
name: "Viewport Breakpoint - Small Minimum Width",
15+
value: "400px"
16+
},
17+
"viewport-md-min": {
18+
name: "Viewport Breakpoint - Medium Minimum Width",
19+
value: "768px"
20+
},
21+
"viewport-lg-min": {
22+
name: "Viewport Breakpoint - Large Minimum Width",
23+
value: "920px"
24+
},
25+
"viewport-xl-min": {
26+
name: "Viewport - Extra Large Minimum Width",
27+
value: "1200px"
28+
}
29+
};
30+
31+
return chassis;
32+
} ) );

0 commit comments

Comments
 (0)