stratum 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,11 +8,17 @@ $grid-total-columns: 12 !default;
8
8
  $grid-desired-gutter: 20px !default;
9
9
  $grid-baseline: 18px !default;
10
10
 
11
- @import "utils/vendor-prefix";
12
- @import "utils/group";
11
+ @import "addons/vendor-prefix";
12
+ @import "addons/group";
13
+ @import "addons/position";
14
+ @import "addons/dimensions";
13
15
 
14
16
  // CSS3 mixins
17
+ @import "css3/animation";
18
+ @import "css3/border-radius";
15
19
  @import "css3/box-sizing";
20
+ @import "css3/transform";
21
+ @import "css3/transition";
16
22
 
17
23
  // Layout
18
24
  @import "layout/grid";
@@ -0,0 +1,14 @@
1
+ // Dimensions helpers
2
+ // ------------------
3
+
4
+ // Box element
5
+ // <width>, <height>
6
+ // If one parameter is specified, make square
7
+ @mixin box($length...) {
8
+ @if length($length) < 3 {
9
+ width: nth($length, 1);
10
+ height: nth($length, length($length));
11
+ } @else {
12
+ @warn "box mixin only takes 1 or 2 arguments"
13
+ }
14
+ }
File without changes
@@ -0,0 +1,48 @@
1
+ // Position shorthand
2
+ // ------------------
3
+
4
+ // Accepts values with units or auto
5
+ // If `0` or `none` is specified, the value is omitted.
6
+
7
+ // Standard CSS shorthand rules applied, e.g. `0px 20px` resolves to `top: 0px; left: 20px; right: 20px` etc.
8
+
9
+ // `@include position(absolute, 0px 0 0 auto);`
10
+
11
+ // Resolves to:
12
+
13
+ // ```
14
+ // position: absolute;
15
+ // top: 0px;
16
+ // left: auto;
17
+ // ```
18
+
19
+ @mixin position($position, $values) {
20
+ // shortcut to fill viewport (0px 0px 0px 0px)
21
+ $values: if($values == fill, 0px 0px 0px 0px, $values);
22
+
23
+ // top/bottom left/right
24
+ @if length($values) == 2 {
25
+ $values: append($values, nth($values, 1));
26
+ $values: append($values, nth($values, 2));
27
+ }
28
+ // top left/right bottom
29
+ @if length($values) == 3 {
30
+ $values: append($values, nth($values, 2));
31
+ }
32
+
33
+ $v-pairs:
34
+ top nth($values, 1),
35
+ right nth($values, 2),
36
+ bottom nth($values, 3),
37
+ left nth($values, 4);
38
+
39
+ position: $position;
40
+
41
+ @each $pair in $v-pairs {
42
+ $v-pos: nth($pair, 1);
43
+ $v-val: nth($pair, 2);
44
+ @if $v-val == auto or ($v-val != none and not unitless($v-val)) {
45
+ #{$v-pos}: $v-val;
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,90 @@
1
+ // animation
2
+ // ---------
3
+
4
+ // Vendor prefixes:
5
+ // - Firefox: 5-15
6
+ // - Chrome
7
+ // - Safari 5+
8
+
9
+ // No prefixes
10
+ // - IE 10+
11
+ // - Firefox 16+
12
+ // - Opera 12+
13
+
14
+ // Shorthand
15
+ @mixin animation($value...) {
16
+ @include vendor-prefix(animation, $value, webkit moz spec);
17
+ }
18
+
19
+ // <IDENT> | `none` e.g. fade, -special, anim_02
20
+ @mixin animation-name($ident...) {
21
+ @include vendor-prefix(animation-name, $ident, webkit moz spec);
22
+ }
23
+
24
+ // <time> e.g. 200ms, 4s
25
+ @mixin animation-duration($time...) {
26
+ @include vendor-prefix(animation-duration, $time, webkit moz spec);
27
+ }
28
+
29
+ // <timing-function> e.g. ease, ease-in, ease-in-out, linear, cubic-bezier(0.1, 0.7, 1.0, 0.1), step-start, step-stop, steps(3, start), steps(3, end)
30
+ @mixin animation-timing-function($timing-function...) {
31
+ @include vendor-prefix(animation-timing-function, $timing-function, webkit moz spec);
32
+ }
33
+
34
+ // <time> e.g. 100ms, 5s
35
+ @mixin animation-delay($time...) {
36
+ @include vendor-prefix(animation-delay, $time, webkit moz spec);
37
+ }
38
+
39
+ // <number> | `infinite`
40
+ @mixin animation-iteration-count($number...) {
41
+ @include vendor-prefix(animation-iteration-count, $number, webkit moz spec);
42
+ }
43
+
44
+ // `normal` | `reverse` | `alternate` | `alternate-reverse`
45
+ @mixin animation-direction($direction...) {
46
+ @include vendor-prefix(animation-direction, $direction, webkit moz spec);
47
+ }
48
+
49
+ // `none` | `forwards` | `backwards` | `both`
50
+ @mixin animation-fill-mode($mode...) {
51
+ @include vendor-prefix(animation-fill-mode, $mode, webkit moz spec);
52
+ }
53
+
54
+ // `running` | `paused`
55
+ @mixin animation-play-state($state...) {
56
+ @include vendor-prefix(animation-play-state, $state, webkit moz spec);
57
+ }
58
+
59
+ // keyframes
60
+ // ---------
61
+
62
+ // Vendor prefixes:
63
+ // - Firefox: 5-16
64
+ // - Chrome
65
+ // - Opera 12
66
+ // - Safari 4+
67
+ // - Android 2.1+
68
+ // - Blackberry 7+
69
+ // - iOS 3.2+
70
+
71
+ // No prefixes
72
+ // - IE 10+
73
+ // - Firefox 16+
74
+ // - Opera 12.1+
75
+
76
+ // `from` (0%), `to` (100%), <percentage>
77
+ @mixin keyframes($ident) {
78
+ @-webkit-keyframes #{$ident} {
79
+ @content;
80
+ }
81
+ @-moz-keyframes #{$ident} {
82
+ @content;
83
+ }
84
+ @-o-keyframes #{$ident} {
85
+ @content;
86
+ }
87
+ @keyframes #{$ident} {
88
+ @content;
89
+ }
90
+ }
@@ -0,0 +1,31 @@
1
+ // border-radius
2
+ // -------------
3
+
4
+ // Vendor prefixes:
5
+ // - Android < 1.6
6
+ // - iOS 1-3.2
7
+ // - Safari 3-4
8
+
9
+ // No prefixes
10
+ // - Chrome
11
+ // - Firefox 4+
12
+ // - Opera 10.50+
13
+ // - IE 9+
14
+ // - iOS 4+
15
+ // - Safari 5+
16
+ // - Android 2.1+
17
+
18
+ // Optional second parameter `clip` can be passed to clip background to padding box
19
+ // allowing transparency in borders overlayed over container background.
20
+
21
+ // Due to Sass parsing values surrounded by parentheses 2 radii
22
+ // values (such as 30px/60px) need to be quoted: "30px/30px"
23
+
24
+ @mixin border-radius($value...) {
25
+ $v-value: nth($value, 1);
26
+ @include vendor-prefix(border-radius, unquote($v-value), webkit spec);
27
+
28
+ @if length($value) > 1 and nth($value, 2) == clip {
29
+ @include vendor-prefix(background-clip, padding-box, webkit spec);
30
+ }
31
+ }
@@ -1,8 +1,17 @@
1
+ // box-sizing
2
+ // ----------
3
+
4
+ // Vendor prefixes:
5
+ // - Firefox: 1+
6
+ // - Android < 3
7
+ // - iOS < 4.3
8
+
9
+ // No prefixes
10
+ // - Chrome
11
+ // - Opera
12
+ // - IE 8+
13
+ // - Safari 5.1+
14
+
1
15
  @mixin box-sizing($value) {
2
- // Use vendor prefixes for:
3
- // - Firefox: all versions
4
- // - iOS Safari: 3.2-4.3
5
- // - Android: 2.1-3.0
6
- // - Blackberry: 7.0
7
16
  @include vendor-prefix(box-sizing, $value, moz webkit spec);
8
17
  }
