forked from ConciseCSS/concise.css
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_conditional.scss
More file actions
128 lines (113 loc) · 2.45 KB
/
_conditional.scss
File metadata and controls
128 lines (113 loc) · 2.45 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//------------------------------------
// CONDITIONAL
//------------------------------------
// Silent Classes
// (mixins have to be used instead of proper silent classes
// because of the scope of `@include` inside of media queries.)
@mixin show-conditional {
display: block;
visibility: visible;
}
@mixin hide-conditional {
display: none;
visibility: hidden;
}
@if $use-conditional == true {
// Thanks to Bootstrap for having a good method of
// showing/hiding content via breakpoints
// (http://getbootstrap.com/css/#responsive-utilities)
.show-extra-small,
.hide-small,
.hide-medium,
.hide-large,
.hide-extra-large,
.hide-print,
.hide-hd {
@include show-conditional;
}
.hide-extra-small,
.show-small,
.show-medium,
.show-large,
.show-extra-large,
.show-print,
.show-hd {
@include hide-conditional;
}
@include breakpoint(small) {
.show-small,
.hide-extra-small,
.hide-medium,
.hide-large,
.hide-extra-large {
@include show-conditional;
}
.hide-small,
.show-extra-small,
.show-medium,
.show-large,
.show-extra-large {
@include hide-conditional;
}
}
@include breakpoint(medium) {
.show-medium,
.hide-small,
.hide-extra-small,
.hide-large,
.hide-extra-large {
@include show-conditional;
}
.hide-medium,
.show-small,
.show-extra-small,
.show-large,
.show-extra-large {
@include hide-conditional;
}
}
@include breakpoint(large) {
.show-large,
.hide-extra-small,
.hide-small,
.hide-medium,
.hide-extra-large {
@include show-conditional;
}
.hide-large,
.show-extra-small,
.show-small,
.show-medium,
.show-extra-large {
@include hide-conditional;
}
}
@include breakpoint(extra-large) {
.show-extra-large,
.hide-extra-small,
.hide-small,
.hide-medium,
.hide-large {
@include show-conditional;
}
.hide-extra-large,
.show-extra-small,
.show-small,
.show-medium,
.show-large {
@include hide-conditional;
}
}
// HiDPI and retina
@media only screen and (-moz-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3 / 2),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
.show-hd {
@include show-conditional;
}
.hide-hd {
@include hide-conditional;
}
}
}