kentucky 2.2.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/LICENSE +2 -2
  4. data/app/assets/stylesheets/base/_normalize.scss +322 -0
  5. data/app/assets/stylesheets/base/_typography.scss +62 -0
  6. data/app/assets/stylesheets/components/README +9 -0
  7. data/app/assets/stylesheets/layout/README +10 -0
  8. data/app/assets/stylesheets/pages/README +6 -0
  9. data/app/assets/stylesheets/project.scss +18 -0
  10. data/app/assets/stylesheets/utilities/_functions.scss +37 -0
  11. data/app/assets/stylesheets/utilities/_mixins.scss +306 -0
  12. data/app/assets/stylesheets/utilities/_variables.scss +122 -0
  13. data/app/assets/stylesheets/vendors/README +12 -0
  14. data/kentucky.gemspec +3 -3
  15. data/lib/kentucky/generator.rb +1 -1
  16. data/lib/kentucky/version.rb +1 -1
  17. data/readme.md +23 -116
  18. metadata +21 -29
  19. data/app/assets/stylesheets/kentucky/_kentucky.scss +0 -52
  20. data/app/assets/stylesheets/kentucky/addons/_border.scss +0 -30
  21. data/app/assets/stylesheets/kentucky/addons/_clearfix.scss +0 -14
  22. data/app/assets/stylesheets/kentucky/addons/_easings.scss +0 -37
  23. data/app/assets/stylesheets/kentucky/addons/_hide-text.scss +0 -9
  24. data/app/assets/stylesheets/kentucky/addons/_input-types.scss +0 -82
  25. data/app/assets/stylesheets/kentucky/addons/_position.scss +0 -42
  26. data/app/assets/stylesheets/kentucky/addons/_size.scss +0 -47
  27. data/app/assets/stylesheets/kentucky/addons/_truncate.scss +0 -10
  28. data/app/assets/stylesheets/kentucky/base/_buttons.scss +0 -40
  29. data/app/assets/stylesheets/kentucky/base/_forms.scss +0 -86
  30. data/app/assets/stylesheets/kentucky/base/_layouts.scss +0 -13
  31. data/app/assets/stylesheets/kentucky/base/_lists.scss +0 -35
  32. data/app/assets/stylesheets/kentucky/base/_project-settings.scss +0 -112
  33. data/app/assets/stylesheets/kentucky/base/_tables.scss +0 -28
  34. data/app/assets/stylesheets/kentucky/base/_typography.scss +0 -84
  35. data/app/assets/stylesheets/kentucky/functions/_assign.scss +0 -17
  36. data/app/assets/stylesheets/kentucky/functions/_tint-shade.scss +0 -11