@@ -0,0 +1,47 @@
1
+ // transform
2
+ // ---------
3
+
4
+ // Vendor prefixes:
5
+ // - Firefox: 3.5-15
6
+ // - Chrome
7
+ // - Safari 3.1+
8
+ // - IE 9
9
+ // - Opera 10.50-12.00
10
+
11
+ // No prefixes
12
+ // - IE 10+
13
+ // - Firefox 16+
14
+ // - Opera 12.50+
15
+
16
+ @mixin transform($value...) {
17
+ @include vendor-prefix(transform, $value, webkit moz ms o spec);
18
+ }
19
+
20
+ @mixin transform-origin($value...) {
21
+ @include vendor-prefix(transform-origin, $value, webkit moz ms o spec);
22
+ }
23
+
24
+ // Not supported in Opera
25
+ // Pass optional $origin parameter to set perspective origin
26
+ @mixin perspective($length, $origin...) {
27
+ @include vendor-prefix(perspective, $length, webkit moz ms spec);
28
+
29
+ @if $origin {
30
+ @include perspective-origin($origin);
31
+ }
32
+ }
33
+
34
+ // Not supported in Opera
35
+ @mixin perspective-origin($position...) {
36
+ @include vendor-prefix(perspective-origin, $position, webkit moz ms spec);
37
+ }
38
+
39
+ // Not supported in Opera
40
+ @mixin backface-visibility($visibility) {
41
+ @include vendor-prefix(backface-visibility, $visibility, webkit moz ms spec);
42
+ }
43
+
44
+ // Not supported in Opera & IE
45
+ @mixin transform-style($style) {
46
+ @include vendor-prefix(transform-style, $style, webkit moz spec);
47
+ }
@@ -0,0 +1,40 @@
1
+ // transition
2
+ // ----------
3
+
4
+ // Vendor prefixes:
5
+ // - Firefox: 4-15
6
+ // - Chrome 1-25
7
+ // - Safari 3.2+
8
+ // - Opera 10.50-12.00
9
+
10
+ // No prefixes
11
+ // - Chrome 26+
12
+ // - Opera 12.15+
13
+ // - IE 10+
14
+ // - Firefox 16+
15
+
16
+ // Shorthand
17
+ @mixin transition($value...) {
18
+ @include vendor-prefix(transition, $value, webkit moz o spec);
19
+ }
20
+
21
+ // <IDENT> | `none` | `all` e.g. margin, background-color, opacity
22
+ @mixin transition-property($value...) {
23
+ @include vendor-prefix(transition-property, $value, webkit moz o spec);
24
+ }
25
+
26
+ // <time> e.g. 200ms, 4s
27
+ @mixin transition-duration($time...) {
28
+ @include vendor-prefix(transition-duration, $time, webkit moz o spec);
29
+ }
30
+
31
+ // <timing-function> e.g. ease, ease-in, ease-in-out, linear, cubic-bezier(0.1, 0.7, 1.0, 0.1), step-start, step-stop, steps(3, start), steps(3, end)
32
+ // http://dev.w3.org/csswg/css3-transitions/#transition-timing-function-property
33
+ @mixin transition-timing-function($timing-function...) {
34
+ @include vendor-prefix(transition-timing-function, $timing-function, webkit moz o spec);
35
+ }
36
+
37
+ // <time> e.g. 100ms, 5s
38
+ @mixin transition-delay($time...) {
39
+ @include vendor-prefix(transition-delay, $time, webkit moz o spec);
40
+ }
@@ -14,7 +14,6 @@ $grid-column: grid-column-width();
14
14
  @mixin grid-container($width: $grid-size) {
15
15
  @include box-sizing(content-box);
16
16
  @include group;
17
- max-width: 100%;
18
17
  width: $width;
19
18
  margin: {
20
19
  left: auto;
@@ -109,7 +109,8 @@
109
109
  @include grid-column-width($i, $grid-type);
110
110
 
111
111
  // Force pixel grid
112
- %l-grid-pixel & {
112
+ %l-grid-pixel > &,
113
+ %l-grid-pixel > %l-row > & {
113
114
  @include grid-column-width($i, pixel);
114
115
  @include grid-column-margins(pixel);
115
116
  }
@@ -137,6 +138,25 @@
137
138
  @include grid-column-width($i, fluid, $gutter: 0);
138
139
  @include grid-column-margins(0);
139
140
  }
141
+
142
+ // TODO (fix inconsistent gutters betweeen pixel and fluid grids)
143
+ // Nested rows (for fluid grids)
144
+ // Since percentage value takes into account its parent container
145
+ // we need to adjust total column count to get the correct calculations
146
+ %l-grid-fluid & {
147
+ @for $n from 1 through $grid-total-columns {
148
+ %l-row %l-col-#{$n} {
149
+ @include grid-column-width($n, fluid, $total-columns: $i);
150
+ }
151
+ }
152
+ }
153
+ @if $grid-type == fluid {
154
+ @for $n from 1 through $grid-total-columns {
155
+ %l-row %l-col-#{$n} {
156
+ @include grid-column-width($n, fluid, $total-columns: $i);
157
+ }
158
+ }
159
+ }
140
160
  }
