-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmq_utils.scss
114 lines (96 loc) · 2.18 KB
/
mq_utils.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* ==========================================================================
Media queries Utilities
========================================================================== */
// Mq breakepoints
$mqSmartphone: 320px;
$mqSmartphoneLandscape: 480px;
$mqMobile: 360px;
$mqMobileLandscape: 640px;
$mqTablet: 768px;
$mqTabletLangscape: 1024px;
$mqBreakSm: 800px;
// Bootstrap
$mqSmall: $mqTablet;
$mqMedium: 992px;
$mqLage: 1200px;
$mqXLarge: 1280px;
// Max width 320px
@mixin smartphone() {
@media screen and (max-width: $mqSmartphone) {
@content;
}
}
// Max width 480px
@mixin smartphone-landscape() {
@media screen and (max-width: $mqSmartphoneLandscape) {
@content;
}
}
// Max width 360px
@mixin mobile() {
@media screen and (max-width: $mqMobile) {
@content;
}
}
// Max width 640px
@mixin mobile-landscape() {
@media screen and (max-width: $mqMobileLandscape) {
@content;
}
}
// Max width 768px
@mixin tablet() {
@media screen and (max-width: $mqTablet) {
@content;
}
}
// Max width 1024px
@mixin tablet-landscape() {
@media screen and (max-width: $mqTabletLangscape) {
@content;
}
}
// Max width 800px
@mixin break() {
@media screen and (max-width: $mqBreakSm) {
@content;
}
}
/* Bootstrap MQ
========================================================================== */
// < 480px
@mixin xxsmall() {
@media screen and (max-width: $mqSmartphoneLandscape - 1) {
@content;
}
}
// >= 480px && < 768px
@mixin xsmall() {
@media screen and (min-width: mqSmartphoneLandscape) and (max-width: $mqSmall - 1) {
@content;
}
}
// >= 768px && <= 991px
@mixin small() {
@media screen and (min-width: $mqSmall) and (max-width: $mqMedium - 1) {
@content;
}
}
// >= 992px && <= 1199px
@mixin medium() {
@media screen and (min-width: $mqMedium) and (max-width: $mqLage - 1) {
@content;
}
}
// >= 1200px && <= 1279px
@mixin large() {
@media screen and (min-width: $mqLage) and (max-width: $mqXLarge - 1) {
@content;
}
}
// >= 1280px
@mixin xlarge() {
@media screen and (min-width: $mqXLarge) {
@content;
}
}