Skip to content

Commit 1fd03e9

Browse files
Floating and clearing per breakpoint
1 parent 641401a commit 1fd03e9

File tree

1 file changed

+95
-14
lines changed

1 file changed

+95
-14
lines changed

sass/base/utility.scss

Lines changed: 95 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,112 @@
55
list-style: none;
66
}
77

8-
/* Text alignment */
9-
.ta-left {
10-
text-align: left;
8+
/* Text alignment per breakpoint */
9+
.ta-left { text-align: left; }
10+
.ta-right { text-align: right; }
11+
.ta-center { text-align: center; }
12+
13+
@media only screen and (min-width: $b1) {
14+
.ta-left-b1 { text-align: left; }
15+
.ta-right-b1 { text-align: right; }
16+
.ta-center-b1 { text-align: center; }
17+
}
18+
@media only screen and (min-width: $b2) {
19+
.ta-left-b2 { text-align: left; }
20+
.ta-right-b2 { text-align: right; }
21+
.ta-center-b2 { text-align: center; }
22+
}
23+
@media only screen and (min-width: $b3) {
24+
25+
.ta-left-b3 { text-align: left; }
26+
.ta-right-b3 { text-align: right; }
27+
.ta-center-b3 { text-align: center; }
1128
}
12-
.ta-center {
13-
text-align: center;
29+
@media only screen and (min-width: $b4) {
30+
.ta-left-b4 { text-align: left; }
31+
.ta-right-b4 { text-align: right; }
32+
.ta-center-b4 { text-align: center; }
1433
}
15-
.ta-right {
16-
text-align: right;
34+
@media only screen and (min-width: $b5) {
35+
.ta-left-b5 { text-align: left; }
36+
.ta-right-b5 { text-align: right; }
37+
.ta-center-b5 { text-align: center; }
38+
}
39+
@media only screen and (min-width: $b6) {
40+
.ta-left-b6 { text-align: left; }
41+
.ta-right-b6 { text-align: right; }
42+
.ta-center-b6 { text-align: center; }
1743
}
1844

19-
/* Floating classes */
45+
/* Floating and clearing classes per breakpoint */
2046
.fl { float: left; }
21-
.fr { float: right; }
47+
.fr { float: right;}
48+
.fn { float: none; }
49+
.cl { clear: left; }
50+
.cr { clear: right;}
51+
.cb { clear: both; }
52+
.cn { clear: none; }
53+
54+
@media only screen and (min-width: $b1) {
55+
.fl-b1 { float: left; }
56+
.fr-b1 { float: right; }
57+
.fn-b1 { float: none; }
58+
.cl-b1 { clear: left; }
59+
.cr-b1 { clear: right;}
60+
.cb-b1 { clear: both; }
61+
.cn-b1 { clear: none; }
62+
}
63+
@media only screen and (min-width: $b2) {
64+
.fl-b2 { float: left; }
65+
.fr-b2 { float: right; }
66+
.fn-b2 { float: none; }
67+
.cl-b2 { clear: left; }
68+
.cr-b2 { clear: right;}
69+
.cb-b2 { clear: both; }
70+
.cn-b2 { clear: none; }
71+
}
72+
@media only screen and (min-width: $b3) {
73+
.fl-b3 { float: left; }
74+
.fr-b3 { float: right; }
75+
.fn-b3 { float: none; }
76+
.cl-b3 { clear: left; }
77+
.cr-b3 { clear: right;}
78+
.cb-b3 { clear: both; }
79+
.cn-b3 { clear: none; }
80+
}
81+
@media only screen and (min-width: $b4) {
82+
.fl-b4 { float: left; }
83+
.fr-b4 { float: right; }
84+
.fn-b4 { float: none; }
85+
.cl-b4 { clear: left; }
86+
.cr-b4 { clear: right;}
87+
.cb-b4 { clear: both; }
88+
.cn-b4 { clear: none; }
89+
}
90+
@media only screen and (min-width: $b5) {
91+
.fl-b5 { float: left; }
92+
.fr-b5 { float: right; }
93+
.fn-b5 { float: none; }
94+
.cl-b5 { clear: left; }
95+
.cr-b5 { clear: right;}
96+
.cb-b5 { clear: both; }
97+
.cn-b5 { clear: none; }
98+
}
99+
@media only screen and (min-width: $b6) {
100+
.fl-b6 { float: left; }
101+
.fr-b6 { float: right; }
102+
.fn-b6 { float: none; }
103+
.cl-b6 { clear: left; }
104+
.cr-b6 { clear: right;}
105+
.cb-b6 { clear: both; }
106+
.cn-b6 { clear: none; }
107+
}
22108

23109
/* Border-radius */
24110
.radius {
25111
border-radius: $radius;
26112
}
27113

28-
/* Floating classes */
29-
.fl { float: left; }
30-
.fr { float: right; }
31-
.fn { float: none; }
32-
33114
/* Clearfix */
34115
.cf:before, .cf:after, ul.fields > li:before, ul.fields > li:after {content:"";display:table;}
35116
.cf:after, .g:after, ul.fields > li:after {clear:both;}

0 commit comments

Comments
 (0)