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
@@ -1,8 +1,7 @@
|
|
1
1
|
// ------------------------------------------------------------------- //
|
2
|
-
//
|
2
|
+
// Strip Units from a value
|
3
3
|
// ------------------------------------------------------------------- //
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
filter: alpha(opacity=50);
|
5
|
+
@function strip-units($value){
|
6
|
+
@return $value / ($value * 0 + 1)
|
8
7
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Tint & Shade (from Bourbon)
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
@function tint($color, $percent){
|
6
|
+
@return mix(white, $color, $percent);
|
7
|
+
}
|
8
|
+
|
9
|
+
// Add percentage of black to a color
|
10
|
+
@function shade($color, $percent){
|
11
|
+
@return mix(black, $color, $percent);
|
12
|
+
}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Grid Settings
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
$max-width: 960px !default;
|
6
|
+
$grid-columns: 12 !default;
|
7
|
+
$grid-gutter: 15px !default;
|
8
|
+
$column: $max-width / $grid-columns !default;
|
9
|
+
|
10
|
+
// ------------------------------------------------------------------- //
|
11
|
+
// Set Container
|
12
|
+
// ------------------------------------------------------------------- //
|
13
|
+
|
14
|
+
@mixin outer-container {
|
15
|
+
max-width: $max-width;
|
16
|
+
width: 100%;
|
17
|
+
margin: 0 auto;
|
18
|
+
}
|
19
|
+
|
20
|
+
// ------------------------------------------------------------------- //
|
21
|
+
// Set Rows
|
22
|
+
// ------------------------------------------------------------------- //
|
23
|
+
|
24
|
+
@mixin row($items){
|
25
|
+
display: block;
|
26
|
+
@include clearfix;
|
27
|
+
|
28
|
+
& > *{
|
29
|
+
padding: 0 $grid-gutter;
|
30
|
+
}
|
31
|
+
|
32
|
+
& > *:nth-child(#{$items}n+1){
|
33
|
+
padding-left: 0;
|
34
|
+
padding-right: ($grid-gutter * 2);
|
35
|
+
}
|
36
|
+
& > *:nth-child(#{$items}n+2){
|
37
|
+
padding-left: 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
& > *:nth-child(#{$items}n-1){
|
41
|
+
padding-right: 0;
|
42
|
+
}
|
43
|
+
& > *:nth-child(#{$items}n){
|
44
|
+
padding-left: ($grid-gutter * 2);
|
45
|
+
padding-right: 0;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
// ------------------------------------------------------------------- //
|
50
|
+
// Set Widths
|
51
|
+
// ------------------------------------------------------------------- //
|
52
|
+
|
53
|
+
@mixin span-columns($col-size, $flow: left) {
|
54
|
+
|
55
|
+
$col-width: percentage($col-size / $grid-columns);
|
56
|
+
|
57
|
+
@if $col-size > $grid-columns {
|
58
|
+
@warn "Column size should not be greater than max-columns (#{$grid-columns}).";
|
59
|
+
}
|
60
|
+
|
61
|
+
@else {
|
62
|
+
float: left;
|
63
|
+
width: $col-width;
|
64
|
+
padding: 0 $grid-gutter;
|
65
|
+
|
66
|
+
@if $flow == "right"{
|
67
|
+
float: right;
|
68
|
+
}
|
69
|
+
|
70
|
+
@else if $flow == "center" {
|
71
|
+
float: none;
|
72
|
+
margin: 0 auto;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
// ------------------------------------------------------------------- //
|
78
|
+
// Shift
|
79
|
+
// ------------------------------------------------------------------- //
|
80
|
+
|
81
|
+
@mixin shift($col-shift) {
|
82
|
+
$shift: percentage($col-shift / 12);
|
83
|
+
|
84
|
+
@if $col-shift > 12 {
|
85
|
+
@warn "Should not shift greater than max-columns (12).";
|
86
|
+
}
|
87
|
+
|
88
|
+
@else {
|
89
|
+
margin-left: $shift;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
// ------------------------------------------------------------------- //
|
94
|
+
// Hug
|
95
|
+
// ------------------------------------------------------------------- //
|
96
|
+
|
97
|
+
@mixin hug($direction){
|
98
|
+
|
99
|
+
@if $direction == "left" {
|
100
|
+
padding-left: 0;
|
101
|
+
}
|
102
|
+
|
103
|
+
@else if $direction == "right" {
|
104
|
+
padding-right: 0;
|
105
|
+
}
|
106
|
+
|
107
|
+
@else if $direction == "both" {
|
108
|
+
padding: 0;
|
109
|
+
}
|
110
|
+
|
111
|
+
@else {
|
112
|
+
@warn "Hug requires 'left', 'right', or 'both'. Please choose a valid direction.";
|
113
|
+
}
|
114
|
+
}
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// For chunky looking fonts (FF/Webkit)
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
%antialised{
|
6
|
+
-webkit-font-smoothing: antialiased;
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
8
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Border Mixin
|
3
|
+
//
|
4
|
+
// For use in instances where multiple border-widths are required
|
5
|
+
// ------------------------------------------------------------------- //
|
6
|
+
|
7
|
+
@mixin border($border-width, $border-style: solid, $border-color: black) {
|
8
|
+
// if too many widths, throw error
|
9
|
+
@if (length($border-width) > 4) {
|
10
|
+
@warn "Border-width accepts a maximum of 4 width parameters; #{length($border-width)} found.";
|
11
|
+
}
|
12
|
+
|
13
|
+
// New border width list
|
14
|
+
$new-width: ();
|
15
|
+
|
16
|
+
// Populate it
|
17
|
+
@for $i from 1 through length($border-width) {
|
18
|
+
|
19
|
+
// If border is unitless, append unit
|
20
|
+
@if unitless(nth($border-width, $i)) {
|
21
|
+
$new-width: append($new-width, nth($border-width, $i) + px);
|
22
|
+
}
|
23
|
+
|
24
|
+
// Otherwise, keep as is
|
25
|
+
@else {
|
26
|
+
$new-width: append($new-width, nth($border-width, $i));
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
border: $border-style $border-color;
|
31
|
+
border-width: $new-width;
|
32
|
+
}
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Clearfix
|
3
|
+
//
|
4
|
+
// Source:
|
5
|
+
// css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
|
6
|
+
// ------------------------------------------------------------------- //
|
7
|
+
|
8
|
+
@mixin clearfix{
|
9
|
+
&:after {
|
10
|
+
content:"";
|
11
|
+
display:table;
|
12
|
+
clear:both;
|
13
|
+
}
|
14
|
+
}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
// ------------------------------------------------------------------- //
|
2
|
-
//
|
2
|
+
// Quickly generate rem font-size w/ px fallback and line-height
|
3
3
|
// ------------------------------------------------------------------- //
|
4
4
|
|
5
5
|
@mixin font-size($font-size, $line-height: true){
|
6
|
-
font-size: $font-size;
|
7
|
-
|
8
|
-
|
9
|
-
@if $line-height == true{
|
6
|
+
font-size: remify($font-size);
|
7
|
+
|
8
|
+
@if $line-height == true {
|
10
9
|
line-height: ceil($font-size / $base-line-height) * ($base-line-height / $font-size);
|
11
10
|
}
|
12
11
|
}
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Quickly target H# - H#
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
@mixin headings($from: 1, $to: 6){
|
6
|
+
@for $i from $from through $to{
|
7
|
+
h#{$i}{
|
8
|
+
@content
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Image Replacement - Hide Text
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
@mixin hide-text{
|
6
|
+
color: transparent;
|
7
|
+
font: 0/0 a;
|
8
|
+
text-shadow: none;
|
9
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// All-encompasing HTML5 Input Types
|
3
|
+
//
|
4
|
+
// From Bourbon.io
|
5
|
+
// ------------------------------------------------------------------- //
|
6
|
+
|
7
|
+
$inputs-list:
|
8
|
+
'input[type="email"]',
|
9
|
+
'input[type="number"]',
|
10
|
+
'input[type="password"]',
|
11
|
+
'input[type="search"]',
|
12
|
+
'input[type="tel"]',
|
13
|
+
'input[type="text"]',
|
14
|
+
'input[type="url"]',
|
15
|
+
|
16
|
+
// Webkit / Gecko specific
|
17
|
+
'input[type="color"]',
|
18
|
+
'input[type="date"]',
|
19
|
+
'input[type="datetime"]',
|
20
|
+
'input[type="datetime-local"]',
|
21
|
+
'input[type="month"]',
|
22
|
+
'input[type="time"]',
|
23
|
+
'input[type="week"]';
|
24
|
+
|
25
|
+
$unquoted-inputs-list: ();
|
26
|
+
@each $input-type in $inputs-list{
|
27
|
+
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global;
|
28
|
+
}
|
29
|
+
|
30
|
+
$all-text-inputs: $unquoted-inputs-list;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Gradient Mixin from Bourbon
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
@mixin linear-gradient($pos, $G1, $G2: null,
|
6
|
+
$G3: null, $G4: null,
|
7
|
+
$G5: null, $G6: null,
|
8
|
+
$G7: null, $G8: null,
|
9
|
+
$G9: null, $G10: null,
|
10
|
+
$fallback: null) {
|
11
|
+
// Detect what type of value exists in $pos
|
12
|
+
$pos-type: type-of(nth($pos, 1));
|
13
|
+
$pos-spec: null;
|
14
|
+
$pos-degree: null;
|
15
|
+
|
16
|
+
// If $pos is missing from mixin, reassign vars and add default position
|
17
|
+
@if ($pos-type == color) or (nth($pos, 1) == "transparent") {
|
18
|
+
$G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5;
|
19
|
+
$G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos;
|
20
|
+
$pos: null;
|
21
|
+
}
|
22
|
+
|
23
|
+
@if $pos {
|
24
|
+
$positions: _linear-positions-parser($pos);
|
25
|
+
$pos-degree: nth($positions, 1);
|
26
|
+
$pos-spec: nth($positions, 2);
|
27
|
+
}
|
28
|
+
|
29
|
+
$full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;
|
30
|
+
|
31
|
+
// Set $G1 as the default fallback color
|
32
|
+
$fallback-color: nth($G1, 1);
|
33
|
+
|
34
|
+
// If $fallback is a color use that color as the fallback color
|
35
|
+
@if (type-of($fallback) == color) or ($fallback == "transparent") {
|
36
|
+
$fallback-color: $fallback;
|
37
|
+
}
|
38
|
+
|
39
|
+
background-color: $fallback-color;
|
40
|
+
background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome
|
41
|
+
background-image: unquote("linear-gradient(#{$pos-spec}#{$full})");
|
42
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Muted
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
@mixin muted($mute-amt){
|
6
|
+
|
7
|
+
@if $mute-amt > 1{
|
8
|
+
@warn "Mute amount should be in decimal format (.1, .2, .etc)";
|
9
|
+
}
|
10
|
+
|
11
|
+
@else {
|
12
|
+
opacity: $mute-amt;
|
13
|
+
filter: alpha(opacity=($mute-amt * 100));
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Basic Positioning (Type + T/L/B/R Values)
|
3
|
+
//
|
4
|
+
// @include position(absolute, 10px 0 0 10px);
|
5
|
+
// ------------------------------------------------------------------- //
|
6
|
+
|
7
|
+
@mixin position($pos-type: relative, $pos-vals: 0 0 0 0) {
|
8
|
+
|
9
|
+
// If no position type designated, default to "relative"
|
10
|
+
@if type-of($pos-type) == list{
|
11
|
+
$pos-vals: $pos-type;
|
12
|
+
$pos-type: relative;
|
13
|
+
}
|
14
|
+
|
15
|
+
// Separate values into top, right, bottom, left
|
16
|
+
$top: nth($pos-vals, 1);
|
17
|
+
$right: nth($pos-vals, 2);
|
18
|
+
$bottom: nth($pos-vals, 3);
|
19
|
+
$left: nth($pos-vals, 4);
|
20
|
+
|
21
|
+
// Return position
|
22
|
+
position: $pos-type;
|
23
|
+
|
24
|
+
// Return values
|
25
|
+
// If value is a number and has a unit type, print value
|
26
|
+
// otherwise ignore
|
27
|
+
@if (type-of($top) == number and not unitless($top)){
|
28
|
+
top: $top;
|
29
|
+
}
|
30
|
+
|
31
|
+
@if (type-of($right) == number and not unitless($right)){
|
32
|
+
right: $right;
|
33
|
+
}
|
34
|
+
|
35
|
+
@if (type-of($bottom) == number and not unitless($bottom)){
|
36
|
+
bottom: $bottom;
|
37
|
+
}
|
38
|
+
|
39
|
+
@if (type-of($left) == number and not unitless($left)){
|
40
|
+
left: $left;
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Browser prefixing
|
3
|
+
//
|
4
|
+
// @include prefixer(border-radius, 5px, webkit ms spec);
|
5
|
+
// ------------------------------------------------------------------- //
|
6
|
+
|
7
|
+
$prefix-webkit: true !default;
|
8
|
+
$prefix-mozilla: true !default;
|
9
|
+
$prefix-ms: true !default;
|
10
|
+
$prefix-opera: true !default;
|
11
|
+
$prefix-spec: true !default;
|
12
|
+
|
13
|
+
@mixin prefixer($propery, $value, $prefixes){
|
14
|
+
@each $prefix in $prefixes{
|
15
|
+
@if $prefix == webkit{
|
16
|
+
-webkit-#{property}: $value;
|
17
|
+
}
|
18
|
+
@else if $prefix == moz{
|
19
|
+
-moz-#{property}: $value;
|
20
|
+
}
|
21
|
+
@else if $prefix == ms{
|
22
|
+
-ms-#{property}: $value;
|
23
|
+
}
|
24
|
+
@else if $prefix == o{
|
25
|
+
-o-#{property}: $value;
|
26
|
+
}
|
27
|
+
@else if $prefix == spec{
|
28
|
+
#{property}: $value;
|
29
|
+
}
|
30
|
+
@else{
|
31
|
+
@warn "Unrecognized prefix: #{$prefix}";
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// ------------------------------------------------------------------- //
|
2
|
+
// Radial Gradient
|
3
|
+
// ------------------------------------------------------------------- //
|
4
|
+
|
5
|
+
@function radial-gradient($G1, $G2,
|
6
|
+
$G3: null, $G4: null,
|
7
|
+
$G5: null, $G6: null,
|
8
|
+
$G7: null, $G8: null,
|
9
|
+
$G9: null, $G10: null,
|
10
|
+
$pos: null,
|
11
|
+
$shape-size: null) {
|
12
|
+
|
13
|
+
$data: _radial-arg-parser($G1, $G2, $pos, $shape-size);
|
14
|
+
$G1: nth($data, 1);
|
15
|
+
$G2: nth($data, 2);
|
16
|
+
$pos: nth($data, 3);
|
17
|
+
$shape-size: nth($data, 4);
|
18
|
+
|
19
|
+
$type: radial;
|
20
|
+
$gradient: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;
|
21
|
+
|
22
|
+
$type-gradient: $type, $shape-size $pos, $gradient;
|
23
|
+
@return $type-gradient;
|
24
|
+
}
|