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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
/*
UTILITIES
---------
Responsive helper classes to assist you in quickly doing basic formatting and layout.
Features:
- Vertical alignment
- Visibility
- Text alignment
- Floating
*/
$block-selector: '[class*="grid-block"]';
@mixin show-for($size, $prop: block) {
&:not(.ng-hide) {
display: none !important;
@include breakpoint($size) {
display: $prop !important;
}
}
}
@mixin show-for-only($size, $prop: block) {
&:not(.ng-hide) {
display: none !important;
@include breakpoint($size only) {
display: $prop !important;
}
}
}
@mixin hide-for($size, $prop: block) {
&:not(.ng-hide) {
display: $prop !important;
@include breakpoint($size) {
display: none !important;
}
}
}
@mixin hide-for-only($size, $prop: block) {
&:not(.ng-hide) {
display: $prop !important;
@include breakpoint($size only) {
display: none !important;
}
}
}
@include exports(utilities) {
// Vertical alignment
.v-align {
display: flex;
align-items: center;
justify-content: space-between;
$align-values: (
'top': flex-start,
'center': center,
'bottom': flex-end,
);
@each $orient in (top, center, bottom) {
.align-#{$orient} {
align-self: map-get($align-values, $orient);
}
}
@each $size in $breakpoint-classes {
@each $orient in (top, center, bottom) {
@include breakpoint($size) {
.#{$size}-align-#{$orient} {
align-self: map-get($align-values, $orient);
}
}
}
}
}
// Visibility
.hide { display: none !important; }
.invisible { visibility: hidden; }
@each $size in $breakpoint-classes {
.hide-for-#{$size} {
@include hide-for($size);
&#{$block-selector} { @include hide-for($size, flex); }
}
.show-for-#{$size} {
@include show-for($size);
&#{$block-selector} { @include show-for($size, flex); }
}
.hide-for-#{$size}-only {
@include hide-for-only($size);
&#{$block-selector} { @include hide-for-only($size, flex); }
}
.show-for-#{$size}-only {
@include show-for-only($size);
&#{$block-selector} { @include show-for-only($size, flex); }
}
}
@each $orientation in (portrait, landscape) {
.hide-for-#{$orientation} {
@include breakpoint($orientation) {
display: none !important;
&#{$block-selector} { display: flex !important; }
}
}
.show-for-#{$orientation} {
display: none !important;
@include breakpoint($orientation) {
display: block !important;
&#{$block-selector} { display: flex !important; }
}
}
}
/*
Text alignment
*/
@each $align in (left, right, center, justify) {
.text-#{$align} {
text-align: $align;
}
@each $size in $breakpoint-classes {
@include breakpoint($size) {
.#{$size}-text-#{$align} {
text-align: $align;
}
}
@include breakpoint($size only) {
.#{$size}-only-text-#{$align} {
text-align: $align;
}
}
}
}
/*
Floating
*/
.clearfix { @include clearfix; }
@each $float in (left, right, none) {
.float-#{$float} {
float: #{$float};
}
}
}
|