@@ -0,0 +1,6 @@
1
+ From sass.guidelin.es:
2
+
3
+ If you have page-specific styles, it is better to put them in a pages/ folder, in a file named after the page. For instance, it’s not uncommon to have very specific styles for the home page hence the need for a _home.scss file in pages/.
4
+
5
+ _home.scss
6
+ _contact.scss
@@ -0,0 +1,18 @@
1
+ // Set global charset for CSS
2
+ @charset 'utf-8';
3
+
4
+ // Project imports
5
+ @import 'utilities/variables';
6
+ @import 'utilities/functions';
7
+ @import 'utilities/mixins';
8
+
9
+ // @import 'vendors/*';
10
+
11
+ @import 'base/normalize';
12
+ @import 'base/typography';
13
+
14
+ // @import 'layout/*';
15
+
16
+ // @import 'components/*';
17
+
18
+ // @import 'pages/*';
@@ -0,0 +1,37 @@
1
+ ////
2
+ /// Global functions
3
+ ///
4
+ /// @group utilities
5
+ ////
6
+
7
+ /// Shorthand color mixing function.
8
+ /// Tint mixes a defined percentage of white into the chosen color.
9
+ /// @parameter {string} $color - Base color to mix white into.
10
+ /// @parameter {string} $percent - Percentage of white to mix into color.
11
+ /// @example scss
12
+ /// .link:hover {
13
+ /// color: tint(#b4d455, 10%);
14
+ /// }
15
+ /// @example css
16
+ /// .link:hover {
17
+ /// color: #bcd866;
18
+ /// }
19
+ @function tint($color, $percent) {
20
+ @return mix(#fff, $color, $percent);
21
+ }
22
+
23
+ /// Shorthand color mixing function.
24
+ /// Shade mixes a defined percentage of black into the chosen color.
25
+ /// @parameter {string} $color - Base color to mix black into.
26
+ /// @parameter {string} $percent - Percentage of black to mix into color.
27
+ /// @example scss
28
+ /// .link:hover {
29
+ /// color: shade(#b4d455, 10%);
30
+ /// }
31
+ /// @example css
32
+ /// .link:hover {
33
+ /// color: #a2bf4d;
34
+ /// }
35
+ @function shade($color, $percent) {
36
+ @return mix(#000, $color, $percent);
37
+ }
@@ -0,0 +1,306 @@
1
+ ////
2
+ /// Project mixins
3
+ ///
4
+ /// @group utilities
5
+ ////
6
+
7
+ /// Shorthand border creation mixin.
8
+ /// Allows for single line, variable border width,
9
+ ///
10
+ /// @parameter {string} $border-width - Accepts 1-4 unit values dictating border-widths.
11
+ /// @parameter {string} $border-style [solid] - Set border style.
12
+ /// @parameter {string} $border-color [$color-border-base] - Set border color.
13
+ ///
14
+ /// @example scss
15
+ /// .well {
16
+ /// @include border(2px 1px 5px, dashed, #666);
17
+ /// }
18
+ /// @example css
19
+ /// .well {
20
+ /// border-style: dashed;
21
+ /// border-color: #666;
22
+ /// border-width: 2px 1px 5px;
23
+ /// }
24
+ ///
25
+ /// @todo Allow multiple border style and color declarations.
26
+ @mixin border($border-width, $border-style: solid, $border-color: $color-border-base) {
27
+ // If more than 4 widths submitted, display error
28
+ @if (length($border-width) > 4) {
29
+ @error 'Border-width accepts a maximum of 4 width parameters; #{length($border-width)} found.';
30
+ }
31
+
32
+ // New border width list
33
+ $new-width: ();
34
+
35
+ // Populate it
36
+ @for $i from 1 through length($border-width) {
37
+
38
+ // If border is unitless, append unit
39
+ @if unitless(nth($border-width, $i)) {
40
+ $new-width: append($new-width, nth($border-width, $i) * 1px);
41
+ } @else {
42
+ $new-width: append($new-width, nth($border-width, $i));
43
+ }
44
+ }
45
+
46
+ border-style: $border-style;
47
+ border-color: $border-color;
48
+ border-width: $new-width;
49
+ }
50
+
51
+
52
+ /// Shorthand centering of elements.
53
+ /// If width and height are undefined, centering will be done via `translate`.
54
+ /// If width and height are defined, centering will be done via `margin`.
55
+ /// If width is defined and height is undefined, centering will be done via `margin-left` and `translateY`.
56
+ /// If width is undefined and height is defined, centering will be done via `translateX` and `margin-top`.
57
+ ///
58
+ /// Centering via flexbox is included as a separate mixin.
59
+ /// @see {mixin} center-children
60
+ ///
61
+ /// @parameter {string} $width [null] - Width of the element to be centered (can be 'null').
62
+ /// @parameter {string} $height [null] - Height of the element to be centered (can be 'null').
63
+ ///
64
+ /// @example scss
65
+ /// .action {
66
+ /// @include center(400px null);
67
+ /// }
68
+ /// @example css
69
+ /// .action {
70
+ /// position: absolute;
71
+ /// top: 50%;
72
+ /// left: 50%;
73
+ /// width: 400px;
74
+ /// margin-left: -200px;
75
+ /// transform: translateY(-50%);
76
+ /// }
77
+ @mixin center($width: null, $height: null) {
78
+ position: absolute;
79
+ top: 50%;
80
+ left: 50%;
81
+
82
+ @if not $width and not $height {
83
+ transform: translate(-50%, -50%);
84
+ } @else if $width and $height {
85
+ width: $width;
86
+ height: $height;
87
+ margin: -($width / 2) #{0 0} -($height / 2);
88
+ } @else if not $height {
89
+ width: $width;
90
+ margin-left: -($width / 2);
91
+ transform: translateY(-50%);
92
+ } @else {
93
+ height: $height;
94
+ margin-top: -($height / 2);
95
+ transform: translateX(-50%);
96
+ }
97
+ }
98
+
99
+
100
+ /// Shorthand centering of elements via flex.
101
+ /// Should be applied to a container whose child elements you want centered (horizontally and vertically).
102
+ ///
103
+ /// @example scss
104
+ /// .callout {
105
+ /// @include center-children;
106
+ /// }
107
+ /// @example css
108
+ /// .callout {
109
+ /// display: flex;
110
+ /// justify-content: center;
111
+ /// align-items: center;
112
+ /// }
113
+ @mixin center-children {
114
+ display: flex;
115
+ justify-content: center;
116
+ align-items: center;
117
+ }
118
+
119
+
120
+ /// Quick clearfix mixin for clearing container content.
121
+ /// Proper use-case is when a container's children are floated. If the
122
+ /// container itself is floated and needs to be cleared, this will not
123
+ /// function the same as a `clear: left/right/both;`.
124
+ ///
125
+ /// @example scss
126
+ /// .container {
127
+ /// @include clearfix;
128
+ /// }
129
+ /// @example css
130
+ /// .container::after {
131
+ /// content: '';
132
+ /// display: table;
133
+ /// clear: both;
134
+ /// }
135
+ @mixin clearfix {
136
+ &::after {
137
+ content: '';
138
+ display: table;
139
+ clear: both;
140
+ }
141
+ }
142
+
143
+
144
+ /// Quick text replacement mixin for hiding text outside of an element.
145
+ /// Primarily used to hide text when a background-image replaces it.
146
+ ///
147
+ /// @example scss
148
+ /// .hero {
149
+ /// @include hide-text;
150
+ /// }
151
+ /// @example css
152
+ /// .hero {
153
+ /// text-indent: 101%;
154
+ /// overflow: hidden;
155
+ /// white-space: nowrap;
156
+ /// }
157
+ @mixin hide-text {
158
+ text-indent: 101%;
159
+ overflow: hidden;
160
+ white-space: nowrap;
161
+ }
162
+
163
+
164
+ /// Shorthand element positioning mixin.
165
+ ///
166
+ /// @parameter {string} $pos-type [relative] - Accepts all valid position strings (static, relative, absolute, fixed).
167
+ /// @parameter {string} $pos-vals [0 0 0 0] - Position values in typical order (top, right, bottom, left). If a value is not required, inset a unitless 0.
168
+ ///
169
+ /// @example scss
170
+ /// .call-to-action {
171
+ /// @include position(absolute, 15px 50px 0 0);
172
+ /// }
173
+ /// @example css
174
+ /// .call-to-action {
175
+ /// position: absolute;
176
+ /// top: 15px;
177
+ /// right: 50px;
178
+ /// }
179
+ ///
180
+ /// @todo Allow for unitless usage (i.e., `left: 0; right: 0;`) due to it being valid content.
181
+ @mixin position($pos-type: relative, $pos-vals: 0 0 0 0) {
182
+
183
+ // If no position type designated, default to 'relative'
184
+ @if type-of($pos-type) == list{
185
+ $pos-vals: $pos-type;
186
+ $pos-type: relative;
187
+ }
188
+
189
+ // Separate values into top, right, bottom, left
190
+ $top: nth($pos-vals, 1);
191
+ $right: nth($pos-vals, 2);
192
+ $bottom: nth($pos-vals, 3);
193
+ $left: nth($pos-vals, 4);
194
+
195
+ // Return position
196
+ position: $pos-type;
197
+
198
+ // Return values
199
+ // If value is a number and has a unit type, print value
200
+ // otherwise ignore
201
+ @if (type-of($top) == number and not unitless($top)){
202
+ top: $top;
203
+ }
204
+
205
+ @if (type-of($right) == number and not unitless($right)){
206
+ right: $right;
207
+ }
208
+
209
+ @if (type-of($bottom) == number and not unitless($bottom)){
210
+ bottom: $bottom;
211
+ }
212
+
213
+ @if (type-of($left) == number and not unitless($left)){
214
+ left: $left;
215
+ }
216
+ }
217
+
218
+
219
+ /// Shorthand element sizing.
220
+ /// Accepts auto or unit values. If only one value is provided, it will use that value for both width and height.
221
+ /// Otherwise the first value is width and the second value is height.
222
+ ///
223
+ /// @parameter {string} - Accepts 1 or 2 values.
224
+ ///
225
+ /// @example scss
226
+ /// .bucket {
227
+ /// @include size(auto 150px);
228
+ /// }
229
+ /// @example css
230
+ /// .bucket {
231
+ /// width: auto;
232
+ /// height: 150px;
233
+ /// }
234
+ @mixin size($size) {
235
+
236
+ // If only one value is present
237
+ @if length($size) == 1 {
238
+
239
+ @if $size == auto{
240
+ width: auto;
241
+ height: auto;
242
+ } @else if unitless($size) {
243
+ width: $size * 1px;
244
+ height: $size * 1px;
245
+ } @else if not(unitless($size)) {
246
+ width: $size;
247
+ height: $size;
248
+ }
249
+ }
250
+
251
+ // If both values are present
252
+ @if length($size) == 2 {
253
+
254
+ $width: nth($size, 1);
255
+ $height: nth($size, 2);
256
+
257
+ @if $width == auto {
258
+ width: $width;
259
+ } @else if unitless($width){
260
+ width: $width * 1px;
261
+ } @else if not(unitless($width)) {
262
+ width: $width;
263
+ }
264
+
265
+ @if $height == auto{
266
+ height: $height;
267
+ } @else if unitless($height) {
268
+ height: $height * 1px;
269
+ } @else if not(unitless($height)) {
270
+ height: $height;
271
+ }
272
+ }
273
+
274
+ // If more than 2 values, display error
275
+ @if length($size) > 2 {
276
+ @error 'Too many values detected. Size mixin only accepts 1-2 values.';
277
+ }
278
+ }
279
+
280
+
281
+
282
+ /// Shorthand for single-line text truncation based on width.
283
+ ///
284
+ /// @parameter {string} $truncate-width [100%] - Width the element will be truncated at.
285
+ ///
286
+ /// @example scss
287
+ /// .short-title {
288
+ /// @include truncate(250px);
289
+ /// }
290
+ /// @example css
291
+ /// .short-title {
292
+ /// display: inline-block;
293
+ /// max-width: 250px;
294
+ /// overflow: hidden;
295
+ /// text-overflow: ellipsis;
296
+ /// white-space: nowrap;
297
+ /// word-wrap: normal;
298
+ /// }
299
+ @mixin truncate($truncate-width: 100%) {
300
+ display: inline-block;
301
+ max-width: $truncate-width;
302
+ overflow: hidden;
303
+ text-overflow: ellipsis;
304
+ white-space: nowrap;
305
+ word-wrap: normal;
306
+ }
@@ -0,0 +1,122 @@
1
+ ////
2
+ /// Global project variables.
3
+ ///
4
+ /// @group utilities
5
+ ////
6
+
7
+ // Font variables
8
+ // Font families
9
+ $font-family-base: ('Source Sans Pro', 'Helvetica', 'Arial', sans-serif) !default;
10
+ $font-family-header: ('Source Sans Pro', 'Helvetica', 'Arial', sans-serif) !default;
11
+
12
+ // Font sizes
13
+ $font-size-base: 16px !default;
14
+
15
+ $font-size-h1: 22px !default;
16
+ $font-size-h2: 18px !default;
17
+ $font-size-h3: 14px !default;
18
+ $font-size-h4: 14px !default;
19
+ $font-size-h5: 12px !default;
20
+ $font-size-h6: 16px !default;
21
+
22
+ // Font weights
23
+ $font-weight-extra-light: 100 !default;
24
+ $font-weight-light: 200 !default;
25
+ $font-weight-book: 300 !default;
26
+ $font-weight-normal: 400 !default;
27
+ $font-weight-medium: 500 !default;
28
+ $font-weight-semibold: 600 !default;
29
+ $font-weight-bold: 700 !default;
30
+ $font-weight-black: 800 !default;
31
+ $font-weight-extra-black: 900 !default;
32
+
33
+ // Line heights
34
+ $line-height-base: 1.5 !default;
35
+ $line-height-header: 1.1 !default;
36
+
37
+ // Core spacing
38
+ $space-base: 20px !default;
39
+ $space-half: ($space-base / 2) !default;
40
+ $space-double: ($space-base * 2) !default;
41
+
42
+
43
+
44
+ // Color variables
45
+ // Site background color
46
+ $color-background: #fff !default;
47
+
48
+ // Base font color
49
+ $color-font-base: #333 !default;
50
+
51
+ // Base link colors
52
+ $color-link: #337ab7 !default;
53
+ $color-link-hover: shade($color-link, 15%) !default;
54
+
55
+ // Global colors
56
+ $color-default: #f6f6f6 !default;
57
+ $color-primary: #337ab7 !default;
58
+ $color-success: #5cb85c !default;
59
+ $color-info: #5bc0de !default;
60
+ $color-warning: #f0ad4e !default;
61
+ $color-danger: #d9534f !default;
62
+
63
+
64
+
65
+ // Border variables
66
+ // Border color
67
+ $color-border-base: $color-font-base !default;
68
+
69
+ // Default border
70
+ $border-base: 1px solid $color-border-base !default;
71
+
72
+ // Default border radius
73
+ $border-radius-base: 0 !default;
74
+
75
+
76
+
77
+ // Z-index variables
78
+ $z-index-base: 0 !default;
79
+ $z-index-nav: 10 !default;
80
+ $z-index-overlay: 20 !default;
81
+ $z-index-modal: 30 !default;
82
+
83
+
84
+
85
+ // Media query breakpoint variables
86
+ $bp-alpha: 1200px;
87
+ $bp-bravo: 900px;
88
+ $bp-charlie: 700px;
89
+
90
+
91
+
92
+ // Quick animation bezier curves
93
+ // http://easings.net/
94
+ // Ease In
95
+ $ease-in-sine: cubic-bezier(.47, 0, .745, .715);
96
+ $ease-in-quad: cubic-bezier(.55, .085, .68, .53);
97
+ $ease-in-cubic: cubic-bezier(.55, .055, .675, .19);
98
+ $ease-in-quart: cubic-bezier(.895, .03, .685, .22);
99
+ $ease-in-quint: cubic-bezier(.755, .05, .855, .06);
100
+ $ease-in-expo: cubic-bezier(.95, .05, .795, .035);
101
+ $ease-in-circ: cubic-bezier(.6, .04, .98, .335);
102
+ $ease-in-back: cubic-bezier(.6, -.28, .735, .045);
103
+
104
+ // Ease Out
105
+ $ease-out-sine: cubic-bezier(.39, .575, .565, 1);
106
+ $ease-out-quad: cubic-bezier(.25, .46, .45, .94);
107
+ $ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
108
+ $ease-out-quart: cubic-bezier(.165, .84, .44, 1);
109
+ $ease-out-quint: cubic-bezier(.23, 1, .32, 1);
110
+ $ease-out-expo: cubic-bezier(.19, 1, .22, 1);
111
+ $ease-out-circ: cubic-bezier(.075, .82, .165, 1);
112
+ $ease-out-back: cubic-bezier(.175, .885, .32, 1.275);
113
+
114
+ // Ease In Out
115
+ $ease-in-out-sine: cubic-bezier(.445, .05, .55, .95);
116
+ $ease-in-out-quad: cubic-bezier(.455, .03, .515, .955);
117
+ $ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);
118
+ $ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);
119
+ $ease-in-out-quint: cubic-bezier(.86, 0, .07, 1);
120
+ $ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
121
+ $ease-in-out-circ: cubic-bezier(.785, .135, .15, .86);
122
+ $ease-in-out-back: cubic-bezier(.68, -.55, .265, 1.55);