kentucky 0.5.2 → 1.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/app/assets/stylesheets/kentucky/_debug.scss +70 -74
- data/app/assets/stylesheets/kentucky/_kentucky.scss +47 -16
- data/app/assets/stylesheets/kentucky/_project-settings.scss +80 -41
- data/app/assets/stylesheets/kentucky/base/_forms.scss +65 -0
- data/app/assets/stylesheets/kentucky/base/_normalize.scss +33 -7
- data/app/assets/stylesheets/kentucky/base/_typography.scss +38 -29
- data/app/assets/stylesheets/kentucky/functions/_gradient-functions.scss +214 -0
- data/app/assets/stylesheets/kentucky/functions/_remify.scss +39 -0
- data/app/assets/stylesheets/kentucky/{extends/_mute.scss → functions/_strip-units.scss} +3 -4
- data/app/assets/stylesheets/kentucky/functions/_tint-shade.scss +12 -0
- data/app/assets/stylesheets/kentucky/grid/_grid.scss +114 -0
- data/app/assets/stylesheets/kentucky/{extends → helpers}/_alignment.scss +0 -0
- data/app/assets/stylesheets/kentucky/helpers/_anti-aliased.scss +8 -0
- data/app/assets/stylesheets/kentucky/helpers/_border.scss +32 -0
- data/app/assets/stylesheets/kentucky/{extends → helpers}/_breadcrumbs.scss +0 -0
- data/app/assets/stylesheets/kentucky/{extends → helpers}/_capslock.scss +0 -0
- data/app/assets/stylesheets/kentucky/helpers/_clearfix.scss +14 -0
- data/app/assets/stylesheets/kentucky/{mixins → helpers}/_font-size.scss +4 -5
- data/app/assets/stylesheets/kentucky/{extends → helpers}/_go.scss +0 -0
- data/app/assets/stylesheets/kentucky/helpers/_headings.scss +11 -0
- data/app/assets/stylesheets/kentucky/helpers/_hide-text.scss +9 -0
- data/app/assets/stylesheets/kentucky/helpers/_html5-input-types.scss +30 -0
- data/app/assets/stylesheets/kentucky/helpers/_linear-gradient.scss +42 -0
- data/app/assets/stylesheets/kentucky/helpers/_mute.scss +15 -0
- data/app/assets/stylesheets/kentucky/helpers/_position.scss +42 -0
- data/app/assets/stylesheets/kentucky/helpers/_prefixer.scss +34 -0
- data/app/assets/stylesheets/kentucky/helpers/_radial-gradient.scss +24 -0
- data/app/assets/stylesheets/kentucky/{extends → helpers}/_show-hide.scss +0 -0
- data/app/assets/stylesheets/kentucky/helpers/_size.scss +44 -0
- data/app/assets/stylesheets/kentucky/helpers/_strip-unit.scss +7 -0
- data/app/assets/stylesheets/kentucky/helpers/_transitions.scss +34 -0
- data/app/assets/stylesheets/kentucky/helpers/_triangle.scss +49 -0
- data/app/assets/stylesheets/kentucky/helpers/_truncate.scss +19 -0
- data/kentucky.gemspec +3 -3
- data/lib/kentucky/version.rb +1 -1
- data/readme.md +14 -36
- metadata +34 -19
- data/Kentucky.sublime-workspace +0 -556
- data/app/assets/stylesheets/kentucky/mixins/_borders.scss +0 -10
- data/app/assets/stylesheets/kentucky/mixins/_headings.scss +0 -23
- data/app/assets/stylesheets/kentucky/mixins/_sprite.scss +0 -9
- data/app/assets/stylesheets/kentucky/mixins/_truncate.scss +0 -14
- data/app/assets/stylesheets/style.scss +0 -12
@@ -19,6 +19,18 @@ time, mark, audio, video{
|
|
19
19
|
padding: 0;
|
20
20
|
}
|
21
21
|
|
22
|
+
// ------------------------------------------------------------------- //
|
23
|
+
// Border-Box
|
24
|
+
// ------------------------------------------------------------------- //
|
25
|
+
|
26
|
+
*,
|
27
|
+
*:before,
|
28
|
+
*:after {
|
29
|
+
-webkit-box-sizing: border-box;
|
30
|
+
-moz-box-sizing: border-box;
|
31
|
+
box-sizing: border-box;
|
32
|
+
}
|
33
|
+
|
22
34
|
// ------------------------------------------------------------------- //
|
23
35
|
// Display Definitions
|
24
36
|
// ------------------------------------------------------------------- //
|
@@ -92,18 +104,22 @@ abbr[title]{
|
|
92
104
|
border-bottom: 1px dotted;
|
93
105
|
}
|
94
106
|
|
107
|
+
address{
|
108
|
+
@extend %vertical-rhythm;
|
109
|
+
}
|
110
|
+
|
95
111
|
strong{
|
96
112
|
font-weight: bold;
|
97
113
|
}
|
98
114
|
|
99
115
|
hr{
|
100
|
-
@include prefixer(box-sizing, content-box, moz spec);
|
101
116
|
height: 0;
|
102
117
|
}
|
103
118
|
|
104
119
|
code,
|
105
120
|
pre{
|
106
|
-
|
121
|
+
@extend %vertical-rhythm;
|
122
|
+
font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
|
107
123
|
font-size: 1em;
|
108
124
|
}
|
109
125
|
|
@@ -111,6 +127,10 @@ pre{
|
|
111
127
|
white-space: pre-wrap;
|
112
128
|
}
|
113
129
|
|
130
|
+
p{
|
131
|
+
@extend %vertical-rhythm;
|
132
|
+
}
|
133
|
+
|
114
134
|
small{
|
115
135
|
font-size: 75%;
|
116
136
|
}
|
@@ -152,8 +172,8 @@ select,
|
|
152
172
|
textarea{
|
153
173
|
margin: 0;
|
154
174
|
font-family: $base-font-family;
|
155
|
-
font-size:
|
156
|
-
line-height:
|
175
|
+
font-size: $base-font-size;
|
176
|
+
line-height: $base-line-height;
|
157
177
|
}
|
158
178
|
|
159
179
|
button,
|
@@ -165,7 +185,7 @@ button,
|
|
165
185
|
html input[type="button"],
|
166
186
|
input[type="reset"],
|
167
187
|
input[type="submit"]{
|
168
|
-
|
188
|
+
appearance: button;
|
169
189
|
cursor: pointer;
|
170
190
|
}
|
171
191
|
|
@@ -182,7 +202,6 @@ input[type="radio"]{
|
|
182
202
|
|
183
203
|
input[type="search"] {
|
184
204
|
-webkit-appearance: textfield;
|
185
|
-
@include prefixer(appearance, content-box, moz webkit spec);
|
186
205
|
}
|
187
206
|
|
188
207
|
input[type="search"]::-webkit-search-cancel-button,
|
@@ -208,7 +227,8 @@ textarea{
|
|
208
227
|
ul,
|
209
228
|
ol,
|
210
229
|
dl{
|
211
|
-
|
230
|
+
@extend %vertical-rhythm;
|
231
|
+
padding: 0;
|
212
232
|
}
|
213
233
|
|
214
234
|
li > ul,
|
@@ -222,6 +242,12 @@ li > ol{
|
|
222
242
|
// ------------------------------------------------------------------- //
|
223
243
|
|
224
244
|
table{
|
245
|
+
@extend %vertical-rhythm;
|
225
246
|
border-collapse: collapse;
|
226
247
|
border-spacing: 0;
|
248
|
+
|
249
|
+
th,
|
250
|
+
td{
|
251
|
+
padding: $base-line-height / 2;
|
252
|
+
}
|
227
253
|
}
|
@@ -1,24 +1,40 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Setup
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
$base-space: $base-line-height;
|
6
|
+
$base-ratio: $base-line-height / $base-font-size;
|
7
|
+
|
8
|
+
%vertical-rhythm{
|
9
|
+
margin-bottom: $base-space;
|
10
|
+
margin-bottom: $base-ratio + rem;
|
11
|
+
}
|
12
|
+
|
1
13
|
// ------------------------------------------------------------------- //
|
2
14
|
// Base Typographic Rules
|
3
15
|
// ------------------------------------------------------------------- //
|
4
16
|
|
5
|
-
|
6
|
-
|
17
|
+
body{
|
18
|
+
color: $base-font-color;
|
19
|
+
font: #{$base-font-size} / #{$base-line-height} $base-font-family;
|
20
|
+
-webkit-font-smoothing: antialiased;
|
7
21
|
}
|
8
22
|
|
9
23
|
// ------------------------------------------------------------------- //
|
10
24
|
// Headings
|
11
|
-
//
|
25
|
+
//
|
12
26
|
// The goal here is to define headings and establish practical
|
13
27
|
// font-sizing from the get go.
|
14
28
|
//
|
15
29
|
// Also includes a "double-stranded hierarchy" allowing you to use HTML
|
16
|
-
// heading elements or the alternate extend included (based on the
|
30
|
+
// heading elements or the alternate extend included (based on the
|
17
31
|
// military alphabet).
|
18
32
|
// ------------------------------------------------------------------- //
|
19
33
|
|
20
34
|
h1, h2, h3, h4, h5, h6{
|
35
|
+
@extend %vertical-rhythm;
|
21
36
|
font-family: $brand-font-family;
|
37
|
+
font-weight: normal;
|
22
38
|
}
|
23
39
|
|
24
40
|
h1,
|
@@ -58,6 +74,8 @@ h6,
|
|
58
74
|
// ------------------------------------------------------------------- //
|
59
75
|
|
60
76
|
%hgroup{
|
77
|
+
@extend %vertical-rhythm;
|
78
|
+
|
61
79
|
@include headings(1,6){
|
62
80
|
margin-bottom: 0;
|
63
81
|
}
|
@@ -67,48 +85,39 @@ h6,
|
|
67
85
|
// Extra Large / Small Extends
|
68
86
|
// ------------------------------------------------------------------- //
|
69
87
|
|
70
|
-
%
|
71
|
-
@include font-size($
|
88
|
+
%micro{
|
89
|
+
@include font-size($micro-size);
|
72
90
|
}
|
73
91
|
|
74
|
-
%
|
75
|
-
@include font-size($
|
92
|
+
%milli{
|
93
|
+
@include font-size($milli-size);
|
76
94
|
}
|
77
95
|
|
78
96
|
%kilo{
|
79
97
|
@include font-size($kilo-size);
|
80
98
|
}
|
81
99
|
|
82
|
-
%
|
83
|
-
@include font-size($
|
100
|
+
%mega{
|
101
|
+
@include font-size($mega-size);
|
84
102
|
}
|
85
103
|
|
86
|
-
%
|
87
|
-
@include font-size($
|
104
|
+
%giga{
|
105
|
+
@include font-size($giga-size);
|
88
106
|
}
|
89
107
|
|
108
|
+
|
90
109
|
// ------------------------------------------------------------------- //
|
91
110
|
// Links
|
92
111
|
// ------------------------------------------------------------------- //
|
93
112
|
|
94
113
|
a{
|
95
|
-
color: $link-color;
|
114
|
+
color: $base-link-color;
|
96
115
|
text-decoration: none;
|
97
|
-
|
98
|
-
|
99
|
-
// ------------------------------------------------------------------- //
|
100
|
-
// Single-direction Margins
|
101
|
-
// ------------------------------------------------------------------- //
|
102
|
-
|
103
|
-
h1, h2, h3, h4, h5, h6,
|
104
|
-
ul, ol, dl,
|
105
|
-
p,
|
106
|
-
pre, table, fieldset{
|
107
|
-
margin-bottom: ($base-font-size / $base-line-height); // IE8 Fallback
|
108
|
-
margin-bottom: 1rem;
|
109
|
-
}
|
116
|
+
@include transition(color .3s linear);
|
110
117
|
|
111
|
-
|
112
|
-
|
113
|
-
|
118
|
+
&:hover,
|
119
|
+
&:active,
|
120
|
+
&:focus{
|
121
|
+
color: $hover-link-color;
|
122
|
+
}
|
114
123
|
}
|
@@ -0,0 +1,214 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Bourbon Gradient Mixins Req. Functions
|
3
|
+
//
|
4
|
+
// https://github.com/thoughtbot/bourbon/tree/master/app/assets/stylesheets/helpers
|
5
|
+
// ------------------------------------------------------------------- //
|
6
|
+
|
7
|
+
// Position Parser
|
8
|
+
@function _gradient-positions-parser($gradient-type, $gradient-positions) {
|
9
|
+
@if $gradient-positions
|
10
|
+
and ($gradient-type == linear)
|
11
|
+
and (type-of($gradient-positions) != color) {
|
12
|
+
$gradient-positions: _linear-positions-parser($gradient-positions);
|
13
|
+
}
|
14
|
+
@else if $gradient-positions
|
15
|
+
and ($gradient-type == radial)
|
16
|
+
and (type-of($gradient-positions) != color) {
|
17
|
+
$gradient-positions: _radial-positions-parser($gradient-positions);
|
18
|
+
}
|
19
|
+
@return $gradient-positions;
|
20
|
+
}
|
21
|
+
|
22
|
+
// Linear Position Parser
|
23
|
+
@function _linear-positions-parser($pos) {
|
24
|
+
$type: type-of(nth($pos, 1));
|
25
|
+
$spec: null;
|
26
|
+
$degree: null;
|
27
|
+
$side: null;
|
28
|
+
$corner: null;
|
29
|
+
$length: length($pos);
|
30
|
+
// Parse Side and corner positions
|
31
|
+
@if ($length > 1) {
|
32
|
+
@if nth($pos, 1) == "to" { // Newer syntax
|
33
|
+
$side: nth($pos, 2);
|
34
|
+
|
35
|
+
@if $length == 2 { // eg. to top
|
36
|
+
// Swap for backwards compatability
|
37
|
+
$degree: _position-flipper(nth($pos, 2));
|
38
|
+
}
|
39
|
+
@else if $length == 3 { // eg. to top left
|
40
|
+
$corner: nth($pos, 3);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
@else if $length == 2 { // Older syntax ("top left")
|
44
|
+
$side: _position-flipper(nth($pos, 1));
|
45
|
+
$corner: _position-flipper(nth($pos, 2));
|
46
|
+
}
|
47
|
+
|
48
|
+
@if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") {
|
49
|
+
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
50
|
+
}
|
51
|
+
@else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") {
|
52
|
+
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
53
|
+
}
|
54
|
+
@else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") {
|
55
|
+
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
56
|
+
}
|
57
|
+
@else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") {
|
58
|
+
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
59
|
+
}
|
60
|
+
$spec: to $side $corner;
|
61
|
+
}
|
62
|
+
@else if $length == 1 {
|
63
|
+
// Swap for backwards compatability
|
64
|
+
@if $type == string {
|
65
|
+
$degree: $pos;
|
66
|
+
$spec: to _position-flipper($pos);
|
67
|
+
}
|
68
|
+
@else {
|
69
|
+
$degree: -270 - $pos; //rotate the gradient opposite from spec
|
70
|
+
$spec: $pos;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
$degree: unquote($degree + ",");
|
74
|
+
$spec: unquote($spec + ",");
|
75
|
+
@return $degree $spec;
|
76
|
+
}
|
77
|
+
|
78
|
+
@function _position-flipper($pos) {
|
79
|
+
@return if($pos == left, right, null)
|
80
|
+
if($pos == right, left, null)
|
81
|
+
if($pos == top, bottom, null)
|
82
|
+
if($pos == bottom, top, null);
|
83
|
+
}
|
84
|
+
|
85
|
+
// Radial Argument Parser
|
86
|
+
@function _radial-arg-parser($G1, $G2, $pos, $shape-size) {
|
87
|
+
@each $value in $G1, $G2 {
|
88
|
+
$first-val: nth($value, 1);
|
89
|
+
$pos-type: type-of($first-val);
|
90
|
+
$spec-at-index: null;
|
91
|
+
|
92
|
+
// Determine if spec was passed to mixin
|
93
|
+
@if type-of($value) == list {
|
94
|
+
$spec-at-index: if(index($value, at), index($value, at), false);
|
95
|
+
}
|
96
|
+
@if $spec-at-index {
|
97
|
+
@if $spec-at-index > 1 {
|
98
|
+
@for $i from 1 through ($spec-at-index - 1) {
|
99
|
+
$shape-size: $shape-size nth($value, $i);
|
100
|
+
}
|
101
|
+
@for $i from ($spec-at-index + 1) through length($value) {
|
102
|
+
$pos: $pos nth($value, $i);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
@else if $spec-at-index == 1 {
|
106
|
+
@for $i from ($spec-at-index + 1) through length($value) {
|
107
|
+
$pos: $pos nth($value, $i);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
$G1: null;
|
111
|
+
}
|
112
|
+
|
113
|
+
// If not spec calculate correct values
|
114
|
+
@else {
|
115
|
+
@if ($pos-type != color) or ($first-val != "transparent") {
|
116
|
+
@if ($pos-type == number)
|
117
|
+
or ($first-val == "center")
|
118
|
+
or ($first-val == "top")
|
119
|
+
or ($first-val == "right")
|
120
|
+
or ($first-val == "bottom")
|
121
|
+
or ($first-val == "left") {
|
122
|
+
|
123
|
+
$pos: $value;
|
124
|
+
|
125
|
+
@if $pos == $G1 {
|
126
|
+
$G1: null;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
@else if
|
131
|
+
($first-val == "ellipse")
|
132
|
+
or ($first-val == "circle")
|
133
|
+
or ($first-val == "closest-side")
|
134
|
+
or ($first-val == "closest-corner")
|
135
|
+
or ($first-val == "farthest-side")
|
136
|
+
or ($first-val == "farthest-corner")
|
137
|
+
or ($first-val == "contain")
|
138
|
+
or ($first-val == "cover") {
|
139
|
+
|
140
|
+
$shape-size: $value;
|
141
|
+
|
142
|
+
@if $value == $G1 {
|
143
|
+
$G1: null;
|
144
|
+
}
|
145
|
+
|
146
|
+
@else if $value == $G2 {
|
147
|
+
$G2: null;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
@return $G1, $G2, $pos, $shape-size;
|
154
|
+
}
|
155
|
+
|
156
|
+
// Radial Position Parser
|
157
|
+
@function _radial-positions-parser($gradient-pos) {
|
158
|
+
$shape-size: nth($gradient-pos, 1);
|
159
|
+
$pos: nth($gradient-pos, 2);
|
160
|
+
$shape-size-spec: _shape-size-stripper($shape-size);
|
161
|
+
|
162
|
+
$pre-spec: unquote(if($pos, "#{$pos}, ", null))
|
163
|
+
unquote(if($shape-size, "#{$shape-size},", null));
|
164
|
+
$pos-spec: if($pos, "at #{$pos}", null);
|
165
|
+
|
166
|
+
$spec: "#{$shape-size-spec} #{$pos-spec}";
|
167
|
+
|
168
|
+
// Add comma
|
169
|
+
@if ($spec != ' ') {
|
170
|
+
$spec: "#{$spec},"
|
171
|
+
}
|
172
|
+
|
173
|
+
@return $pre-spec $spec;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Render Gradients
|
177
|
+
// Used for linear and radial gradients within background-image or border-image properties
|
178
|
+
|
179
|
+
@function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) {
|
180
|
+
$pre-spec: null;
|
181
|
+
$spec: null;
|
182
|
+
$vendor-gradients: null;
|
183
|
+
@if $gradient-type == linear {
|
184
|
+
@if $gradient-positions {
|
185
|
+
$pre-spec: nth($gradient-positions, 1);
|
186
|
+
$spec: nth($gradient-positions, 2);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
@else if $gradient-type == radial {
|
190
|
+
$pre-spec: nth($gradient-positions, 1);
|
191
|
+
$spec: nth($gradient-positions, 2);
|
192
|
+
}
|
193
|
+
|
194
|
+
@if $vendor {
|
195
|
+
$vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients);
|
196
|
+
}
|
197
|
+
@else if $vendor == false {
|
198
|
+
$vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})";
|
199
|
+
$vendor-gradients: unquote($vendor-gradients);
|
200
|
+
}
|
201
|
+
@return $vendor-gradients;
|
202
|
+
}
|
203
|
+
|
204
|
+
// Shape Size Stripper
|
205
|
+
@function _shape-size-stripper($shape-size) {
|
206
|
+
$shape-size-spec: null;
|
207
|
+
@each $value in $shape-size {
|
208
|
+
@if ($value == "cover") or ($value == "contain") {
|
209
|
+
$value: null;
|
210
|
+
}
|
211
|
+
$shape-size-spec: "#{$shape-size-spec} #{$value}";
|
212
|
+
}
|
213
|
+
@return $shape-size-spec;
|
214
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Convert Pixel to REM
|
3
|
+
//
|
4
|
+
// Credit: https://github.com/mariusz/remify
|
5
|
+
// ------------------------------------------------------------------- //
|
6
|
+
|
7
|
+
@function remify($px){
|
8
|
+
$base-rem-size: $base-font-size / 1rem;
|
9
|
+
|
10
|
+
// If value is 0, return 0
|
11
|
+
@if $px == 0 {
|
12
|
+
@return 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
@if type-of(px) == "number" {
|
16
|
+
|
17
|
+
@return $px / $base-rem-size;
|
18
|
+
|
19
|
+
} @else {
|
20
|
+
|
21
|
+
$rems: ();
|
22
|
+
|
23
|
+
@each $value in $px{
|
24
|
+
|
25
|
+
@if $value == 0{
|
26
|
+
$rems: append($rems, $value);
|
27
|
+
} @else {
|
28
|
+
$rems: append($rems, ($value / $base-rem-size));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
@return $rems;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
@mixin rem($property, $values){
|
37
|
+
#{$property}: $values;
|
38
|
+
#{$property}: remify($values);
|
39
|
+
}
|