concisecss 0.0.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -8
  3. data/app/assets/javascripts/concisecss/dropdown.js +17 -8
  4. data/app/assets/javascripts/concisecss/naver.js +8 -8
  5. data/app/assets/javascripts/concisecss/navigation.js +5 -5
  6. data/app/assets/javascripts/concisecss/non-responsive.js +8 -8
  7. data/app/assets/stylesheets/base/_headings.scss +129 -119
  8. data/app/assets/stylesheets/base/_main.scss +15 -13
  9. data/app/assets/stylesheets/{generic → base}/_print.scss +38 -56
  10. data/app/assets/stylesheets/base/_selection.scss +15 -9
  11. data/app/assets/stylesheets/base/_type.scss +21 -19
  12. data/app/assets/stylesheets/{generic/_shared.scss → base/_vertical-rhythm.scss} +9 -10
  13. data/app/assets/stylesheets/components/_buttons.scss +174 -0
  14. data/app/assets/stylesheets/components/_colors.scss +25 -0
  15. data/app/assets/stylesheets/{objects → components}/_dropdowns.scss +67 -79
  16. data/app/assets/stylesheets/components/_navigation.scss +133 -0
  17. data/app/assets/stylesheets/concise.scss +31 -31
  18. data/app/assets/stylesheets/{generic → helpers}/_clearfix.scss +2 -6
  19. data/app/assets/stylesheets/helpers/_conditional.scss +128 -0
  20. data/app/assets/stylesheets/helpers/_functions.scss +32 -0
  21. data/app/assets/stylesheets/{generic/_helper.scss → helpers/_helpers.scss} +29 -38
  22. data/app/assets/stylesheets/helpers/_mixins.scss +315 -0
  23. data/app/assets/stylesheets/{generic → helpers}/_normalize.scss +35 -35
  24. data/app/assets/stylesheets/{_defaults.scss → helpers/_variables.scss} +68 -78
  25. data/app/assets/stylesheets/layout/_container.scss +17 -0
  26. data/app/assets/stylesheets/layout/_forms.scss +103 -0
  27. data/app/assets/stylesheets/layout/_grid.scss +71 -0
  28. data/app/assets/stylesheets/layout/_lists.scss +88 -0
  29. data/app/assets/stylesheets/layout/tables.scss +63 -0
  30. data/lib/concisecss/concisecss_source.rb +30 -40
  31. data/lib/concisecss/version.rb +1 -1
  32. metadata +21 -20
  33. data/app/assets/stylesheets/generic/_conditional.scss +0 -126
  34. data/app/assets/stylesheets/generic/_mixins.scss +0 -157
  35. data/app/assets/stylesheets/objects/_badges.scss +0 -53
  36. data/app/assets/stylesheets/objects/_breadcrumbs.scss +0 -35
  37. data/app/assets/stylesheets/objects/_buttons.scss +0 -287
  38. data/app/assets/stylesheets/objects/_colors.scss +0 -48
  39. data/app/assets/stylesheets/objects/_groups.scss +0 -102
  40. data/app/assets/stylesheets/objects/_navigation.scss +0 -382
  41. data/app/assets/stylesheets/objects/_progress.scss +0 -106
  42. data/app/assets/stylesheets/objects/_wells.scss +0 -103
