Browse code

Use a more modular structure for better extensibility

Benjamin Roth authored on28/08/2015 08:55:03
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,57 +0,0 @@
1
-$col_margin: 2%;
2
-
3
-.ce_gallery > ul {
4
-  &:before,
5
-  &:after {
6
-    content: " "; /* 1 */
7
-    display: table; /* 2 */
8
-  }
9
-
10
-  &:after {
11
-    clear: both;
12
-  }
13
-
14
-  /**
15
-   * For IE 6/7 only
16
-   * Include this rule to trigger hasLayout and contain floats.
17
-   */
18
-  & {
19
-    *zoom: 1;
20
-  }
21
-
22
-  & > li {
23
-    margin: 0 $col_margin $col_margin;
24
-    float: left;
25
-
26
-    &.col_first {
27
-      clear: none;
28
-    }
29
-
30
-    &:first-child {
31
-      width: 100%;
32
-      margin-left: 0;
33
-      margin-right: 0;
34
-      float: none;
35
-    }
36
-  }
37
-
38
-  &.cols_1 > li {
39
-    float: none;
40
-  }
41
-
42
-  @for $i from 1 through 12 {
43
-    &.cols_#{$i} > li:nth-child(1n+2) {
44
-      width: (100-($i * (2 * $col_margin) - (2 * $col_margin))) / $i;
45
-    }
46
-    &.cols_#{$i} > li:nth-child(#{$i}n+2) {
47
-      margin-left: 0;
48
-      clear: left;
49
-    }
50
-    &.cols_#{$i} > li:nth-child(#{$i}n+1) {
51
-      margin-right: 0;
52
-    }
53
-  }
54
-}
55
-
56
-
57
-
Browse code

Optimize gallery scss and provide default gallery or teaser gallery

Benjamin Roth authored on26/08/2015 14:42:21
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,57 @@
1
+$col_margin: 2%;
2
+
3
+.ce_gallery > ul {
4
+  &:before,
5
+  &:after {
6
+    content: " "; /* 1 */
7
+    display: table; /* 2 */
8
+  }
9
+
10
+  &:after {
11
+    clear: both;
12
+  }
13
+
14
+  /**
15
+   * For IE 6/7 only
16
+   * Include this rule to trigger hasLayout and contain floats.
17
+   */
18
+  & {
19
+    *zoom: 1;
20
+  }
21
+
22
+  & > li {
23
+    margin: 0 $col_margin $col_margin;
24
+    float: left;
25
+
26
+    &.col_first {
27
+      clear: none;
28
+    }
29
+
30
+    &:first-child {
31
+      width: 100%;
32
+      margin-left: 0;
33
+      margin-right: 0;
34
+      float: none;
35
+    }
36
+  }
37
+
38
+  &.cols_1 > li {
39
+    float: none;
40
+  }
41
+
42
+  @for $i from 1 through 12 {
43
+    &.cols_#{$i} > li:nth-child(1n+2) {
44
+      width: (100-($i * (2 * $col_margin) - (2 * $col_margin))) / $i;
45
+    }
46
+    &.cols_#{$i} > li:nth-child(#{$i}n+2) {
47
+      margin-left: 0;
48
+      clear: left;
49
+    }
50
+    &.cols_#{$i} > li:nth-child(#{$i}n+1) {
51
+      margin-right: 0;
52
+    }
53
+  }
54
+}
55
+
56
+
57
+