aesthetics-rails 0.1.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/README.md +35 -0
- data/Rakefile +2 -0
- data/aesthetics-rails.gemspec +25 -0
- data/assets/stylesheets/_mixins.scss +65 -0
- data/assets/stylesheets/_normalize.scss +394 -0
- data/assets/stylesheets/aesthetics.scss +46 -0
- data/assets/stylesheets/components/_buttons.scss +182 -0
- data/assets/stylesheets/components/_container.scss +47 -0
- data/assets/stylesheets/components/_forms.scss +58 -0
- data/assets/stylesheets/components/_global.scss +43 -0
- data/assets/stylesheets/components/_navbar.scss +29 -0
- data/assets/stylesheets/components/_utilities.scss +159 -0
- data/assets/stylesheets/settings/_colors.scss +28 -0
- data/assets/stylesheets/settings/_devices.scss +91 -0
- data/assets/stylesheets/settings/_type.scss +38 -0
- data/assets/stylesheets/settings/_z-index.scss +60 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/aesthetics/rails.rb +40 -0
- data/lib/aesthetics/rails/version.rb +5 -0
- metadata +108 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
//==================================================
|
2
|
+
// Aesthetics Framework
|
3
|
+
//
|
4
|
+
// Copyright 2015 Duane Adam
|
5
|
+
//
|
6
|
+
// Index
|
7
|
+
// -----
|
8
|
+
// 1) Mixins
|
9
|
+
// 2) Reset
|
10
|
+
// 3) Global Styles
|
11
|
+
// 4) Settings
|
12
|
+
// 5) Components
|
13
|
+
//==================================================
|
14
|
+
|
15
|
+
|
16
|
+
//=========================
|
17
|
+
// 1) Mixins
|
18
|
+
//=========================
|
19
|
+
@import "mixins";
|
20
|
+
|
21
|
+
//=========================
|
22
|
+
// 2) Reset
|
23
|
+
//=========================
|
24
|
+
@import "normalize";
|
25
|
+
|
26
|
+
//=========================
|
27
|
+
// 3) Settings
|
28
|
+
//=========================
|
29
|
+
@import "settings/colors";
|
30
|
+
@import "settings/devices";
|
31
|
+
@import "settings/type";
|
32
|
+
@import "settings/z-index";
|
33
|
+
|
34
|
+
//=========================
|
35
|
+
// 4) Global Styles
|
36
|
+
//=========================
|
37
|
+
@import "components/global";
|
38
|
+
|
39
|
+
//=========================
|
40
|
+
// 5) Components
|
41
|
+
//=========================
|
42
|
+
@import "components/buttons";
|
43
|
+
@import "components/container";
|
44
|
+
@import "components/forms";
|
45
|
+
@import "components/navbar";
|
46
|
+
@import "components/utilities";
|
@@ -0,0 +1,182 @@
|
|
1
|
+
//==================================================
|
2
|
+
// Buttons.scss
|
3
|
+
//
|
4
|
+
// Index
|
5
|
+
// -----
|
6
|
+
// 1) Base Class & Element
|
7
|
+
// 2) Buttons Modes
|
8
|
+
// 3) Button Themes
|
9
|
+
// 4) Button Shapes
|
10
|
+
// 5) Button Sizes
|
11
|
+
//==================================================
|
12
|
+
|
13
|
+
|
14
|
+
//=========================
|
15
|
+
// 1) Base Class & Element
|
16
|
+
//=========================
|
17
|
+
button,
|
18
|
+
.btn {
|
19
|
+
display: inline-block;
|
20
|
+
height: auto;
|
21
|
+
margin: 0;
|
22
|
+
padding: 6px 12px;
|
23
|
+
border-radius: 6px;
|
24
|
+
font-size: inherit;
|
25
|
+
font-weight: normal;
|
26
|
+
line-height: 1.42857143;
|
27
|
+
text-align: center;
|
28
|
+
text-decoration: none;
|
29
|
+
vertical-align: middle;
|
30
|
+
cursor: pointer;
|
31
|
+
-webkit-appearance: none;
|
32
|
+
box-shadow: 0 2px 0 #c6c6c6;
|
33
|
+
-webkit-transition: border 0.3s linear,color 0.3s linear,background-color 0.3s linear;
|
34
|
+
transition: border 0.3s linear,color 0.3s linear,background-color 0.3s linear;
|
35
|
+
-webkit-font-smoothing: subpixel-antialiased;
|
36
|
+
}
|
37
|
+
|
38
|
+
button:after,
|
39
|
+
button:before,
|
40
|
+
.btn:after,
|
41
|
+
.btn:before {
|
42
|
+
box-sizing: border-box;
|
43
|
+
}
|
44
|
+
|
45
|
+
::-moz-focus-inner {
|
46
|
+
border: 0;
|
47
|
+
padding: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
button:hover, .btn:hover { text-decoration: none }
|
51
|
+
|
52
|
+
//=======================
|
53
|
+
// 2) Button Modes
|
54
|
+
//=======================
|
55
|
+
.btn.is-disabled {
|
56
|
+
color: #fff;
|
57
|
+
background-color: #999999;
|
58
|
+
}
|
59
|
+
.btn.is-disabled:hover {
|
60
|
+
background-color: #737373;
|
61
|
+
}
|
62
|
+
.btn.is-disabled:active {
|
63
|
+
background-color: #474747;
|
64
|
+
}
|
65
|
+
|
66
|
+
.btn.is-fixed {
|
67
|
+
position: fixed;
|
68
|
+
}
|
69
|
+
|
70
|
+
//=========================
|
71
|
+
// 3) Button Themes
|
72
|
+
//=========================
|
73
|
+
|
74
|
+
//=======================
|
75
|
+
// Primary Theme
|
76
|
+
//=======================
|
77
|
+
.btn--primary {
|
78
|
+
color: #fff;
|
79
|
+
background-color: $color-primary;
|
80
|
+
}
|
81
|
+
.btn--primary:hover {
|
82
|
+
background-color: lighten($color-primary, 6%);
|
83
|
+
}
|
84
|
+
.btn--primary:active {
|
85
|
+
background-color: darken($color-primary, 8%);
|
86
|
+
}
|
87
|
+
|
88
|
+
//=======================
|
89
|
+
// General Themes
|
90
|
+
//=======================
|
91
|
+
.btn--success {
|
92
|
+
color: #fff;
|
93
|
+
background-color: $color-success;
|
94
|
+
}
|
95
|
+
.btn--success:hover {
|
96
|
+
background-color: lighten($color-success, 6%);
|
97
|
+
}
|
98
|
+
.btn--success:active {
|
99
|
+
background-color: darken($color-success, 8%);
|
100
|
+
}
|
101
|
+
|
102
|
+
.btn--warning {
|
103
|
+
color: #fff;
|
104
|
+
background-color: $color-warning;
|
105
|
+
}
|
106
|
+
.btn--warning:hover {
|
107
|
+
background-color: lighten($color-warning, 6%);
|
108
|
+
}
|
109
|
+
.btn--warning:active {
|
110
|
+
background-color: darken($color-warning, 8%);
|
111
|
+
}
|
112
|
+
|
113
|
+
.btn--danger {
|
114
|
+
color: #fff;
|
115
|
+
background-color: $color-danger;
|
116
|
+
}
|
117
|
+
.btn--danger:hover {
|
118
|
+
background-color: lighten($color-danger, 6%);
|
119
|
+
}
|
120
|
+
.btn--danger:active {
|
121
|
+
background-color: darken($color-danger, 8%);
|
122
|
+
}
|
123
|
+
|
124
|
+
.btn--info {
|
125
|
+
color: #fff;
|
126
|
+
background-color: $color-info;
|
127
|
+
}
|
128
|
+
.btn--info:hover {
|
129
|
+
background-color: lighten($color-info, 6%);
|
130
|
+
}
|
131
|
+
.btn--info:active {
|
132
|
+
background-color: darken($color-info, 8%);
|
133
|
+
}
|
134
|
+
|
135
|
+
//=========================
|
136
|
+
// 4) Button Shapes
|
137
|
+
//=========================
|
138
|
+
.btn--square { border-radius: 0 !important; }
|
139
|
+
|
140
|
+
.btn--circle { border-radius: 100% !important; }
|
141
|
+
|
142
|
+
//=========================
|
143
|
+
// 5) Button Sizes
|
144
|
+
//=========================
|
145
|
+
.btn--fill {
|
146
|
+
display: block;
|
147
|
+
width: 100%;
|
148
|
+
}
|
149
|
+
|
150
|
+
.btn--lg {
|
151
|
+
padding: 10px 16px;
|
152
|
+
font-size: 18px;
|
153
|
+
line-height: 1.3333333;
|
154
|
+
border-radius: 6px;
|
155
|
+
}
|
156
|
+
|
157
|
+
.btn--lg.btn--square,
|
158
|
+
.btn--lg.btn--circle {
|
159
|
+
width: 90px;
|
160
|
+
height: 90px;
|
161
|
+
line-height: 70px;
|
162
|
+
}
|
163
|
+
|
164
|
+
.btn--square,
|
165
|
+
.btn--circle {
|
166
|
+
width: 66px;
|
167
|
+
height: 66px;
|
168
|
+
line-height: 54px;
|
169
|
+
}
|
170
|
+
|
171
|
+
.btn--sm {
|
172
|
+
padding: 5px 10px;
|
173
|
+
font-size: 12px;
|
174
|
+
line-height: 1.5;
|
175
|
+
border-radius: 3px;
|
176
|
+
}
|
177
|
+
.btn--sm.btn--square,
|
178
|
+
.btn--sm.btn--circle {
|
179
|
+
width: 44px;
|
180
|
+
height: 44px;
|
181
|
+
line-height: 34px;
|
182
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
//==================================================
|
2
|
+
// Container.scss
|
3
|
+
//
|
4
|
+
// Index
|
5
|
+
// -----
|
6
|
+
// 1) Base Container Class
|
7
|
+
// 2) Container Modifiers
|
8
|
+
//==================================================
|
9
|
+
|
10
|
+
|
11
|
+
//=========================
|
12
|
+
// 1) Base Container Class
|
13
|
+
//=========================
|
14
|
+
.container {
|
15
|
+
margin-right: auto;
|
16
|
+
margin-left: auto;
|
17
|
+
padding-left: 1.25em; // 20px
|
18
|
+
padding-right: 1.25em; // 20px
|
19
|
+
@include bp-medium-up {
|
20
|
+
padding-left: 2.5em; // 40px
|
21
|
+
padding-right: 2.5em; // 40px
|
22
|
+
}
|
23
|
+
@include bp-large-up {
|
24
|
+
padding-left: 3.75em; //60px
|
25
|
+
padding-right: 3.75em; //60px
|
26
|
+
}
|
27
|
+
@include bp-xlarge-up {
|
28
|
+
padding-left: 5em; //80px
|
29
|
+
padding-right: 5em; //80px
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
//=========================
|
34
|
+
// 2) Container Modifiers
|
35
|
+
//=========================
|
36
|
+
.container.container--fluid {
|
37
|
+
padding-right: 1.25em; // 20px;
|
38
|
+
padding-left: 1.25em; // 20px;
|
39
|
+
}
|
40
|
+
|
41
|
+
.container--fixed1024 {
|
42
|
+
width: 1024px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.container--fixed1440 {
|
46
|
+
max-width: 1440px;
|
47
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
//==================================================
|
2
|
+
// Taken from Basscss' Forms
|
3
|
+
// Source: http://www.basscss.com/docs/base-forms/
|
4
|
+
//==================================================
|
5
|
+
input,
|
6
|
+
select,
|
7
|
+
textarea,
|
8
|
+
fieldset {
|
9
|
+
font-size: 1rem;
|
10
|
+
margin-top: 0;
|
11
|
+
margin-bottom: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
input[type=text],
|
15
|
+
input[type=datetime],
|
16
|
+
input[type=datetime-local],
|
17
|
+
input[type=email],
|
18
|
+
input[type=month],
|
19
|
+
input[type=number],
|
20
|
+
input[type=password],
|
21
|
+
input[type=search],
|
22
|
+
input[type=tel],
|
23
|
+
input[type=time],
|
24
|
+
input[type=url],
|
25
|
+
input[type=week] {
|
26
|
+
box-sizing: border-box;
|
27
|
+
height: 2.25rem;
|
28
|
+
padding: .5rem .5rem;
|
29
|
+
vertical-align: middle;
|
30
|
+
-webkit-appearance: none;
|
31
|
+
}
|
32
|
+
|
33
|
+
select {
|
34
|
+
box-sizing: border-box;
|
35
|
+
line-height: 1.75;
|
36
|
+
padding: .5rem .5rem;
|
37
|
+
}
|
38
|
+
|
39
|
+
select:not([multiple]) {
|
40
|
+
height: 2.25rem;
|
41
|
+
vertical-align: middle;
|
42
|
+
}
|
43
|
+
|
44
|
+
textarea {
|
45
|
+
box-sizing: border-box;
|
46
|
+
line-height: 1.75;
|
47
|
+
padding: .5rem .5rem;
|
48
|
+
}
|
49
|
+
|
50
|
+
.fieldset-reset {
|
51
|
+
padding: 0;
|
52
|
+
margin-left: 0;
|
53
|
+
margin-right: 0;
|
54
|
+
border: 0;
|
55
|
+
}
|
56
|
+
.fieldset-reset legend {
|
57
|
+
padding: 0;
|
58
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
*,
|
2
|
+
*:before,
|
3
|
+
*:after {
|
4
|
+
-webkit-box-sizing: border-box;
|
5
|
+
-moz-box-sizing: border-box;
|
6
|
+
box-sizing: border-box;
|
7
|
+
}
|
8
|
+
|
9
|
+
html,
|
10
|
+
body {
|
11
|
+
font-size: 100%;
|
12
|
+
}
|
13
|
+
|
14
|
+
body {
|
15
|
+
position: relative;
|
16
|
+
background: #fff;
|
17
|
+
color: #222;
|
18
|
+
font-family: $type-helvetica;
|
19
|
+
font-weight: normal;
|
20
|
+
line-height: $type-baseLineHeight
|
21
|
+
}
|
22
|
+
|
23
|
+
a { text-decoration: none; }
|
24
|
+
a:hover { cursor: pointer; }
|
25
|
+
|
26
|
+
h1,
|
27
|
+
h2,
|
28
|
+
h3,
|
29
|
+
h4,
|
30
|
+
h5,
|
31
|
+
h6 {
|
32
|
+
margin-top: 0.2rem;
|
33
|
+
margin-bottom: 0.5rem;
|
34
|
+
font-family: $type-lato;
|
35
|
+
line-height: $type-headingLineHeight;
|
36
|
+
}
|
37
|
+
|
38
|
+
h1, .h1 { font-size: $type-h1FontSize }
|
39
|
+
h2, .h2 { font-size: $type-h2FontSize }
|
40
|
+
h3, .h3 { font-size: $type-h3FontSize }
|
41
|
+
h4, .h4 { font-size: $type-h4FontSize }
|
42
|
+
h5, .h5 { font-size: $type-h5FontSize }
|
43
|
+
h6, .h6 { font-size: $type-h6FontSize }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
//==================================================
|
2
|
+
// Navbar.scss
|
3
|
+
//
|
4
|
+
// Index
|
5
|
+
// -----
|
6
|
+
// 1) Base Navbar Class
|
7
|
+
// 2) Navbar Themes
|
8
|
+
//==================================================
|
9
|
+
|
10
|
+
|
11
|
+
//=========================
|
12
|
+
// 1) Base Navbar Class
|
13
|
+
//=========================
|
14
|
+
.navbar {
|
15
|
+
position: relative;
|
16
|
+
// To make sure navbar always show
|
17
|
+
min-height: 5px;
|
18
|
+
width: 100%;
|
19
|
+
z-index: $zIndex-7--navbar;
|
20
|
+
}
|
21
|
+
|
22
|
+
//=========================
|
23
|
+
// 2) Navbar Themes
|
24
|
+
//=========================
|
25
|
+
.navbar--primary {
|
26
|
+
height: 50px;
|
27
|
+
color: white;
|
28
|
+
background: $color-primary;
|
29
|
+
}
|
@@ -0,0 +1,159 @@
|
|
1
|
+
//==================================================
|
2
|
+
// Utilities.scss
|
3
|
+
//
|
4
|
+
// Please use available utilities before attempting
|
5
|
+
// of adding a new property to your CSS classes.
|
6
|
+
//
|
7
|
+
// Index
|
8
|
+
// -----
|
9
|
+
// 1) Debugging Utility
|
10
|
+
// 2) Layout
|
11
|
+
// 3) Positioning
|
12
|
+
// 4) Text Alignment
|
13
|
+
// 5) Text Decoration
|
14
|
+
// 6) Visilibity
|
15
|
+
//==================================================
|
16
|
+
|
17
|
+
|
18
|
+
//=========================
|
19
|
+
// 1) Debugging Utility
|
20
|
+
//
|
21
|
+
// Disable = uncomment
|
22
|
+
// Please disable after work is done
|
23
|
+
// If styling border, it might be a good idea to disable it
|
24
|
+
//=========================
|
25
|
+
*, *:before, *:after {
|
26
|
+
// outline: 1px solid green;
|
27
|
+
}
|
28
|
+
|
29
|
+
//=========================
|
30
|
+
// 2) Layout
|
31
|
+
//=========================
|
32
|
+
// Turn element into a flexbox container
|
33
|
+
.u-flex {
|
34
|
+
@include flexbox();
|
35
|
+
}
|
36
|
+
|
37
|
+
.u-contain {
|
38
|
+
display: block;
|
39
|
+
width: 100%;
|
40
|
+
height: 100%;
|
41
|
+
}
|
42
|
+
|
43
|
+
.u-inline { display: inline }
|
44
|
+
.u-block { display: block }
|
45
|
+
.u-inline-block { display: inline-block }
|
46
|
+
|
47
|
+
//=========================
|
48
|
+
// 3) Positioning
|
49
|
+
//=========================
|
50
|
+
.u-pullLeft {
|
51
|
+
float: left;
|
52
|
+
}
|
53
|
+
|
54
|
+
.u-pullRight {
|
55
|
+
float: right;
|
56
|
+
}
|
57
|
+
|
58
|
+
.u-clearfix:before, .u-clearfix:after {
|
59
|
+
display: table;
|
60
|
+
content: "";
|
61
|
+
}
|
62
|
+
.u-clearfix:after {
|
63
|
+
clear: both;
|
64
|
+
}
|
65
|
+
|
66
|
+
.u-center {
|
67
|
+
margin-right: auto;
|
68
|
+
margin-left: auto;
|
69
|
+
}
|
70
|
+
|
71
|
+
.u-fixed {
|
72
|
+
position: fixed;
|
73
|
+
}
|
74
|
+
|
75
|
+
//=========================
|
76
|
+
// 4) Text Alignment
|
77
|
+
//=========================
|
78
|
+
.u-textAlignCenter {
|
79
|
+
text-align: center;
|
80
|
+
}
|
81
|
+
|
82
|
+
.u-verticalAlignMiddle {
|
83
|
+
vertical-align: middle;
|
84
|
+
}
|
85
|
+
|
86
|
+
//=========================
|
87
|
+
// 5) Text Decoration
|
88
|
+
//=========================
|
89
|
+
.u-hyphenate {
|
90
|
+
word-break: break-word;
|
91
|
+
-webkit-hyphens: auto;
|
92
|
+
-webkit-hyphenate-limit-before: 2;
|
93
|
+
-webkit-hyphenate-limit-after: 3;
|
94
|
+
-webkit-hyphenate-limit-lines: 2;
|
95
|
+
}
|
96
|
+
|
97
|
+
.u-antialiased {
|
98
|
+
-webkit-font-smoothing: antialiased;
|
99
|
+
-moz-osx-font-smoothing: grayscale;
|
100
|
+
}
|
101
|
+
|
102
|
+
//=========================
|
103
|
+
// 6) Visibility
|
104
|
+
//=========================
|
105
|
+
// Used for overlaying the entire page
|
106
|
+
.u-pageOverlay {
|
107
|
+
position: fixed;
|
108
|
+
top: 0;
|
109
|
+
bottom: 0;
|
110
|
+
left: 0;
|
111
|
+
right: 0;
|
112
|
+
width: 100%;
|
113
|
+
height: 100%;
|
114
|
+
background-color: rgba(255,255,255,0.2);
|
115
|
+
z-index: $zIndex-8--overlay;
|
116
|
+
}
|
117
|
+
|
118
|
+
// Used for overlaying everything under the navbar layer
|
119
|
+
.u-navbarOverlay {
|
120
|
+
position: fixed;
|
121
|
+
top: 0;
|
122
|
+
left: 0;
|
123
|
+
width: 100%;
|
124
|
+
height: 100%;
|
125
|
+
background-color: rgba(0, 0, 0, 0.6);
|
126
|
+
z-index: $zIndex-6--navbarOverlay;
|
127
|
+
}
|
128
|
+
|
129
|
+
// Used for hiding things.
|
130
|
+
// Example: Use with jQuery toggleClass to hide or show element
|
131
|
+
.u-hide {
|
132
|
+
display: none;
|
133
|
+
}
|
134
|
+
|
135
|
+
// Same like .u-hide but for opacity
|
136
|
+
.u-opaque {
|
137
|
+
opacity: 1;
|
138
|
+
}
|
139
|
+
|
140
|
+
@include bp-small-only {
|
141
|
+
.u-hideOnMobile {
|
142
|
+
display: none;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
@include bp-medium-only {
|
147
|
+
.u-hideOnTablet {
|
148
|
+
display: none;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
.u-overflowHidden { overflow: hidden }
|
153
|
+
.u-overflowScroll { overflow: scroll }
|
154
|
+
|
155
|
+
.u-textOverflowHidden {
|
156
|
+
white-space: nowrap;
|
157
|
+
text-overflow: ellipsis;
|
158
|
+
overflow-x: hidden;
|
159
|
+
}
|