uniform-ui 0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +38 -0
- data/LICENSE +22 -0
- data/README.md +36 -0
- data/Rakefile +38 -0
- data/index.html +479 -0
- data/lib/uniform/rails.rb +6 -0
- data/lib/uniform/rails/engine.rb +8 -0
- data/lib/uniform/ui.rb +1 -0
- data/preview.css +0 -0
- data/preview/index.html.erb +497 -0
- data/preview/preview.css +1 -0
- data/preview/preview.css.scss +3 -0
- data/preview/uniform.css +0 -0
- data/uniform.gemspec +27 -0
- data/vendor/assets/stylesheets/uniform.css.scss +6 -0
- data/vendor/assets/stylesheets/uniform/components/buttons.css.scss +130 -0
- data/vendor/assets/stylesheets/uniform/components/inputs.css.scss +82 -0
- data/vendor/assets/stylesheets/uniform/components/loaders.css.scss +149 -0
- data/vendor/assets/stylesheets/uniform/helpers.css.scss +31 -0
- data/vendor/assets/stylesheets/uniform/mixins.css.scss +78 -0
- data/vendor/assets/stylesheets/uniform/variables.css.scss +44 -0
- metadata +123 -0
data/preview/preview.css
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*{box-sizing:border-box}
|
data/preview/uniform.css
ADDED
File without changes
|
data/uniform.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "uniform-ui"
|
6
|
+
s.version = '0.5'
|
7
|
+
s.authors = ["Ben Ehmke"]
|
8
|
+
s.email = ["benehmke@gmail.com"]
|
9
|
+
s.homepage = "http://bemky.github.io/uniform/"
|
10
|
+
s.summary = %q{Sass UI}
|
11
|
+
s.description = %q{Sass compenents and defaults for building a UI that's on fleak.}
|
12
|
+
s.license = "MIT"
|
13
|
+
|
14
|
+
s.required_ruby_version = ">= 1.9.3"
|
15
|
+
s.required_rubygems_version = ">= 1.3.6"
|
16
|
+
|
17
|
+
# Developoment
|
18
|
+
s.add_development_dependency 'rake'
|
19
|
+
s.add_development_dependency 'bundler'
|
20
|
+
|
21
|
+
# Runtime
|
22
|
+
s.add_dependency 'bourbon'
|
23
|
+
s.add_dependency 'neat'
|
24
|
+
|
25
|
+
s.files = `git ls-files`.split("\n")
|
26
|
+
s.require_path = 'lib'
|
27
|
+
end
|
@@ -0,0 +1,130 @@
|
|
1
|
+
.btn{
|
2
|
+
@include appearance(none);
|
3
|
+
@include user-select(none);
|
4
|
+
@include linear-gradient(white, darken(white, 3));
|
5
|
+
border:1px solid darken(white, 15);
|
6
|
+
border-radius:3pt;
|
7
|
+
margin:0;
|
8
|
+
padding: 0.5em 1.5em;
|
9
|
+
|
10
|
+
cursor: pointer;
|
11
|
+
display: inline-block;
|
12
|
+
vertical-align: middle;
|
13
|
+
text-align: center;
|
14
|
+
|
15
|
+
color:$gray;
|
16
|
+
font-size:1em;
|
17
|
+
font-weight: normal;
|
18
|
+
white-space: nowrap;
|
19
|
+
|
20
|
+
.subtext{
|
21
|
+
display:block;
|
22
|
+
font-weight:300;
|
23
|
+
text-transform:none;
|
24
|
+
}
|
25
|
+
|
26
|
+
&:visited{
|
27
|
+
color:$gray;
|
28
|
+
}
|
29
|
+
|
30
|
+
&:hover, &.hover, &:focus{
|
31
|
+
outline:none;
|
32
|
+
color:$green-dark;
|
33
|
+
border-color:$green;
|
34
|
+
background-image:none !important;
|
35
|
+
}
|
36
|
+
&:active, &.active{
|
37
|
+
box-shadow:inset 0 1px 2px rgba(black, 0.2);
|
38
|
+
background-image:none !important;
|
39
|
+
outline: none;
|
40
|
+
}
|
41
|
+
&:disabled, &.disabled{
|
42
|
+
color:$gray;
|
43
|
+
background-image:none !important;
|
44
|
+
background:darken(white, 5);
|
45
|
+
}
|
46
|
+
//----------------------------------------------------------------
|
47
|
+
// styles
|
48
|
+
//----------------------------------------------------------------
|
49
|
+
|
50
|
+
&.outline{
|
51
|
+
background:none !important;
|
52
|
+
text-shadow:none !important;
|
53
|
+
}
|
54
|
+
&.circle{
|
55
|
+
border-radius:2em;
|
56
|
+
}
|
57
|
+
&.subtle,
|
58
|
+
&.small,
|
59
|
+
&.btn-xs{
|
60
|
+
padding: 0.05em 0.5em;
|
61
|
+
}
|
62
|
+
&.small,
|
63
|
+
&.btn-sm{
|
64
|
+
padding: 0.2em 1em;
|
65
|
+
font-size:0.9em;
|
66
|
+
}
|
67
|
+
&.large,
|
68
|
+
&.btn-lg{
|
69
|
+
padding: 1.2em 2.4em;
|
70
|
+
text-transform:uppercase;
|
71
|
+
letter-spacing:1px;
|
72
|
+
font-weight:bold;
|
73
|
+
.fortycon{
|
74
|
+
line-height:0.5em;
|
75
|
+
vertical-align:-6px;
|
76
|
+
font-size:2em;
|
77
|
+
margin-right:7px;
|
78
|
+
font-weight:normal;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
&.block,
|
82
|
+
&.btn-block{
|
83
|
+
padding-left:5px !important;
|
84
|
+
padding-right:5px !important;
|
85
|
+
display:block;
|
86
|
+
width:100%;
|
87
|
+
}
|
88
|
+
//----------------------------------------------------------------
|
89
|
+
// colors
|
90
|
+
//----------------------------------------------------------------
|
91
|
+
&.green,
|
92
|
+
&.btn-primary,
|
93
|
+
&.btn-success{
|
94
|
+
@include linear-gradient(lighten($green, 5), darken($green, 3));
|
95
|
+
border-color:darken($green, 5);
|
96
|
+
color:white;
|
97
|
+
text-shadow:0 -1px 0 rgba($green-dark, 0.5);
|
98
|
+
&.outline{
|
99
|
+
color:$green-dark;
|
100
|
+
}
|
101
|
+
&:hover, &.hover{
|
102
|
+
background:$green-dark;
|
103
|
+
border-color:darken($green-dark, 5);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
&.red,
|
107
|
+
&.btn-danger{
|
108
|
+
@include linear-gradient($red, darken($red, 3));
|
109
|
+
border-color:darken($red, 5);
|
110
|
+
color:white;
|
111
|
+
&.outline{
|
112
|
+
color:$red-dark;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
&.yellow,
|
116
|
+
&.btn-warning{
|
117
|
+
@include linear-gradient($yellow, darken($yellow, 3));
|
118
|
+
border-color:darken($yellow, 5);
|
119
|
+
color:black;
|
120
|
+
&.outline{
|
121
|
+
color:$yellow-dark;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
&.white{
|
125
|
+
&.outline{
|
126
|
+
color:white;
|
127
|
+
border-color:white;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
@mixin select-custom(){
|
2
|
+
display:inline-block;
|
3
|
+
border-radius: 2px;
|
4
|
+
border: 1px solid #bababa;
|
5
|
+
position:relative;
|
6
|
+
select{
|
7
|
+
position:relative;
|
8
|
+
z-index:1;
|
9
|
+
@include appearance(none);
|
10
|
+
outline: 1px;
|
11
|
+
cursor:pointer;
|
12
|
+
text-indent: 1px;
|
13
|
+
text-overflow: ellipsis;
|
14
|
+
font-family:$helvetica;
|
15
|
+
border:none;
|
16
|
+
margin:0;
|
17
|
+
padding: 0.3em 1em;
|
18
|
+
padding-right:2em;
|
19
|
+
background:none;
|
20
|
+
}
|
21
|
+
&:after{
|
22
|
+
color:$gray;
|
23
|
+
font-size:1.3em;
|
24
|
+
// TODO setup arrow icon
|
25
|
+
// font-family:$fortycons;
|
26
|
+
// content:$fortycon-arrow-down;
|
27
|
+
@include vertical-middle();
|
28
|
+
right:0.3em;
|
29
|
+
z-index:0;
|
30
|
+
}
|
31
|
+
&:focus{
|
32
|
+
color: #000;
|
33
|
+
box-shadow: 0 0 5px 1px $green-light;
|
34
|
+
border-color: $green-dark;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
//----------------------------------------------------------------
|
38
|
+
// inline-input
|
39
|
+
//----------------------------------------------------------------
|
40
|
+
.inline-input{
|
41
|
+
display:table;
|
42
|
+
background:white;
|
43
|
+
border:1px solid darken(white, 15);
|
44
|
+
border-top-color:darken(white, 20);
|
45
|
+
&>*{
|
46
|
+
display:table-cell;
|
47
|
+
vertical-align:middle;
|
48
|
+
}
|
49
|
+
input{
|
50
|
+
box-shadow: none;
|
51
|
+
border:none;
|
52
|
+
display:block;
|
53
|
+
}
|
54
|
+
select{
|
55
|
+
@include select-custom;
|
56
|
+
display:block;
|
57
|
+
border:none;
|
58
|
+
margin:0;
|
59
|
+
}
|
60
|
+
label{
|
61
|
+
margin:0;
|
62
|
+
padding:5px;
|
63
|
+
}
|
64
|
+
.label, .add-on, .units{
|
65
|
+
white-space:nowrap;
|
66
|
+
width:auto;
|
67
|
+
padding-left: 7px;
|
68
|
+
padding-right: 7px;
|
69
|
+
border-left:1px solid darken(white, 15);
|
70
|
+
background:darken(white, 5);
|
71
|
+
color:lighten(black, 50);
|
72
|
+
font-weight:300;
|
73
|
+
&.pre, &:first-child{
|
74
|
+
border-left:none;
|
75
|
+
border-right:1px solid darken(white, 15);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
&.active{
|
79
|
+
box-shadow: 0 0 3px 1px $green;
|
80
|
+
border-color:$green;
|
81
|
+
}
|
82
|
+
}
|
@@ -0,0 +1,149 @@
|
|
1
|
+
//----------------------------------------------------------------
|
2
|
+
// Dots
|
3
|
+
//----------------------------------------------------------------
|
4
|
+
.loader-dots{
|
5
|
+
font-size:2em;
|
6
|
+
line-height:1em;
|
7
|
+
display:inline-block;
|
8
|
+
.loader-dots-container{
|
9
|
+
letter-spacing:-.05em;
|
10
|
+
white-space:nowrap;
|
11
|
+
span{
|
12
|
+
color:rgba(white, 1);
|
13
|
+
text-shadow:-1px -1px 0 rgba(black, .2);
|
14
|
+
@include animation(loader-dots 1s infinite linear);
|
15
|
+
@include animation-delay(.2s);
|
16
|
+
}
|
17
|
+
span:first-of-type{
|
18
|
+
@include animation-delay(0);
|
19
|
+
}
|
20
|
+
span:last-of-type{
|
21
|
+
@include animation-delay(.4s);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
&.light{
|
25
|
+
.loader-dots-container{
|
26
|
+
span{
|
27
|
+
color:rgba(black, 1);
|
28
|
+
text-shadow:-1px -1px 0 rgba(white, .2);
|
29
|
+
@include animation(loader-dots-light 1s infinite linear);
|
30
|
+
@include animation-delay(.2s);
|
31
|
+
}
|
32
|
+
span:first-of-type{
|
33
|
+
@include animation-delay(0);
|
34
|
+
}
|
35
|
+
span:last-of-type{
|
36
|
+
@include animation-delay(.4s);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
@include keyframes (loader-dots) {
|
42
|
+
0%{ color:rgba(white, 0); }
|
43
|
+
25%{ color:rgba(white, 1); }
|
44
|
+
100%{ color:rgba(white, 1); }
|
45
|
+
}
|
46
|
+
@include keyframes (loader-dots-light) {
|
47
|
+
0%{ color:rgba(black, 1); }
|
48
|
+
25%{ color:rgba(black, 0.2); }
|
49
|
+
100%{ color:rgba(black, 0.2); }
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
//----------------------------------------------------------------
|
54
|
+
// Windows
|
55
|
+
//----------------------------------------------------------------
|
56
|
+
.loader-windows{
|
57
|
+
display:inline-block;
|
58
|
+
.loader-windows-container{
|
59
|
+
$size:5px;
|
60
|
+
$margin:3px;
|
61
|
+
$speed:.5s;
|
62
|
+
height:($size + $margin)*5;
|
63
|
+
width:($size + $margin)*4;
|
64
|
+
position:relative;
|
65
|
+
&>div{
|
66
|
+
width:$size;
|
67
|
+
height:$size;
|
68
|
+
background:rgba(white, 0.2);
|
69
|
+
position:absolute;
|
70
|
+
@include animation(loader-fade $speed infinite linear);
|
71
|
+
box-shadow: inset 1px 1px 1px rgba(black, .1)
|
72
|
+
}
|
73
|
+
&>[class*=a]{left:0;}
|
74
|
+
&>[class*=b]{left:$size+$margin;}
|
75
|
+
&>[class*=c]{left:$size*2+$margin*2;}
|
76
|
+
&>[class*=d]{left:$size*3+$margin*3;}
|
77
|
+
&>[class*="1"]{top:$size*4+$margin*4;}
|
78
|
+
&>[class*="2"]{top:$size*3+$margin*3;}
|
79
|
+
&>[class*="3"]{top:$size*2+$margin*2;}
|
80
|
+
&>[class*="4"]{top:$size+$margin;}
|
81
|
+
&>[class*="5"]{top:0;}
|
82
|
+
.a1{@include animation-delay($speed/4);}
|
83
|
+
.a2{@include animation-delay($speed/2);}
|
84
|
+
.a3{@include animation-delay($speed/4*3);}
|
85
|
+
.a4{@include animation-delay($speed);}
|
86
|
+
.b1{@include animation-delay($speed/3);}
|
87
|
+
.b2{@include animation-delay($speed/3*2);}
|
88
|
+
.b3{@include animation-delay($speed);}
|
89
|
+
.c1{@include animation-delay($speed/5);}
|
90
|
+
.c2{@include animation-delay($speed/5*2);}
|
91
|
+
.c3{@include animation-delay($speed/5*3);}
|
92
|
+
.c4{@include animation-delay($speed/5*4);}
|
93
|
+
.c5{@include animation-delay($speed);}
|
94
|
+
.d1{@include animation-delay($speed/2);}
|
95
|
+
.d2{@include animation-delay($speed);}
|
96
|
+
}
|
97
|
+
&.small{
|
98
|
+
.loader-windows-container{
|
99
|
+
$size:3px;
|
100
|
+
$margin:1px;
|
101
|
+
height:($size + $margin)*5;
|
102
|
+
width:($size + $margin)*4;
|
103
|
+
&>div{
|
104
|
+
width:$size;
|
105
|
+
height:$size;
|
106
|
+
}
|
107
|
+
&>[class*=a]{left:0;}
|
108
|
+
&>[class*=b]{left:$size+$margin;}
|
109
|
+
&>[class*=c]{left:$size*2+$margin*2;}
|
110
|
+
&>[class*=d]{left:$size*3+$margin*3;}
|
111
|
+
&>[class*="1"]{top:$size*4+$margin*4;}
|
112
|
+
&>[class*="2"]{top:$size*3+$margin*3;}
|
113
|
+
&>[class*="3"]{top:$size*2+$margin*2;}
|
114
|
+
&>[class*="4"]{top:$size+$margin;}
|
115
|
+
&>[class*="5"]{top:0;}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
@include keyframes (loader-fade) {
|
121
|
+
0%{ background:rgba($green, 1); }
|
122
|
+
100%{ background:rgba(white, 0.2); }
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
//----------------------------------------------------------------
|
127
|
+
// Cover Option
|
128
|
+
//----------------------------------------------------------------
|
129
|
+
.loader-windows,
|
130
|
+
.loader-dots{
|
131
|
+
&.cover{
|
132
|
+
display:block;
|
133
|
+
position:absolute;
|
134
|
+
top:0;
|
135
|
+
left:0;
|
136
|
+
width:100%;
|
137
|
+
height:100%;
|
138
|
+
z-index:999;
|
139
|
+
background:rgba(black, .5);
|
140
|
+
.loader-dots-container,
|
141
|
+
.loader-windows-container{
|
142
|
+
@include align-middle;
|
143
|
+
position:absolute;
|
144
|
+
}
|
145
|
+
&.light{
|
146
|
+
background:rgba(white, 0.5);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
.text-overflow{
|
2
|
+
@include text-overflow;
|
3
|
+
}
|
4
|
+
.strong,
|
5
|
+
strong{
|
6
|
+
font-weight: 700;
|
7
|
+
}
|
8
|
+
.hide{
|
9
|
+
display:none;
|
10
|
+
}
|
11
|
+
.center{
|
12
|
+
text-align: center;
|
13
|
+
}
|
14
|
+
.clear{
|
15
|
+
clear:both;
|
16
|
+
}
|
17
|
+
.bleed-fix{
|
18
|
+
position:static;
|
19
|
+
overflow:hidden;
|
20
|
+
}
|
21
|
+
.handle{
|
22
|
+
cursor: pointer;
|
23
|
+
cursor: hand;
|
24
|
+
}
|
25
|
+
.right{
|
26
|
+
float:right;
|
27
|
+
}
|
28
|
+
.no-gutter{
|
29
|
+
padding-left:0;
|
30
|
+
padding-right:0;
|
31
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
//----------------------------------------------------------------
|
2
|
+
// Image Filters
|
3
|
+
//----------------------------------------------------------------
|
4
|
+
@mixin opacity($o: 1){
|
5
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity="+$o*100+")";
|
6
|
+
filter: alpha(opacity=$o*100);
|
7
|
+
-moz-opacity: $o;
|
8
|
+
-khtml-opacity: $o;
|
9
|
+
opacity: $o;
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin blur($amount: 5px){
|
13
|
+
filter: blur($amount);
|
14
|
+
-webkit-filter: blur($amount);
|
15
|
+
-moz-filter: blur($amount);
|
16
|
+
-o-filter: blur($amount);
|
17
|
+
-ms-filter: blur($amount);
|
18
|
+
}
|
19
|
+
|
20
|
+
@mixin grayscale($gray: 0.7, $opacity: 1){
|
21
|
+
opacity: $opacity;
|
22
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(grayscale=$gray)";
|
23
|
+
filter:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cfilter%20id%3D%22desaturate%22%3E%3CfeColorMatrix%20type%3D%22saturate%22%20values%3D%220%22/%3E%3C/filter%3E%3C/svg%3E#desaturate);
|
24
|
+
filter: gray($gray);
|
25
|
+
-webkit-filter: grayscale($gray * 100%);
|
26
|
+
@if $gray == 0 {
|
27
|
+
filter: none;
|
28
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(grayscale=0)";
|
29
|
+
-webkit-filter: grayscale(0);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
//----------------------------------------------------------------
|
34
|
+
// Text
|
35
|
+
//----------------------------------------------------------------
|
36
|
+
@mixin text-overflow($inherit:false){
|
37
|
+
@if $inherit == false {
|
38
|
+
text-overflow: ellipsis;
|
39
|
+
white-space: nowrap;
|
40
|
+
overflow: hidden;
|
41
|
+
} @else {
|
42
|
+
text-overflow: inherit;
|
43
|
+
white-space: inherit;
|
44
|
+
overflow: inherit;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
@mixin flicker-fix(){
|
48
|
+
-webkit-backface-visibility: hidden; // Some weird safari bug involving hovering on li or a
|
49
|
+
-webkit-transform: translate3d(0, 0, 0); // Some weird safari bug involving hovering on li or a
|
50
|
+
}
|
51
|
+
|
52
|
+
@mixin clean-icon(){
|
53
|
+
@include flicker-fix();
|
54
|
+
-webkit-font-smoothing: antialiased;
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
//----------------------------------------------------------------
|
59
|
+
// Position Alignment
|
60
|
+
//----------------------------------------------------------------
|
61
|
+
@mixin vertical-middle(){
|
62
|
+
position:absolute;
|
63
|
+
top:50%;
|
64
|
+
@include transform(translateY(-50%));
|
65
|
+
}
|
66
|
+
|
67
|
+
@mixin horizontal-center(){
|
68
|
+
position:absolute;
|
69
|
+
left:50%;
|
70
|
+
@include transform(translateX(-50%));
|
71
|
+
}
|
72
|
+
|
73
|
+
@mixin align-middle(){
|
74
|
+
position:absolute;
|
75
|
+
left:50%;
|
76
|
+
top:50%;
|
77
|
+
@include transform(translate(-50%, -50%));
|
78
|
+
}
|