@@ -1,157 +0,0 @@
1
- //------------------------------------
2
- // FUNCTIONS
3
- //------------------------------------
4
-
5
- //
6
- // Calculates proper rem font-size given
7
- // a pixel amount.
8
- //
9
- @function calculate-rem($font-size) {
10
- $rem-size: ($font-size / $base-font-size) * 1rem;
11
- @return $rem-size;
12
- }
13
-
14
-
15
- //
16
- // Calculates proper line-height given a
17
- // font-size to maintain vertical rhythm.
18
- //
19
- @function calculate-line-height($font-size) {
20
- $line-height-size: ceil($font-size / $base-line-height) * ($base-line-height / $font-size);
21
- @return $line-height-size;
22
- }
23
-
24
-
25
-
26
-
27
- //------------------------------------
28
- // MIXINS
29
- //------------------------------------
30
-
31
- //
32
- // Uses `calculate-rem()` to calculate rem font-size and px
33
- // fallback. line-height is calculated with `calculate-line-height()`
34
- // but passing `false` will prevent that.
35
- //
36
- // `@include font-size(24px);`
37
- //
38
- //
39
- // Big thanks to inuitcss for inspiration behind this
40
- // (https://github.com/csswizardry/inuit.css/blob/master/generic/_mixins.scss)
41
- @mixin font-size($font-size, $line-height: true) {
42
- font-size: $font-size;
43
- font-size: calculate-rem($font-size);
44
-
45
- @if $line-height == true {
46
- line-height: calculate-line-height($font-size);
47
- }
48
- }
49
-
50
-
51
- //
52
- // Proper vendor prefixes are created just by
53
- // passing a property value and size value.
54
- //
55
- // `@include vendor(border-radius, 4px);`
56
- //
57
- //
58
- // Thanks to inuitcss for this handy mixin
59
- // (https://github.com/csswizardry/inuit.css/blob/master/generic/_mixins.scss)
60
- @mixin vendor($property, $value...) {
61
- -webkit-#{$property}: $value;
62
- -moz-#{$property}: $value;
63
- -ms-#{$property}: $value;
64
- -o-#{$property}: $value;
65
- #{$property}: $value;
66
- }
67
-
68
-
69
- //
70
- // By passing in one of the pre-defined media queries that
71
- // are packaged with Concise by default, you can easily
72
- // create styles that are built from the ground-up to be
73
- // mobile friendly.
74
- //
75
- // `@include breakpoint(extra-small) { ... }`
76
- //
77
- //
78
- @mixin breakpoint($point) {
79
- @if $point == extra-small {
80
- @media (min-width: $extra-small-start) { @content; }
81
- }
82
-
83
- @else if $point == small {
84
- @media (min-width: $small-start) { @content; }
85
- }
86
-
87
- @else if $point == medium {
88
- @media (min-width: $medium-start) { @content; }
89
- }
90
-
91
- @else if $point == large {
92
- @media (min-width: $large-start) { @content; }
93
- }
94
-
95
- @else if $point == extra-large {
96
- @media (min-width: $extra-large-start) { @content; }
97
- }
98
-
99
- @else if $point == high-density {
100
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
101
- only screen and (min--moz-device-pixel-ratio: 1.5),
102
- only screen and (-o-min-device-pixel-ratio: 3/2),
103
- only screen and (min-device-pixel-ratio: 1.5) { @content; }
104
- }
105
- }
106
-
107
-
108
- //
109
- // Create variable-number grid columns given the value
110
- // for variable `$column-number`
111
- //
112
- @mixin grid-setup($number: $column-number) {
113
- // Assign percentage-based widths for columns
114
- @for $i from 1 through $number {
115
- .#{$column-prefix + $i} { width: 100% / $number * $i; }
116
- }
117
-
118
- @for $i from 1 through $number {
119
- // Style all but the last column
120
- $width-of-column: (100% - $gutters * ($number - 1)) / $number;
121
-
122
- .gutters .#{$column-prefix + $i} {
123
- width: $width-of-column * $i + $gutters * ($i - 1);
124
- content: $gutters * ($i - 1);
125
- }
126
- }
127
- }
128
-
129
-
130
- //
131
- // Create proper `.push-` classes given the value
132
- // for variable `$column-number`
133
- //
134
- @mixin push-setup($number: $column-number) {
135
- @for $i from 1 to $number {
136
- .push-#{$i} { left: 100% / $number * $i; }
137
- }
138
-
139
- @for $i from 1 to $number {
140
- .gutters .push-#{$i} { left: 100% / $number * $i - $gutters; }
141
- }
142
- }
143
-
144
-
145
- //
146
- // Create proper `.pull-` classes given the value
147
- // for variable `$column-number`
148
- //
149
- @mixin pull-setup($number: $column-number) {
150
- @for $i from 1 to $number {
151
- .pull-#{$i} { right: 100% / $number * $i; }
152
- }
153
-
154
- @for $i from 1 to $number {
155
- .gutters .pull-#{$i} { right: 100% / $number * $i - $gutters; }
156
- }
157
- }
@@ -1,53 +0,0 @@
1
- @if $use-badges == true {
2
- //------------------------------------
3
- // BADGES
4
- //------------------------------------
5
- .label,
6
- .badge {
7
- background-color: #b5b5b5;
8
- color: #fff;
9
- @include font-size(12px);
10
- font-weight: bold;
11
- padding: 3px 7px;
12
- text-align: center;
13
- vertical-align: baseline;
14
- white-space: nowrap;
15
- }
16
-
17
- .label {
18
- border-radius: 4px;
19
- display: inline;
20
- }
21
-
22
- .badge {
23
- border-radius: 10px;
24
- display: inline-block;
25
- padding: 1px 7px;
26
- }
27
-
28
- .label[href] {
29
- &:hover, &:focus {
30
- color: #fff;
31
- cursor: pointer;
32
- text-decoration: none;
33
- }
34
- }
35
-
36
- a.badge {
37
- &:hover, &:focus {
38
- color: #fff;
39
- cursor: pointer;
40
- text-decoration: none;
41
- }
42
- }
43
-
44
- .label a,
45
- .badge a {
46
- color: #fff;
47
- cursor: pointer;
48
- text-decoration: none;
49
- }
50
-
51
- .label:empty,
52
- .badge:empty { display: none; }
53
- }
@@ -1,35 +0,0 @@
1
- @if $use-breadcrumbs == true {
2
- //------------------------------------
3
- // BREADCRUMBS
4
- //------------------------------------
5
- .breadcrumbs {
6
- @include font-size(13px);
7
- margin: 12px 0;
8
- padding: 5px 15px 5px 0;
9
-
10
- li {
11
- display: inline;
12
- margin-right: 10px;
13
-
14
- &:last-child { margin-right: 0px; }
15
-
16
- &:after {
17
- content: "/";
18
- color: #ccc;
19
- padding-left: 12px;
20
- vertical-align: middle;
21
- }
22
-
23
- &:last-child {
24
- color: #999;
25
-
26
- a { color: #999; }
27
-
28
- &:after { content: ""; }
29
- }
30
- }
31
-
32
- .well,
33
- &.well { padding-left: 15px; }
34
- }
35
- }
@@ -1,287 +0,0 @@
1
- @if $use-buttons == true {
2
- //------------------------------------
3
- // BUTTONS
4
- //------------------------------------
5
- .btn {
6
- background-color: #ccc;
7
- border: 0;
8
- color: #fff;
9
- cursor: pointer;
10
- display: block;
11
- font-size: 100%;
12
- font-weight: 700;
13
- letter-spacing: 1px;
14
- line-height: 1;
15
- margin: 12px auto;
16
- outline: none;
17
- padding: 15px 48px;
18
- position: relative;
19
- text-align: center;
20
- text-transform: uppercase;
21
- vertical-align: baseline;
22
- white-space: nowrap;
23
- width: 100%;
24
-
25
- -webkit-touch-callout: none;
26
-
27
- @include vendor(user-select, none);
28
-
29
- @include vendor(user-drag, none);
30
-
31
- @include vendor(transition, all 0.3s);
32
-
33
- &::-moz-focus-inner {
34
- padding: 0;
35
- border: 0;
36
- }
37
-
38
- &:after {
39
- content: "";
40
- position: absolute;
41
- z-index: -1;
42
- }
43
-
44
- &:hover {
45
- background-color: #b5b5b5;
46
- background-image: -webkit-gradient(linear, 50, 50, 50 100%, from(rgba(50, 50, 50, 0.05)), to(rgba(50, 50, 50, 0.05)));
47
- background-image: -webkit-linear-gradient(top, rgba(50, 50, 50, 0.05), rgba(50, 50, 50, 0.05));
48
- background-image: -moz-linear-gradient(top, rgba(50, 50, 50, 0.05), rgba(50, 50, 50, 0.05));
49
- background-image: -o-linear-gradient(top, rgba(50, 50, 50, 0.05), rgba(50, 50, 50, 0.05));
50
- background-image: linear-gradient(to bottom, rgba(50, 50, 50, 0.05), rgba(50, 50, 50, 0.05));
51
- background-repeat: repeat-x;
52
- }
53
-
54
- &:active {
55
- background-image: -webkit-gradient(linear, 50, 50, 50 100%, from(rgba(50, 50, 50, 0.1)), to(rgba(50, 50, 50, 0.1)));
56
- background-image: -webkit-linear-gradient(top, rgba(50, 50, 50, 0.1), rgba(50, 50, 50, 0.1));
57
- background-image: -moz-linear-gradient(top, rgba(50, 50, 50, 0.1), rgba(50, 50, 50, 0.1));
58
- background-image: -o-linear-gradient(top, rgba(50, 50, 50, 0.1), rgba(50, 50, 50, 0.1));
59
- background-image: linear-gradient(to bottom, rgba(50, 50, 50, 0.1), rgba(50, 50, 50, 0.1));
60
- background-repeat: repeat-x;
61
- }
62
-
63
- &[disabled] {
64
- background: #dededc !important;
65
- border: none;
66
- color: #b3b3b1;
67
- cursor: default;
68
-
69
- &:hover,
70
- &:active,
71
- &:focus {
72
- background: #dededc !important;
73
- border: none;
74
- color: #b3b3b1;
75
- cursor: default;
76
- }
77
- }
78
- }
79
-
80
- @include breakpoint(small) {
81
- .btn {
82
- display: inline-block;
83
- *display: inline;
84
- margin: 0px;
85
- width: auto;
86
- zoom: 1;
87
- }
88
-
89
- .btn-extra-small,
90
- a.btn-extra-small,
91
- p.btn-extra-small,
92
- input.btn-extra-small {
93
- @include font-size(11px);
94
- padding: 5px 16px;
95
- }
96
-
97
- .btn-small,
98
- a.btn-small,
99
- p.btn-small,
100
- input.btn-small {
101
- @include font-size(12px);
102
- padding: 10px 32px;
103
- }
104
-
105
- .btn-large,
106
- a.btn-large,
107
- p.btn-large,
108
- input.btn-large { padding: 20px 64px; }
109
-
110
- .btn-extra-large,
111
- a.btn-extra-large,
112
- p.btn-extra-large,
113
- input.btn-extra-large { padding: 25px 80px; }
114
- }
115
-
116
- a.btn {
117
- color: #fff;
118
- text-decoration: none;
119
-
120
- &:hover {
121
- color: #fff;
122
- text-decoration: none;
123
- }
124
-
125
- &:active { outline: 0; }
126
- }
127
-
128
- input[type="submit"].btn {
129
- color: #fff;
130
- height: auto;
131
- }
132
-
133
- button.btn { color: #fff; }
134
-
135
- .btn {
136
- &.bg-white { color: #333; }
137
-
138
-
139
- // Bordered
140
- &.btn-border {
141
- background: transparent;
142
- border-color: #ddd;
143
- border-style: solid;
144
- border-width: 1px;
145
- color: #aaa;
146
-
147
- &:hover {
148
- background: #ddd;
149
- color: #fff !important;
150
- }
151
-
152
- &.white {
153
- border-color: $bg-white;
154
-
155
- &:hover {
156
- background: $bg-white;
157
- color: $color-black !important;
158
- }
159
- }
160
- }
161
- }
162
-
163
-
164
- // Bordered white
165
- a.btn.btn-border.white:hover {
166
- background: $bg-white;
167
- color: $color-black !important;
168
- }
169
-
170
- .btn.btn-border.white,
171
- a.btn.btn-border.white { color: $color-white; }
172
-
173
- .btn.btn-border {
174
- &.white {
175
- &:active, &:focus { background-color: #f9f9f9; }
176
- }
177
-
178
-
179
- // Bordered black
180
- &.black {
181
- border-color: $bg-black;
182
- color: $color-black;
183
-
184
- &:hover { background-color: $bg-black; }
185
-
186
- &:active, &:focus { background-color: $bg-black; }
187
- }
188
-
189
-
190
- // Bordered gray
191
- &.gray {
192
- border-color: $bg-gray;
193
- color: $color-gray;
194
-
195
- &:hover { background-color: $bg-gray; }
196
-
197
- &:active, &:focus { background-color: darken($bg-gray, 15%); }
198
- }
199
-
200
-
201
- // Bordered green
202
- &.green {
203
- border-color: $bg-green;
204
- color: $color-green;
205
-
206
- &:hover { background-color: $bg-green; }
207
-
208
- &:active, &:focus { background-color: darken($bg-green, 15%); }
209
- }
210
-
211
-
212
- // Bordered blue
213
- &.blue {
214
- border-color: $bg-blue;
215
- color: $color-blue;
216
-
217
- &:hover { background-color: $bg-blue; }
218
-
219
- &:active, &:focus { background-color: darken($bg-blue, 15%); }
220
- }
221
-
222
-
223
- // Bordered yellow
224
- &.yellow {
225
- border-color: $bg-yellow;
226
- color: $color-yellow;
227
-
228
- &:hover { background-color: $bg-yellow; }
229
-
230
- &:active, &:focus { background-color: darken($bg-yellow, 15%); }
231
- }
232
-
233
-
234
- // Bordered red
235
- &.red {
236
- border-color: $bg-red;
237
- color: $color-red;
238
-
239
- &:hover { background-color: $bg-red; }
240
-
241
- &:active, &:focus { background-color: darken($bg-red, 15%); }
242
- }
243
- }
244
-
245
-
246
- // Dropdown
247
- .btn.dropdown {
248
- width: 100%;
249
-
250
- .dropdown-menu {
251
- margin-top: auto;
252
- text-align: left;
253
- top: 100%;
254
- width: 100%;
255
- }
256
-
257
- &[class*='dropdown-arrow-'] .dropdown-menu { margin-top: 10px; }
258
-
259
- &.up {
260
- .dropdown-menu {
261
- margin-bottom: 0px;
262
- top: auto;
263
- }
264
-
265
- &[class*='dropdown-arrow-'] .dropdown-menu { margin-bottom: 10px; }
266
- }
267
- }
268
-
269
- @include breakpoint(small) {
270
- .btn-extra-small .caret,
271
- .btn-small .caret {
272
- border-top: 4px solid;
273
- border-right: 4px solid transparent;
274
- border-left: 4px solid transparent;
275
- }
276
-
277
- .btn.dropdown {
278
- width: auto;
279
-
280
- &.extra-small .dropdown-menu { margin-top: 6px; }
281
-
282
- &.dropdown-small .dropdown-menu { margin-top: 11px; }
283
-
284
- &.dropdown-large .dropdown-menu { margin-top: 21px; }
285
- }
286
- }
287
- }