-
Notifications
You must be signed in to change notification settings - Fork 29
/
media-queries.scss
92 lines (78 loc) · 1.55 KB
/
media-queries.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
// media aliases and breakpoints
$screen-sm-min: 600px;
$screen-md-min: 960px;
$screen-lg-min: 1280px;
$screen-xl-min: 1920px;
$screen-xs-max: 599px;
$screen-sm-max: 959px;
$screen-md-max: 1279px;
$screen-lg-max: 1919px;
$screen-xl-max: 5000px;
// media devices
@mixin xs {
@media screen and (max-width: #{$screen-xs-max}) {
@content;
}
}
@mixin sm {
@media screen and (min-width: #{$screen-sm-min}) and (max-width: #{$screen-sm-max}) {
@content;
}
}
@mixin md {
@media screen and (min-width: #{$screen-md-min}) and (max-width: #{$screen-md-max}) {
@content;
}
}
@mixin lg {
@media screen and (min-width: #{$screen-lg-min}) and (max-width: #{$screen-lg-max}) {
@content;
}
}
@mixin xl {
@media screen and (min-width: #{$screen-xl-min}) and (max-width: #{$screen-xl-max}) {
@content;
}
}
// media lt queries
@mixin lt-sm {
@media screen and (max-width: #{$screen-xs-max}) {
@content;
}
}
@mixin lt-md {
@media screen and (max-width: #{$screen-sm-max}) {
@content;
}
}
@mixin lt-lg {
@media screen and (max-width: #{$screen-md-max}) {
@content;
}
}
@mixin lt-xl {
@media screen and (max-width: #{$screen-lg-max}) {
@content;
}
}
// media gt queries
@mixin gt-xs {
@media screen and (min-width: #{$screen-sm-min}) {
@content;
}
}
@mixin gt-sm {
@media screen and (min-width: #{$screen-md-min}) {
@content;
}
}
@mixin gt-md {
@media screen and (min-width: #{$screen-lg-min}) {
@content;
}
}
@mixin gt-lg {
@media screen and (min-width: #{$screen-xl-min}) {
@content;
}
}