Skip to content

Commit 5661526

Browse files
author
DNZ\darius
committed
2.0
2 parents 6b5ee95 + 56e9683 commit 5661526

File tree

7 files changed

+204
-487
lines changed

7 files changed

+204
-487
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "castlecss-core",
3-
"version": "1.8.1",
3+
"version": "2.0.0",
44
"description": "CastleCSS a SCSS framework with modular building blocks for the web",
55
"main": "index.js",
66
"scripts": {
@@ -25,5 +25,5 @@
2525
"bugs": {
2626
"url": "https://github.com/CastleCSS/castlecss-core/issues"
2727
},
28-
"homepage": "https://github.com/CastleCSS/castlecss-core#readme"
28+
"homepage": "http://www.castlecss.com"
2929
}

sass/base/utility.scss

Lines changed: 66 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
/* Set order per breakpoint */
2+
@for $i from 0 through 12 {
3+
&.order-#{ $i } {
4+
order: #{ $i };
5+
}
6+
}
7+
8+
/* Hide / show elements per breakpoint */
9+
.hide { display: none; }
10+
.show { display: block; }
11+
12+
@for $b from 1 through $amount-breakpoints {
13+
$breakpoint : map-get($breakpoint-map, $b);
14+
15+
@media only screen and (min-width: $breakpoint) {
16+
17+
/* Hide / show elements per breakpoint */
18+
.hide-b#{$b} { display: none; }
19+
.show-b#{$b} { display: block; }
20+
21+
@if $b > 0 {
22+
/* Set order per breakpoint */
23+
@for $i from 0 through 12 {
24+
&.order-b#{$b}-#{$i} {
25+
order: #{$i};
26+
}
27+
}
28+
}
29+
@if $b > 2 {
30+
/* Set order per breakpoint */
31+
@for $i from 13 through 24 {
32+
&.order-b#{$b}-#{ $i } {
33+
order: #{ $i };
34+
}
35+
}
36+
}
37+
38+
}
39+
}
40+
141
/* Unstyled list */
242
.list-unstyled {
343
margin: 0;
@@ -10,36 +50,17 @@
1050
.ta-right { text-align: right; }
1151
.ta-center { text-align: center; }
1252

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) {
53+
@for $b from 1 through $amount-breakpoints {
54+
$breakpoint : map-get($breakpoint-map, $b);
55+
56+
@media only screen and (min-width: $breakpoint) {
57+
58+
.ta-left-b#{$b} { text-align: left; }
59+
.ta-right-b#{$b} { text-align: right; }
60+
.ta-center-b#{$b} { text-align: center; }
61+
62+
}
2463

25-
.ta-left-b3 { text-align: left; }
26-
.ta-right-b3 { text-align: right; }
27-
.ta-center-b3 { text-align: center; }
28-
}
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; }
33-
}
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; }
4364
}
4465

4566
/* Floating and clearing classes per breakpoint */
@@ -51,59 +72,21 @@
5172
.cb { clear: both; }
5273
.cn { clear: none; }
5374

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; }
75+
@for $b from 1 through $amount-breakpoints {
76+
$breakpoint : map-get($breakpoint-map, $b);
77+
78+
@media only screen and (min-width: $breakpoint) {
79+
80+
.fl-b#{$b} { float: left; }
81+
.fr-b#{$b} { float: right; }
82+
.fn-b#{$b} { float: none; }
83+
.cl-b#{$b} { clear: left; }
84+
.cr-b#{$b} { clear: right;}
85+
.cb-b#{$b} { clear: both; }
86+
.cn-b#{$b} { clear: none; }
87+
88+
}
89+
10790
}
10891

10992
/* Border-radius */
@@ -140,4 +123,4 @@
140123
.full-block {
141124
width: 100%;
142125
display: block;
143-
}
126+
}

0 commit comments

Comments
 (0)