141
161
  }
142
162
 
@@ -170,7 +190,6 @@
170
190
  }
171
191
 
172
192
 
173
- // TODO Improve
174
193
  // Column offsets
175
194
  %l-container {
176
195
  @for $i from 1 through $grid-total-columns {
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stratum
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -4,5 +4,6 @@
4
4
  <li {% if page.id == "fluid" %} class="active"{% endif %}><a href="{{site.baseurl}}/grid/fluid.html">Fluid Grid</a></li>
5
5
  <li {% if page.id == "bbc" %} class="active"{% endif %}><a href="{{site.baseurl}}/grid/bbc.html">BBC Homepage Example</a></li>
6
6
  <li {% if page.id == "arstechnica" %} class="active"{% endif %}><a href="{{site.baseurl}}/grid/arstechnica.html">Arstechnica Layout Example</a></li>
7
+ <li {% if page.id == "guardian" %} class="active"{% endif %}><a href="{{site.baseurl}}/grid/guardian.html">Guardian Homepage Example</a></li>
7
8
  </ul>
8
9
  </header>
@@ -18,21 +18,35 @@ menu: grids
18
18
  <div class="l-row">
19
19
  <div class="content l-col">
20
20
  <div class="l-container">
21
- <div class="p-title"></div>
22
- <div class="p-meta"></div>
23
- <div class="p-image"></div>
24
- <div class="p-text"></div>
25
-
21
+ <div class="p-article"></div>
26
22
  <div class="related l-row">
27
- <div class="p-title l-col m-1-of-1"></div>
28
- <div class="l-col m-1-of-4"></div>
29
- <div class="l-col m-1-of-4"></div>
30
- <div class="l-col m-1-of-4"></div>
31
- <div class="l-col m-1-of-4"></div>
32
- <div class="l-col m-1-of-4"></div>
33
- <div class="l-col m-1-of-4"></div>
34
- <div class="l-col m-1-of-4"></div>
35
- <div class="l-col m-1-of-4"></div>
23
+ <div class="p-title l-col m-1-of-1">
24
+ <div class="item"></div>
25
+ </div>
26
+ <div class="l-col m-1-of-4">
27
+ <div class="item"></div>
28
+ </div>
29
+ <div class="l-col m-1-of-4">
30
+ <div class="item"></div>
31
+ </div>
32
+ <div class="l-col m-1-of-4">
33
+ <div class="item"></div>
34
+ </div>
35
+ <div class="l-col m-1-of-4">
36
+ <div class="item"></div>
37
+ </div>
38
+ <div class="l-col m-1-of-4">
39
+ <div class="item"></div>
40
+ </div>
41
+ <div class="l-col m-1-of-4">
42
+ <div class="item"></div>
43
+ </div>
44
+ <div class="l-col m-1-of-4">
45
+ <div class="item"></div>
46
+ </div>
47
+ <div class="l-col m-1-of-4">
48
+ <div class="item"></div>
49
+ </div>
36
50
  </div>
37
51
  </div>
38
52
  </div>
@@ -11,6 +11,35 @@ menu: grids
11
11
  {% include shared-grid-samples.html %}
12
12
  </div>
13
13
 
14
+ <div class="l-container">
15
+ <h2>Nested row</h2>
16
+ <div class="l-row">
17
+ <div class="l-col m-3">
18
+ <span>l-col m-3</span>
19
+ </div>
20
+ <div class="l-col m-6">
21
+ <span>l-col m-3</span>
22
+ <div class="l-row">
23
+ <div class="l-col m-3">
24
+ <span>l-col m-3</span>
25
+ </div>
26
+ <div class="l-col m-3">
27
+ <span>l-col m-3</span>
28
+ </div>
29
+ <div class="l-col m-3">
30
+ <span>l-col m-3</span>
31
+ </div>
32
+ <div class="l-col m-3">
33
+ <span>l-col m-3</span>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ <div class="l-col m-3">
38
+ <span>l-col m-3</span>
39
+ </div>
40
+ </div>
41
+ </div>
42
+
14
43
  <div class="l-container m-pixel">
15
44
  <header>
16
45
  <h2>Forced pixel grid</h2>
@@ -29,9 +58,9 @@ menu: grids
29
58
 
30
59
  <div class="l-row m-gutterless">
31
60
  <div class="l-col m-9">
61
+ <span>.l-col-m-9</span>
32
62
  <div class="l-container">
33
- <span>.l-col-m-9</span>
34
- <h2>Nested grid 6 columns in a 9 column cell</h2>
63
+ <h2>Nested grid: 6 columns in a 9 column cell</h2>
35
64
  <div class="l-row">
36
65
  <div class="l-col m-2-of-8">
37
66
  <span>.l-col-m-2-of-6</span>
@@ -0,0 +1,248 @@
1
+ ---
2
+ layout: default
3
+ title: Guardian Home Layout Demo
4
+ id: guardian
5
+ css: guardian
6
+ menu: grids
7
+ ---
8
+
9
+ <div class="reference">
10
+ <img src="{{site.baseurl}}/images/guardian-home.png" alt="">
11
+ </div>
12
+
13
+ <div id="page">
14
+
15
+ <div class="l-container">
16
+ <div class="top-bar"></div>
17
+ <div class="header">
18
+ <div class="p-info"></div>
19
+ <div class="p-search"></div>
20
+ <div class="masthead l-row">
21
+ <div class="p-logo l-col m-6">
22
+ <span>l-col m-6</span>
23
+ </div>
24
+ <div class="p-weather l-col m-6">
25
+ <span>l-col m-6</span>
26
+ </div>
27
+ </div>
28
+ <div class="nav">
29
+ <div class="p-main"></div>
30
+ <div class="p-sub"></div>
31
+ </div>
32
+ <div class="ticker"></div>
33
+ </div>
34
+
35
+ <div class="content l-row">
36
+ <div class="left l-col m-4">
37
+ <div class="item m-1">
38
+ <span>l-col m4</span>
39
+ </div>
40
+ <div class="item m-2">
41
+ <span>l-col m4</span>
42
+ </div>
43
+ <div class="item m-3">
44
+ <span>l-col m4</span>
45
+ </div>
46
+ </div>
47
+ <div class="main l-col m-6">
48
+ <div class="item m-feat">
49
+ <span>l-col m6</span>
50
+ </div>
51
+
52
+ <div class="l-row">
53
+ <div class="l-col m-2">
54
+ <div class="item m-1">
55
+ <span>l-col m2</span>
56
+ </div>
57
+ <div class="item m-2">
58
+ <span>l-col m2</span>
59
+ </div>
60
+ <div class="item m-3">
61
+ <span>l-col m2</span>
62
+ </div>
63
+ <div class="item m-3">
64
+ <span>l-col m2</span>
65
+ </div>
66
+ <div class="item m-3">
67
+ <span>l-col m2</span>
68
+ </div>
69
+ <div class="item m-3">
70
+ <span>l-col m2</span>
71
+ </div>
72
+ <div class="item m-3">
73
+ <span>l-col m2</span>
74
+ </div>
75
+ <div class="item m-4">
76
+ <span>l-col m2</span>
77
+ </div>
78
+ <div class="item m-3">
79
+ <span>l-col m2</span>
80
+ </div>
81
+ <div class="item m-3">
82
+ <span>l-col m2</span>
83
+ </div>
84
+ <div class="item m-3">
85
+ <span>l-col m2</span>
86
+ </div>
87
+ <div class="item m-3">
88
+ <span>l-col m2</span>
89
+ </div>
90
+ <div class="item m-3">
91
+ <span>l-col m2</span>
92
+ </div>
93
+ <div class="item m-3">
94
+ <span>l-col m2</span>
95
+ </div>
96
+ <div class="item m-3">
97
+ <span>l-col m2</span>
98
+ </div>
99
+ <div class="item m-3">
100
+ <span>l-col m2</span>
101
+ </div>
102
+ <div class="item m-3">
103
+ <span>l-col m2</span>
104
+ </div>
105
+ <div class="item m-3">
106
+ <span>l-col m2</span>
107
+ </div>
108
+ <div class="item m-3">
109
+ <span>l-col m2</span>
110
+ </div>
111
+ <div class="item m-3">
112
+ <span>l-col m2</span>
113
+ </div>
114
+ <div class="item m-3">
115
+ <span>l-col m2</span>
116
+ </div>
117
+ <div class="item m-3">
118
+ <span>l-col m2</span>
119
+ </div>
120
+ <div class="item m-3">
121
+ <span>l-col m2</span>
122
+ </div>
123
+ <div class="item m-5">
124
+ <span>l-col m2</span>
125
+ </div>
126
+ </div>
127
+ <div class="l-col m-4">
128
+ <div class="item m-1">
129
+ <span>l-col m4</span>
130
+ </div>
131
+ <div class="item m-2">
132
+ <span>l-col m4</span>
133
+ </div>
134
+ <div class="item m-3">
135
+ <span>l-col m4</span>
136
+ </div>
137
+ <div class="item m-4">
138
+ <span>l-col m4</span>
139
+ </div>
140
+ <div class="item m-5">
141
+ <span>l-col m4</span>
142
+ </div>
143
+ <div class="item m-6">
144
+ <span>l-col m4</span>
145
+ </div>
146
+ <div class="item m-7">
147
+ <span>l-col m4</span>
148
+ </div>
149
+ <div class="item m-8">
150
+ <span>l-col m4</span>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ <div class="right l-col m-2">
156
+ <div class="item m-1">
157
+ <span>l-col m2</span>
158
+ </div>
159
+ <div class="item m-2">
160
+ <span>l-col m2</span>
161
+ </div>
162
+ <div class="item m-3">
163
+ <span>l-col m2</span>
164
+ </div>
165
+ <div class="item m-4">
166
+ <span>l-col m2</span>
167
+ </div>
168
+ <div class="item m-5">
169
+ <span>l-col m2</span>
170
+ </div>
171
+ <div class="item m-6">
172
+ <span>l-col m2</span>
173
+ </div>
174
+ <div class="item m-7">
175
+ <span>l-col m2</span>
176
+ </div>
177
+ <div class="item m-8">
178
+ <span>l-col m2</span>
179
+ </div>
180
+ <div class="item m-9">
181
+ <span>l-col m2</span>
182
+ </div>
183
+ <div class="item m-10">
184
+ <span>l-col m2</span>
185
+ </div>
186
+ <div class="item m-11">
187
+ <span>l-col m2</span>
188
+ </div>
189
+ <div class="item m-12">
190
+ <span>l-col m2</span>
191
+ </div>
192
+ <div class="item m-13">
193
+ <span>l-col m2</span>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ <div class="shop">
199
+ <header></header>
200
+ <div class="l-row">
201
+ <div class="l-col m-2">
202
+ <span>l-col m2</span>
203
+ </div>
204
+ <div class="l-col m-2">
205
+ <span>l-col m2</span>
206
+ </div>
207
+ <div class="l-col m-2">
208
+ <span>l-col m2</span>
209
+ </div>
210
+ <div class="l-col m-2">
211
+ <span>l-col m2</span>
212
+ </div>
213
+ <div class="l-col m-2">
214
+ <span>l-col m2</span>
215
+ </div>
216
+ <div class="l-col m-2">
217
+ <span>l-col m2</span>
218
+ </div>
219
+ </div>
220
+ </div>
221
+
222
+ <div class="simple-news">
223
+ <header></header>
224
+ <div class="l-row">
225
+ <div class="l-col m-2">
226
+ <span>l-col m2</span>
227
+ </div>
228
+ <div class="l-col m-2">
229
+ <span>l-col m2</span>
230
+ </div>
231
+ <div class="l-col m-2">
232
+ <span>l-col m2</span>
233
+ </div>
234
+ <div class="l-col m-2">
235
+ <span>l-col m2</span>
236
+ </div>
237
+ <div class="l-col m-2">
238
+ <span>l-col m2</span>
239
+ </div>
240
+ <div class="l-col m-2">
241
+ <span>l-col m2</span>
242
+ </div>
243
+ </div>
244
+ </div>
245
+
246
+ <div class="mastfoot"></div>
247
+ </div>
248
+ </div>
Binary file
data/tests/images/bbc.png CHANGED
Binary file
Binary file
@@ -4,68 +4,65 @@
4
4
  $v-guides-color: desaturate(darken($color, 10), 40);
5
5
 
6
6
  -webkit-transition: 400ms;
7
- background-color: rgba($color, .4);
7
+ background-color: rgba($color, .3);
8
8
  position: relative;
9
9
  min-height: $height;
10
- -webkit-transition: box-shadow 800ms ease, background 500ms ease;
11
- -webkit-transition-delay: 600ms 0;
10
+ -webkit-transition: box-shadow 800ms, background 500ms;
11
+ overflow: hidden;
12
12
 
13
- span {
13
+ > span {
14
+ -webkit-transition: 300ms;
14
15
  position: absolute;
15
16
  left: 0;
16
17
  right: 0;
17
18
  top: 50%;
18
- color: rgba(white, .8);
19
- height: 30px;
19
+ color: rgba(black, .6);
20
20
  text-align: center;
21
- line-height: 30px;
22
- margin: -15px auto 0;
23
- max-width: 210px;
24
- background: $v-guides-color;
21
+ margin: -10px auto 0;
25
22
  z-index: 2;
26
23
  opacity: 0;
27
24
  cursor: default;
28
- font-size: 10px;
29
- -webkit-transition: 300ms;
30
- -webkit-border-radius: 20px;
31
- text-transform: uppercase;
25
+ font-weight: bold;
26
+ text-shadow: 0 0 2px rgba(lighten($color, 60), .4);
27
+
28
+ &::before,
29
+ &::after {
30
+ -webkit-transition: 600ms;
31
+ background: $v-guides-color;
32
+ content: "";
33
+ position: absolute;
34
+ top: 50%;
35
+ height: 1px;
36
+ }
37
+ &::before {
38
+ margin-left: -2%;
39
+ }
40
+ &::after {
41
+ margin-left: 2%;
42
+ }
32
43
  }
33
44
 
34
45
  &::before {
35
- position: absolute;
36
- top: 0;
37
- left: 0;
38
- right: 0;
39
- bottom: 0;
46
+ @include position(absolute, fill);
40
47
  content: "";
41
48
  background: rgba(white, .25);
42
49
  margin: $padding;
43
50
  }
44
51
 
45
- &.l-col::after {
46
- opacity: 0;
47
- -webkit-transition: 300ms ease;
48
- -webkit-transition-delay: 300ms;
49
- position: absolute;
50
- top: 50%;
51
- left: 50%;
52
- right: 50%;
53
- border-top: 1px solid $v-guides-color;
54
- content: "";
55
- }
56
-
57
52
  &:hover {
58
- background-color: rgba($color, .7);
59
- box-shadow: inset 0 0 0px 1px $v-guides-color, 0 1px 5px rgba(black, .3);
53
+ background-color: rgba($color, .5);
54
+ box-shadow: inset 0 0 0px 1px $v-guides-color, 0 1px 8px rgba(black, .3);
60
55
 
61
- span {
56
+ > span {
62
57
  opacity: 1;
63
- }
64
58
 
65
- &::after {
66
- opacity: 1;
67
- left: 0;
68
- right: 0;
59
+ &::before,
60
+ &::after {
61
+ width: 98%;
62
+ }
63
+ &::before {
64
+ margin-left: -100%;
65
+ }
69
66
  }
70
67
  }
71
68
  }
@@ -61,43 +61,38 @@ body {
61
61
  margin: 15px 0;
62
62
  }
63
63
 
64
- .content,
65
64
  .sidebar {
66
- @include block(#baaf32, $height: 2438px);
65
+ @include block(#baaf32, $height: 2418px);
66
+ margin-bottom: 20px;
67
67
  }
68
68
 
69
69
  .l-container {
70
70
  @include grid-container(640px);
71
71
  }
72
72
 
73
- > .p-title {
74
- @include block($height: 85px);
73
+ .p-article {
74
+ @include block(#baaf32, $height: 1773px);
75
75
  margin-bottom: 10px
76
76
  }
77
- .p-meta {
78
- @include block($height: 35px);
79
- margin-bottom: 15px
80
- }
81
- .p-image {
82
- @include block($height: 415px);
83
- margin-bottom: 15px
84
- }
85
- .p-text {
86
- @include block($height: 1265px);
87
- }
88
77
 
89
78
  .sidebar {
90
79
  width: 300px;
91
80
  }
92
81
 
93
82
  .related {
94
- .l-col.p-title {
95
- @include block(purple, $height: 33px);
96
- margin: 95px 0 0;
97
- }
98
83
  .l-col {
99
- @include block(green, $height: 255px);
100
- margin: 0 0 10px;
84
+ padding: 0 10px;
85
+ margin: 10px 0;
86
+ }
87
+ .item {
88
+ @include block(purple, $height: 245px);
89
+ }
90
+ .l-col.p-title {
91
+ margin: 57px 0 0;
92
+
93
+ .item {
94
+ min-height: 33px;
95
+ }
101
96
  }
102
97
  }
103
98
  }
@@ -105,7 +100,7 @@ body {
105
100
  .mastfoot {
106
101
  background: rgba(#222, .2);
107
102
  .l-col {
108
- @include block(#444, $height: 337px);
103
+ @include block(#777, $height: 223px, $padding: 20px);
109
104
  }
110
105
  }
111
106
  }
data/tests/scss/bbc.scss CHANGED
@@ -13,7 +13,7 @@ $grid-baseline: 19px;
13
13
 
14
14
  @import "mock-block";
15
15
 
16
- // @include GRID-GUIDES;
16
+ @include GRID-GUIDES;
17
17
 
18
18
  body {
19
19
  font: 12px/1.36 Helvetica, Arial, sans-serif;
@@ -27,7 +27,6 @@ $grid-type: fluid;
27
27
 
28
28
 
29
29
  .l-container .l-container {
30
- position: relative;
31
30
  @include group(true);
32
31
 
33
32
  h2 {
@@ -36,6 +35,13 @@ $grid-type: fluid;
36
35
 
37
36
  .l-col {
38
37
  @include block(#ba5232, $height: 150px, $padding: $grid-gutter/2);
38
+ }
39
+ }
40
+
41
+ .l-container .l-container,
42
+ .l-row .l-row {
43
+ .l-col {
44
+ position: relative;
39
45
 
40
46
  &:hover {
41
47
  z-index: 10;
@@ -0,0 +1,219 @@
1
+ // Grid settings
2
+ $grid-guides-color: #8aa8c0;
3
+ $grid-guides-opacity: .2;
4
+
5
+ $grid-type: pixel;
6
+ $grid-size: 940px;
7
+ $grid-total-columns: 12;
8
+ $grid-desired-gutter: 20px;
9
+ $grid-baseline: 15px;
10
+
11
+ @import "stratum";
12
+ @import "layout/scaffolding";
13
+
14
+ @import "mock-block";
15
+
16
+ // @include GRID-GUIDES;
17
+
18
+ body {
19
+ font: 12px/1.36 Helvetica, Arial, sans-serif;
20
+ color: #444;
21
+ background: white;
22
+ padding: 0;
23
+ margin: 0;
24
+ }
25
+
26
+ // Reference
27
+
28
+ .reference {
29
+ position: absolute;
30
+ left: -1px;
31
+ right: 0;
32
+ opacity: .35;
33
+ z-index: -1;
34
+
35
+ img {
36
+ margin: 0 auto;
37
+ display: block;
38
+ }
39
+ }
40
+
41
+ // Layout
42
+
43
+ #page {
44
+ padding: 0;
45
+
46
+ .top-bar {
47
+ @include block(green, 30px);
48
+ margin-bottom: 35px;
49
+ }
50
+
51
+ .header .p-info,
52
+ .ticker {
53
+ @include block(#aaa, 20px);
54
+ margin: 5px 0;
55
+ }
56
+
57
+ .header {
58
+ .p-logo,
59
+ .p-weather {
60
+ @include block(blue, 70px);
61
+ }
62
+ }
63
+
64
+ .nav {
65
+ .p-main,
66
+ .p-sub {
67
+ @include block(#660e1a, 24px);
68
+ }
69
+ .p-main {
70
+ margin: 7px 0 6px;
71
+ }
72
+ }
73
+
74
+ .content {
75
+ margin-top: 25px;
76
+
77
+ .left {
78
+ .item {
79
+ @include block(#c9b480);
80
+ margin-bottom: 25px;
81
+ }
82
+ .m-1 {
83
+ min-height: 2940px;
84
+ }
85
+ .m-2 {
86
+ min-height: 1592px;
87
+ }
88
+ .m-3 {
89
+ min-height: 507px;
90
+ }
91
+ }
92
+
93
+ .main {
94
+ .item {
95
+ @include block(#bb77b1);
96
+ margin-bottom: 11px;
97
+ }
98
+ .m-feat {
99
+ min-height: 341px;
100
+ margin-bottom: 31px;
101
+ }
102
+
103
+ .l-row {
104
+ .m-2 {
105
+ .m-1 {
106
+ min-height: 182px;
107
+ }
108
+ .m-2 {
109
+ min-height: 218px;
110
+ }
111
+ .m-3 {
112
+ min-height: 182px;
113
+ }
114
+ .m-4 {
115
+ min-height: 272px;
116
+ }
117
+ .m-5 {
118
+ min-height: 216px;
119
+ margin-top: 51px;
120
+ }
121
+ }
122
+
123
+ .m-4 {
124
+ .item {
125
+ margin-bottom: 30px;
126
+ }
127
+ .m-1 {
128
+ min-height: 776px;
129
+ }
130
+ .m-2 {
131
+ min-height: 183px;
132
+ }
133
+ .m-3 {
134
+ min-height: 1098px;
135
+ }
136
+ .m-4 {
137
+ min-height: 603px;
138
+ }
139
+ .m-5 {
140
+ min-height: 719px;
141
+ }
142
+ .m-6 {
143
+ min-height: 321px;
144
+ }
145
+ .m-7 {
146
+ min-height: 378px;
147
+ }
148
+ .m-8 {
149
+ min-height: 375px;
150
+ }
151
+ }
152
+ }
153
+ }
154
+
155
+ .right {
156
+ .item {
157
+ @include block(#769cbb);
158
+ margin-bottom: 10px;
159
+ }
160
+ .m-1 {
161
+ min-height: 172px;
162
+ }
163
+ .m-2 {
164
+ min-height: 435px;
165
+ }
166
+ .m-3 {
167
+ min-height: 262px;
168
+ }
169
+ .m-4 {
170
+ min-height: 230px;
171
+ }
172
+ .m-5 {
173
+ min-height: 390px;
174
+ }
175
+ .m-6 {
176
+ min-height: 306px;
177
+ }
178
+ .m-7 {
179
+ min-height: 62px;
180
+ }
181
+ .m-8 {
182
+ min-height: 129px;
183
+ }
184
+ .m-9 {
185
+ min-height: 608px;
186
+ }
187
+ .m-10 {
188
+ min-height: 191px;
189
+ }
190
+ .m-11 {
191
+ min-height: 153px;
192
+ }
193
+ .m-12 {
194
+ min-height: 158px;
195
+ }
196
+ .m-13 {
197
+ min-height: 140px;
198
+ }
199
+ }
200
+ }
201
+
202
+ .shop,
203
+ .simple-news {
204
+ margin: 13px 0 20px;
205
+
206
+ header {
207
+ @include block(#49bb99, 50px);
208
+ margin-bottom: 10px;
209
+ }
210
+ .l-col {
211
+ @include block(#76bba6, 162px);
212
+ }
213
+ }
214
+
215
+ .mastfoot {
216
+ @include block($height: 52px);
217
+ margin-top: 25px;
218
+ }
219
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stratum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-04 00:00:00.000000000 Z
12
+ date: 2013-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70294002783300 !ruby/object:Gem::Requirement
16
+ requirement: &70133679732860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70294002783300
24
+ version_requirements: *70133679732860
25
25
  description: Stratum is a collection of SASS mixins and utilities for your web development
26
26
  needs.
27
27
  email: tyom@semonov.com
@@ -35,7 +35,15 @@ files:
35
35
  - LICENSE
36
36
  - README.md
37
37
  - assets/stylesheets/_stratum.scss
38
+ - assets/stylesheets/addons/_dimensions.scss
39
+ - assets/stylesheets/addons/_group.scss
40
+ - assets/stylesheets/addons/_position.scss
41
+ - assets/stylesheets/addons/_vendor-prefix.scss
42
+ - assets/stylesheets/css3/_animation.scss
43
+ - assets/stylesheets/css3/_border-radius.scss
38
44
  - assets/stylesheets/css3/_box-sizing.scss
45
+ - assets/stylesheets/css3/_transform.scss
46
+ - assets/stylesheets/css3/_transition.scss
39
47
  - assets/stylesheets/forms/_input-placeholder.scss
40
48
  - assets/stylesheets/layout/_grid-functions.scss
41
49
  - assets/stylesheets/layout/_grid-guides.scss
@@ -44,8 +52,6 @@ files:
44
52
  - assets/stylesheets/layout/_grid.scss
45
53
  - assets/stylesheets/layout/_responsive.scss
46
54
  - assets/stylesheets/layout/scaffolding.scss
47
- - assets/stylesheets/utils/_group.scss
48
- - assets/stylesheets/utils/_vendor-prefix.scss
49
55
  - bin/stratum
50
56
  - lib/stratum.rb
51
57
  - lib/version.rb
@@ -60,15 +66,18 @@ files:
60
66
  - tests/grid/arstechnica.html
61
67
  - tests/grid/bbc.html
62
68
  - tests/grid/fluid.html
69
+ - tests/grid/guardian.html
63
70
  - tests/grid/index.html
64
71
  - tests/grid/pixel.html
65
72
  - tests/images/arstechnica.png
66
73
  - tests/images/bbc.png
67
74
  - tests/images/capture.js
75
+ - tests/images/guardian-home.png
68
76
  - tests/scss/_mock-block.scss
69
77
  - tests/scss/arstechnica.scss
70
78
  - tests/scss/bbc.scss
71
79
  - tests/scss/fluid-grid.scss
80
+ - tests/scss/guardian.scss
72
81
  - tests/scss/main.scss
73
82
  - tests/scss/pixel-grid.scss
74
83
  homepage: http://rubygems.org/gems/stratum