groundworkcss-rails 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Groundworkcss
2
2
  module Rails
3
- VERSION = "0.2.8"
3
+ VERSION = "0.2.9"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Groundworkcss
2
2
  module Rails
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.8"
4
4
  end
5
5
  end
@@ -1,7 +1,7 @@
1
1
  // Generated by CoffeeScript 1.6.1
2
2
  var equalizeColumns;
3
3
 
4
- $(function() {
4
+ $(window).load(function() {
5
5
  return equalizeColumns();
6
6
  });
7
7
 
@@ -465,7 +465,7 @@ $(function() {
465
465
  */
466
466
 
467
467
 
468
- $(function() {
468
+ $(window).load(function() {
469
469
  return equalizeColumns();
470
470
  });
471
471
 
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- button, .button, a.button, a.button:visited, input[type=submit], input[type=button], input[type=reset], [role=button] {
8
+ %button {
9
9
  display:inline-block;
10
10
  word-wrap:break-word;
11
11
  padding:0.25em 1em;
@@ -90,34 +90,6 @@ button, .button, a.button, a.button:visited, input[type=submit], input[type=but
90
90
  @include state(disabled,normal,desaturate($success-color,20%));
91
91
  }
92
92
  }
93
- // &.error {
94
- // background:$error-color;
95
- // border:1px solid darken($error-color, 10%);
96
- // color:$button-text;
97
-
98
- // }
99
- // &.warning {
100
- // background:$warning-color;
101
- // border:1px solid darken($warning-color, 10%);
102
- // color:$button-text;
103
- // &.active, &:hover, &:focus {
104
- // background:darken($warning-color, 10%);
105
- // }
106
- // &.disabled {
107
- // @include state(disabled,normal,desaturate($warning-color,20%));
108
- // }
109
- // }
110
- // &.success {
111
- // background:$success-color;
112
- // border:1px solid darken($success-color, 10%);
113
- // color:$button-text;
114
- // &.active, &:hover, &:focus {
115
- // background:darken($success-color, 10%);
116
- // }
117
- // &.disabled {
118
- // @include state(disabled,normal,desaturate($success-color,20%));
119
- // }
120
- // }
121
93
  &.small {
122
94
  font-size:0.8em;
123
95
  }
@@ -184,7 +156,7 @@ button, .button, a.button, a.button:visited, input[type=submit], input[type=but
184
156
  }
185
157
  }
186
158
  }
187
- ul.button-list, ol.button-list {
159
+ %button-list {
188
160
  list-style:none;
189
161
  margin:0;
190
162
  padding:0;
@@ -233,3 +205,27 @@ ul.button-list, ol.button-list {
233
205
  }
234
206
  }
235
207
  }
208
+ @if $classes {
209
+ .button,
210
+ a.button,
211
+ a.button:visited {
212
+ @extend %button;
213
+ }
214
+ ul.button-list,
215
+ ol.button-list {
216
+ @extend %button-list;
217
+ }
218
+ }
219
+ @if $tags {
220
+ button,
221
+ input[type=submit],
222
+ input[type=button],
223
+ input[type=reset] {
224
+ @extend %button;
225
+ }
226
+ }
227
+ @if $aria {
228
+ [role~=button] {
229
+ @extend %button;
230
+ }
231
+ }
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- .callout {
8
+ %callout {
9
9
  position:relative;
10
10
  word-wrap:break-word;
11
11
  padding:1em;
@@ -62,3 +62,13 @@
62
62
  margin-bottom:0;
63
63
  }
64
64
  }
65
+ @if $classes {
66
+ .callout {
67
+ @extend %callout;
68
+ }
69
+ }
70
+ @if $aria {
71
+ [role~=status] {
72
+ @extend %callout;
73
+ }
74
+ }
@@ -4,24 +4,21 @@
4
4
 
5
5
 
6
6
 
7
- form {
8
-
9
- }
10
- fieldset {
7
+ %fieldset {
11
8
  border:1px solid $border-color;
12
9
  padding:$gutter;
13
- legend {
14
- font-weight:900;
15
- font-size:0.8em;
16
- color:darken($background-color, 35%);
17
- margin-bottom:0;
18
- }
19
10
  }
20
- label {
11
+ %legend {
12
+ font-weight:900;
13
+ font-size:0.8em;
14
+ color:darken($background-color, 35%);
15
+ margin-bottom:0;
16
+ }
17
+ %label {
21
18
  display:block;
22
19
  padding:0.4em 0.2em;
23
20
  }
24
- input, select, textarea {
21
+ %field {
25
22
  display:block;
26
23
  width:100%;
27
24
  margin:0;
@@ -33,6 +30,19 @@ input, select, textarea {
33
30
  background:white;
34
31
  border:1px solid $border-color;
35
32
  @include rounded($radius);
33
+ &%error, &%invalid {
34
+ color:$error-color;
35
+ background:lighten($error-color, 62%);
36
+ border-color:$error-color;
37
+ }
38
+ &%success, &%valid {
39
+ color:$success-color;
40
+ background:lighten($success-color, 62%);
41
+ border-color:$success-color;
42
+ }
43
+ }
44
+ %input {
45
+ @extend %field;
36
46
  &[size] {
37
47
  height:auto;
38
48
  }
@@ -45,53 +55,35 @@ input, select, textarea {
45
55
  border:1px solid $border-color;
46
56
  @include rounded($radius);
47
57
  }
48
- &.error, &.invalid {
49
- color:$error-color;
50
- background:lighten($error-color, 62%);
51
- border-color:$error-color;
52
- }
53
- &.success, &.valid {
54
- color:$success-color;
55
- background:lighten($success-color, 62%);
56
- border-color:$success-color;
57
- }
58
58
  }
59
- .error, .invalid {
60
- input, select, textarea {
59
+ %textarea {
60
+ height:10em;
61
+ }
62
+ %error {
63
+ %field {
61
64
  background:$error-background;
62
65
  color:$error-color;
63
66
  border-color:$error-border;
64
67
  }
65
- .prefix, .suffix {
68
+ %prefix, %suffix {
66
69
  color:lighten($error-color, 62%);;
67
70
  background:$error-color;
68
71
  border-color:$error-color;
69
72
  }
70
73
  }
71
- .success, .valid {
72
- input, select, textarea {
74
+ %success {
75
+ %field {
73
76
  background:$success-background;
74
77
  color:$success-color;
75
78
  border-color:$success-border;
76
79
  }
77
- .prefix, .suffix {
80
+ %prefix, %suffix {
78
81
  color:lighten($success-color, 62%);;
79
82
  background:$success-color;
80
83
  border-color:$success-color;
81
84
  }
82
85
  }
83
- textarea {
84
- height:10em;
85
- &:focus {
86
- @include drop-shadow(rgba(0,0,0,0.125), 15px, 0, 0);
87
- }
88
- }
89
- span.select select {
90
- &:focus {
91
- @include drop-shadow(rgba(0,0,0,0.35), 15px, 0, 0);
92
- }
93
- }
94
- span.select {
86
+ %select-wrap {
95
87
  display:block;
96
88
  color:gray;
97
89
  background:white;
@@ -112,7 +104,7 @@ span.select {
112
104
  right:0;
113
105
  background:darken(white, 12.5%);
114
106
  }
115
- select {
107
+ %select {
116
108
  -ms-appearance:none;
117
109
  -o-appearance:none;
118
110
  -moz-appearance:none;
@@ -133,12 +125,12 @@ span.select {
133
125
  }
134
126
  }
135
127
  }
136
- ul.radio-list {
128
+ %radio-list {
137
129
  list-style:none;
138
130
  margin:0;
139
131
  padding:0;
140
132
  }
141
- .prefix, .suffix {
133
+ %prefix, %suffix {
142
134
  display:block;
143
135
  position:relative;
144
136
  z-index:1;
@@ -157,11 +149,80 @@ ul.radio-list {
157
149
  background:darken(white, 12.5%);
158
150
  border:1px solid darken(white, 17.5%);
159
151
  }
160
- .prefix {
152
+ %prefix {
161
153
  left:2px;
162
154
  @include rounded($radius 0 0 $radius);
163
155
  }
164
- .suffix {
156
+ %suffix {
165
157
  left:-2px;
166
158
  @include rounded(0 $radius $radius 0);
167
159
  }
160
+ @if $tags {
161
+ fieldset {
162
+ @extend %fieldset;
163
+ }
164
+ legend {
165
+ @extend %legend;
166
+ }
167
+ label {
168
+ @extend %label;
169
+ }
170
+ input, select, textarea {
171
+ @extend %field;
172
+ }
173
+ input {
174
+ @extend %input;
175
+ }
176
+ textarea {
177
+ @extend %textarea;
178
+ }
179
+ @if $classes {
180
+ .select-wrap {
181
+ @extend %select-wrap;
182
+ select {
183
+ @extend %select;
184
+ }
185
+ }
186
+ }
187
+ }
188
+ @if $classes {
189
+ .fieldset {
190
+ @extend %fieldset;
191
+ }
192
+ .legend {
193
+ @extend %legend;
194
+ }
195
+ .label {
196
+ @extend %label;
197
+ }
198
+ .input, .select, .textarea {
199
+ @extend %field;
200
+ }
201
+ .input {
202
+ @extend %input;
203
+ }
204
+ .textarea {
205
+ @extend %textarea;
206
+ }
207
+ .select-wrap {
208
+ @extend %select-wrap;
209
+ .select {
210
+ @extend %select;
211
+ }
212
+ }
213
+ .radio-list {
214
+ @extend %radio-list;
215
+ }
216
+ .error, .invalid {
217
+ @extend %error;
218
+ }
219
+ .success, .valid {
220
+ @extend %success;
221
+ }
222
+ .prefix {
223
+ @extend %prefix;
224
+ }
225
+ .suffix {
226
+ @extend %suffix;
227
+ }
228
+ }
@@ -9,23 +9,39 @@
9
9
  ///////////////////////
10
10
  // global styles //
11
11
  ///////////////////////
12
- html {
12
+ %html {
13
13
  width:100%;
14
14
  height:100%;
15
15
  }
16
- html, body {
16
+ %document {
17
17
  width:100% !important;
18
18
  min-height:100%;
19
19
  background:$background-color;
20
20
  padding:0;
21
21
  }
22
- hr {
22
+ %hr {
23
23
  border:0;
24
24
  border-bottom:1px solid $border-color;
25
25
  margin:$gutter auto;
26
26
  clear:both;
27
27
  }
28
- img, a img {
28
+ %img {
29
29
  max-width:100%;
30
30
  border:none;
31
31
  }
32
+ @if $tags {
33
+ html {
34
+ @extend %html;
35
+ }
36
+ html,
37
+ body {
38
+ @extend %document;
39
+ }
40
+ hr {
41
+ @extend %hr;
42
+ }
43
+ img,
44
+ a img {
45
+ @extend %img;
46
+ }
47
+ }
@@ -82,6 +82,16 @@
82
82
  // helpers
83
83
  // ====================
84
84
 
85
+ @mixin helper_reset($properties: padding margin, $spacers: padded pad-top pad-right pad-bottom pad-left gapped gap-top gap-right gap-bottom gap-left) {
86
+ @for $i from 1 through length($spacers) {
87
+ &.#{nth($spacers, $i)}, &.#{nth($spacers, $i)}.double, &.#{nth($spacers, $i)}.triple {
88
+ @for $i from 1 through length($properties) {
89
+ #{nth($properties, $i)}:0;
90
+ }
91
+ }
92
+ }
93
+ }
94
+
85
95
  @mixin _zero { margin:0; padding:0; }
86
96
 
87
97
  // ====================
@@ -29,7 +29,7 @@
29
29
  visibility:visible;
30
30
  opacity:1;
31
31
  }
32
- div.modal.active, div[role=dialog].active {
32
+ div.modal.active, div[role~=dialog].active {
33
33
  visibility:visible;
34
34
  opacity:1;
35
35
  z-index:999;
@@ -51,7 +51,7 @@
51
51
  @include gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.9));
52
52
  }
53
53
 
54
- div.modal, div[role=dialog] {
54
+ div%modal {
55
55
  visibility:hidden;
56
56
  opacity:0;
57
57
  position:fixed;
@@ -100,4 +100,14 @@ div.modal, div[role=dialog] {
100
100
  right:auto;
101
101
  left:10px;
102
102
  }
103
- }
103
+ }
104
+ @if $classes {
105
+ div.modal {
106
+ @extend div%modal;
107
+ }
108
+ }
109
+ @if $aria {
110
+ div[role~=dialog] {
111
+ @extend div%modal;
112
+ }
113
+ }
@@ -12,7 +12,7 @@
12
12
  display:block;
13
13
  }
14
14
 
15
- .nav {
15
+ %nav {
16
16
  @extend %clear;
17
17
  &:not(.inline) {
18
18
  > ul:not(.row) {
@@ -271,7 +271,7 @@
271
271
  }
272
272
  }
273
273
  // pagination
274
- .pagination {
274
+ %pagination {
275
275
  ul {
276
276
  margin:10px auto;
277
277
  display:block;
@@ -334,7 +334,7 @@
334
334
  }
335
335
  }
336
336
  .no-js {
337
- .nav {
337
+ %nav {
338
338
  ul {
339
339
  li.menu {
340
340
  ul {
@@ -350,7 +350,7 @@
350
350
  }
351
351
  }
352
352
  }
353
- ul.breadcrumbs {
353
+ %breadcrumbs {
354
354
  list-style:none;
355
355
  margin:0;
356
356
  padding:0;
@@ -378,3 +378,19 @@ ul.breadcrumbs {
378
378
  }
379
379
  }
380
380
  }
381
+ @if $tags {
382
+ nav {
383
+ @extend %nav;
384
+ }
385
+ }
386
+ @if $classes {
387
+ .nav {
388
+ @extend %nav;
389
+ }
390
+ .pagination {
391
+ @extend %pagination;
392
+ }
393
+ .breadcrumbs {
394
+ @extend %breadcrumbs;
395
+ }
396
+ }
@@ -46,7 +46,7 @@
46
46
  @include small-tablet {
47
47
  // do not remove -- required for small-tablet helpers and adaptations
48
48
  @include grid-responsive();
49
- .nav {
49
+ .nav, .nav.inline {
50
50
  width:100%;
51
51
  ul, ul.row {
52
52
  li {
@@ -189,6 +189,15 @@
189
189
  }
190
190
  }
191
191
  }
192
+ .zero-small-tablet {
193
+ @include helper_reset();
194
+ }
195
+ .no-pad-small-tablet {
196
+ @include helper_reset(padding, $spacers: padded pad-top pad-right pad-bottom pad-left);
197
+ }
198
+ .no-gap-small-tablet {
199
+ @include helper_reset(margin, $spacers: gapped gap-top gap-right gap-bottom gap-left);
200
+ }
192
201
  }
193
202
 
194
203
 
@@ -215,6 +224,15 @@
215
224
  }
216
225
  }
217
226
  }
227
+ .zero-mobile {
228
+ @include helper_reset();
229
+ }
230
+ .no-pad-mobile {
231
+ @include helper_reset(padding, $spacers: padded pad-top pad-right pad-bottom pad-left);
232
+ }
233
+ .no-gap-mobile {
234
+ @include helper_reset(margin, $spacers: gapped gap-top gap-right gap-bottom gap-left);
235
+ }
218
236
  }
219
237
 
220
238
 
@@ -5,9 +5,9 @@
5
5
 
6
6
 
7
7
 
8
- .tabs, [role=tabpanel] {
8
+ .tabs, [role~=tabpanel] {
9
9
  position:relative;
10
- > ul, > ol, [role=tablist] {
10
+ > ul, > ol, [role~=tablist] {
11
11
  display:block;
12
12
  width:100%;
13
13
  margin:0;
@@ -18,7 +18,7 @@
18
18
  display:block;
19
19
  clear:both;
20
20
  }
21
- li, [role=tab] {
21
+ li, [role~=tab] {
22
22
  display:block;
23
23
  float:left;
24
24
  margin:0 2px;
@@ -106,10 +106,10 @@
106
106
  }
107
107
  }
108
108
  }
109
- [role=tablist] {
109
+ [role~=tablist] {
110
110
  background:none;
111
111
  }
112
- > div, [role=tabpanel] {
112
+ > div, [role~=tabpanel] {
113
113
  display:none;
114
114
  padding:$gutter * 2;
115
115
  background:$background-color;
@@ -127,14 +127,14 @@
127
127
  }
128
128
  // vertical tabs
129
129
  &.vertical {
130
- > ul, > ol, [role=tablist] {
130
+ > ul, > ol, [role~=tablist] {
131
131
  height:100%;
132
132
  position:absolute;
133
133
  width:20%;
134
134
  background:$button-active;
135
135
  border-bottom:1px solid $button-active;
136
136
  @include rounded($radius 0 0 $radius);
137
- li, [role=tab] {
137
+ li, [role~=tab] {
138
138
  float:none;
139
139
  margin:0 -1px 0 0;
140
140
  &:first-child {
@@ -162,7 +162,7 @@
162
162
  }
163
163
  }
164
164
  }
165
- > div, [role=tabpanel] {
165
+ > div, [role~=tabpanel] {
166
166
  position:relative;
167
167
  left:20%;
168
168
  width:80%;
@@ -3,7 +3,9 @@
3
3
  ///////////////////////
4
4
  $max-width: 1200px; // max container width (i.e. - 960px)
5
5
  $gutter: 10px; // gutter spacing
6
- $classes: true; // enable CSS classes
6
+ $classes: true; // enable CSS class selectors (WIP)
7
+ $tags: true; // enable semantic tag selectors (WIP)
8
+ $aria: true; // enable Aria role selectors (WIP)
7
9
 
8
10
 
9
11
  // file paths
@@ -10,6 +10,18 @@
10
10
 
11
11
 
12
12
 
13
+ input {
14
+ &[type=checkbox], &[type=radio] {
15
+ padding:0;
16
+ background:none;
17
+ border:none;
18
+ display:inline-block;
19
+ width:auto !important;
20
+ height:auto !important;
21
+ @include rounded(0);
22
+ }
23
+ }
24
+
13
25
  html {
14
26
  &.lt-ie9 {
15
27
  min-width:$max-width !important;
@@ -24,15 +36,6 @@ html {
24
36
  &:focus {
25
37
  border-color:$button-active;
26
38
  }
27
- &[type=checkbox], &[type=radio] {
28
- padding:0;
29
- background:none;
30
- border:none;
31
- display:inline-block;
32
- width:auto !important;
33
- height:auto !important;
34
- @include rounded(0);
35
- }
36
39
  }
37
40
  // custom select box
38
41
  span.select {
@@ -45,7 +48,6 @@ html {
45
48
  vertical-align:top;
46
49
  &:focus {
47
50
  border:1px solid $button-active;
48
- @include drop-shadow(#fff, 0, 0, 0);
49
51
  }
50
52
  }
51
53
  }
@@ -28,7 +28,6 @@
28
28
  @import "font-awesome";
29
29
  @import "social-icons";
30
30
  @import "tooltips";
31
- @import "cycle";
32
31
  // @import "popovers";
33
32
  @import "modals";
34
33
  @import "tiles";
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groundworkcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
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-04-18 00:00:00.000000000 Z
12
+ date: 2013-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &71002650 !ruby/object:Gem::Requirement
16
+ requirement: &80324740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *71002650
24
+ version_requirements: *80324740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &71002400 !ruby/object:Gem::Requirement
27
+ requirement: &80324490 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *71002400
35
+ version_requirements: *80324490
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: execjs
38
- requirement: &71002210 !ruby/object:Gem::Requirement
38
+ requirement: &80324300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *71002210
46
+ version_requirements: *80324300
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &71001940 !ruby/object:Gem::Requirement
49
+ requirement: &80324030 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '3.1'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *71001940
57
+ version_requirements: *80324030
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: less
60
- requirement: &71001700 !ruby/object:Gem::Requirement
60
+ requirement: &80323810 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *71001700
68
+ version_requirements: *80323810
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: therubyracer
71
- requirement: &71001400 !ruby/object:Gem::Requirement
71
+ requirement: &80323520 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - =
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: 0.11.1
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *71001400
79
+ version_requirements: *80323520
80
80
  description: Gem that integrates Sidereel GroundworkCSS into Rails 3+
81
81
  email:
82
82
  - ognjen.regoje@gmail.com