feathers 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a0ccd12ae4fc12169f5f1ac52e257faed51e21d5
4
+ data.tar.gz: 6ace0f2507569e11f7f52015feb5a7cc8f8c997f
5
+ SHA512:
6
+ metadata.gz: 7b9ddb790ed389adb4f901cd0b2cff1c35a1d8e504faf0145a18a1cafcbc87cb41911d7d8197580d11bce6d99a86b7687fe43a9580532d21c867d5e696b571b0
7
+ data.tar.gz: 8ac364a9e3159b060922f228d77d136f42b774f7b7d6741529ac63846c34efecf76619f866aa565ac5524adc17f57921cd7ca9924eec046b5ee19c6bc0646dd1
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ feathers-*.gem
data/Gemfile ADDED
@@ -0,0 +1 @@
1
+ gemspec
data/README.md ADDED
@@ -0,0 +1,141 @@
1
+ Feathers
2
+ ====
3
+
4
+ Feathers is a minimalist CSS reset and boilerplate with optional rules that can be 'layered in' to apply sensible defaults to common widgets, such as navigation, forms, buttons, and menus
5
+
6
+ Feathers is a starting point, not an end to end solution. It does **not** contain a lot of layout rules, grid frameworks, or JavaScript libraries. It's not a replacement for Bootstrap or Foundation, etc. It's a lightweight alternative for people who want to start with minimal, but sensible CSS and build from there.
7
+
8
+ Getting Started
9
+ ----
10
+
11
+ First, install Feathers.
12
+
13
+ gem install feathers
14
+
15
+ Next, Feathers assumes you're using SASS instead of Sprockets, so start by renaming your `application.css` file to `application.css.scss` and removing the Sprockets directives.
16
+
17
+ Now, simply `@import` the feathers you wish to use. They are:
18
+
19
+ * `base` - This is the basic CSS reset and boilerplate. It does some normalization and gives you sensible defaults for some basic things like typography, tap highlights, touch scroll behavior, etc.
20
+ * `buttons` - A collection of button styles; default, cancel, action, success, warning, delete
21
+ * `flash-messages` - Styling for flash messages; success, warning, notice
22
+ * `forms` - Nice defaults for form elements.
23
+ * `menus` - A collection of different menu types; breadcrumbs, dropdowns, horizontal nav bar, vertical list menu, link list, icon bar (works great with Font Awesome).
24
+ * `other-widgets` - This is a miscellaneous collection of other common widgets; pagination, avatars, progress bars, labels, notes, title bar, tag lines.
25
+ * `tables` - A nice default for data tables
26
+
27
+ CSS class names
28
+ ----
29
+
30
+ I'm just going to make a list. Most are self-explanatory! Feathers tries to avid 'classitis' by applying CSS semantically within widgets.
31
+
32
+ ####Base
33
+
34
+ * .align-center
35
+ * .align-right
36
+ * .align-left
37
+ * .hidden
38
+
39
+ ####Buttons
40
+ * .button
41
+ * .button.cancel
42
+ * .button.delete
43
+ * .button.info
44
+ * .button.large
45
+ * .button.small
46
+ * .button.success
47
+ * .button.warning
48
+
49
+ May be combined, e.g. `class="button large info"`.
50
+
51
+ ####Flash Messages
52
+
53
+ For block level elements.
54
+
55
+ * .notice
56
+ * .error
57
+ * .note
58
+ * .warning
59
+
60
+ ####Forms
61
+
62
+ * input.error
63
+ * label.inline
64
+ * label.horizontal
65
+ * span.error-details
66
+
67
+ ####Menus
68
+
69
+ * .breadcrumbs
70
+ * .drop-menu
71
+ * .drop-menu > ul
72
+ * .icon-bar
73
+ * ul.horizontal-menu
74
+ * ul.link-list
75
+ * ul.vertical-menu
76
+
77
+ ####Other Widgets
78
+
79
+ * .avatar
80
+ * .avatar.circle
81
+ * .avatar.framed
82
+ * .note {
83
+ * .pagination
84
+ * .progress-bar
85
+ * span.label
86
+ * span.label.danger
87
+ * span.label.info
88
+ * span.label.success
89
+ * span.label.warning
90
+ * .tag-line
91
+ * .title-bar
92
+
93
+ ####Tables
94
+
95
+ * table.data-table
96
+
97
+ Customizing Feathers
98
+ ----
99
+
100
+ You can of course override any Feathers CSS declartion inside your own stylesheet, and this is probably the most common and straightfoward path toward customization for a lot of people. However, if you would like to simply change Feathers' default colors, it's easy to do.
101
+
102
+ First, create an initializer file.
103
+
104
+ touch config/initializers/feathers.rb
105
+
106
+ Then simply override the Feathers color presets. You can change any or all values to your liking.
107
+
108
+ module Feathers
109
+ class Config
110
+
111
+ @light_1 = "#efefef"
112
+ @light_2 = "#ddd"
113
+ @medium_1 = "#ccc"
114
+ @medium_2 = "#aaa"
115
+ @dark_1 = "#777"
116
+ @dark_2 = "#444"
117
+ @highlight = "#ffe"
118
+ @notice_background = "#ecffd6"
119
+ @warning_background = "#fbefb9"
120
+ @error_background = "#ffebeb"
121
+ @note_background = "#d8f2ff"
122
+ @default_element = "#ccc"
123
+ @danger_element = "#cf0404"
124
+ @info_element = "#448ccb"
125
+ @success_element = "#7ba900"
126
+ @warning_element = "#f3a24d"
127
+ @black = "#000"
128
+ @white = "#fff"
129
+
130
+ end
131
+ end
132
+
133
+ Borders and gradients are calculated automatically based on the defined values for their element.
134
+
135
+ ToDo
136
+ ----
137
+
138
+ * Currently checkbox, radio buttons, and select box stylings are currently webkit only
139
+ * View Helpers for various Feathers elements
140
+ * JavaScript for better handling of tap states for touch events (`:hover` isn't always accurate)
141
+ * Add a demo and tests (tests don't really make sense until we have view helpers to test)
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,132 @@
1
+ * {
2
+ box-sizing:border-box;
3
+ -moz-box-sizing:border-box;
4
+ -webkit-box-sizing:border-box;
5
+ }
6
+
7
+ ::-moz-selection {
8
+ background:<%= Feathers::Config.dark_2 %>;
9
+ color:<%= Feathers::Config.white %>;
10
+ text-shadow:none;
11
+ }
12
+
13
+ ::selection {
14
+ background:<%= Feathers::Config.dark_2 %>;
15
+ color:<%= Feathers::Config.white %>;
16
+ text-shadow:none;
17
+ }
18
+
19
+ a {
20
+ color:<%= Feathers::Config.dark_2 %>;
21
+ outline:none;
22
+ -webkit-tap-highlight-color:rgba(0, 0, 0, 0);
23
+ -moz-tap-highlight-color:rgba(0, 0, 0, 0);
24
+ -o-tap-highlight-color:rgba(0, 0, 0, 0);
25
+ tap-highlight-color:rgba(0, 0, 0, 0);
26
+ text-decoration:none;
27
+ }
28
+
29
+ a:hover {
30
+ color:<%= Feathers::Config.dark_1 %>;
31
+ }
32
+
33
+ .align-center {
34
+ text-align:center;
35
+ }
36
+
37
+ .align-right {
38
+ text-align: right;
39
+ }
40
+
41
+ .align-left {
42
+ text-align:left;
43
+ }
44
+
45
+ blockquote {
46
+ border-left:3px solid <%= Feathers::Config.medium_1 %>;
47
+ color:<%= Feathers::Config.dark_2 %>;
48
+ margin:0 1em 0.5em 1em;
49
+ padding:1em;
50
+ cite {
51
+ display:block;
52
+ text-align:right;
53
+ font-style:italic;
54
+ font-weight:bold;
55
+ }
56
+ }
57
+
58
+ body {
59
+ background-color:<%= Feathers::Config.white %>;
60
+ font-family:helvetica, arial, sans-serif;
61
+ font-size:16px;
62
+ font-smoothing:antialiased;
63
+ -webkit-font-smoothing:antialiased;
64
+ line-height:150%;
65
+ margin:0;
66
+ overflow-scroll:touch;
67
+ -webkit-overflow-scroll:touch;
68
+ overflow-y:scroll;
69
+ -webkit-text-size-adjust:100%;
70
+ -ms-text-size-adjust:100%;
71
+ }
72
+
73
+ footer, header, nav, section {
74
+ display:block;
75
+ }
76
+
77
+ fieldset, img {
78
+ border:none;
79
+ }
80
+
81
+ form, legend, li {
82
+ margin:0;
83
+ padding:0;
84
+ }
85
+
86
+ h1, h2, h3, h4, h5, h6 {
87
+ line-height:1.5rem;
88
+ margin:0 0 0.5em 0;
89
+ padding:0;
90
+ }
91
+
92
+ h1 { font-size:200%; }
93
+ h2 { font-size:180%; }
94
+ h3 { font-size:160%; }
95
+ h4 { font-size:140%; }
96
+ h5 { font-size:120%; }
97
+ h6 { font-size:100%; }
98
+
99
+ .hidden {
100
+ display:none;
101
+ }
102
+
103
+ hr {
104
+ border:none;
105
+ border-bottom:1px solid <%= Feathers::Config.medium_1 %>;
106
+ height:0;
107
+ margin:1em 0;
108
+ padding:0;
109
+ }
110
+
111
+ i {
112
+ color:<%= Feathers::Config.dark_2 %>;
113
+ }
114
+
115
+ input, select, textarea {
116
+ color:#444;
117
+ font-family:helvetica, arial, sans-serif;
118
+ font-size:0.8em;
119
+ }
120
+
121
+ p {
122
+ margin:0 0 1em 0;
123
+ }
124
+
125
+ small {
126
+ font-size:70%;
127
+ }
128
+
129
+ ul, ol {
130
+ margin:0 0 1em 0;
131
+ padding:0 0 0 2em;
132
+ }
@@ -0,0 +1,100 @@
1
+ @import 'mixins';
2
+
3
+ .button {
4
+ border:1px solid darken(<%= Feathers::Config.default_element %>, 30%);
5
+ display:inline-block;
6
+ line-height:1.5em;
7
+ padding:0.25em 0.5em;
8
+ @include background-gradient(lighten(<%= Feathers::Config.default_element %>, 10%), <%= Feathers::Config.default_element %>);
9
+ @include border-radius(0.25em);
10
+ i {
11
+ margin-right:0.5em;
12
+ }
13
+ }
14
+
15
+ .button:active {
16
+ @include box-shadow(0, 0, 0);
17
+ }
18
+
19
+ .button:hover {
20
+ @include background-gradient(darken(<%= Feathers::Config.default_element %>, 10%), darken(<%= Feathers::Config.default_element %>, 20%));
21
+ color:<%= Feathers::Config.white %>;
22
+ @include background-gradient(darken(<%= Feathers::Config.default_element %>, 10%), darken(<%= Feathers::Config.default_element %>, 20%));
23
+ i {
24
+ color:<%= Feathers::Config.white %>;
25
+ }
26
+ }
27
+
28
+ .button.cancel {
29
+ border:1px solid darken(<%= Feathers::Config.default_element %>, 30%);
30
+ @include background-gradient(lighten(<%= Feathers::Config.default_element %>, 10%), <%= Feathers::Config.default_element %>);
31
+ }
32
+
33
+ .button.cancel:hover {
34
+ color:<%= Feathers::Config.white %>;
35
+ @include background-gradient(darken(<%= Feathers::Config.default_element %>, 10%), darken(<%= Feathers::Config.default_element %>, 20%));
36
+ i {
37
+ color:<%= Feathers::Config.white %>;
38
+ }
39
+ }
40
+
41
+ .button.delete {
42
+ border:1px solid darken(<%= Feathers::Config.danger_element %>, 30%);
43
+ color:<%= Feathers::Config.white %>;
44
+ @include background-gradient(lighten(<%= Feathers::Config.danger_element %>, 10%), <%= Feathers::Config.danger_element %>);
45
+ i {
46
+ color:<%= Feathers::Config.white %>;
47
+ }
48
+ }
49
+
50
+ .button.delete:hover {
51
+ @include background-gradient(darken(<%= Feathers::Config.danger_element %>, 10%), darken(<%= Feathers::Config.danger_element %>, 20%));
52
+ }
53
+
54
+ .button.large {
55
+ font-size:125%;
56
+ }
57
+
58
+ .button.small {
59
+ font-size:80%;
60
+ }
61
+
62
+ .button.info {
63
+ border:1px solid darken(<%= Feathers::Config.info_element %>, 30%);
64
+ color:<%= Feathers::Config.white %>;
65
+ @include background-gradient(lighten(<%= Feathers::Config.info_element %>, 10%), <%= Feathers::Config.info_element %>);
66
+ i {
67
+ color:<%= Feathers::Config.white %>;
68
+ }
69
+ }
70
+
71
+ .button.info:hover {
72
+ @include background-gradient(darken(<%= Feathers::Config.info_element %>, 10%), darken(<%= Feathers::Config.info_element %>, 20%));
73
+ }
74
+
75
+ .button.success {
76
+ border:1px solid darken(<%= Feathers::Config.success_element %>, 30%);
77
+ color:<%= Feathers::Config.white %>;
78
+ @include background-gradient(lighten(<%= Feathers::Config.success_element %>, 10%), <%= Feathers::Config.success_element %>);
79
+ i {
80
+ color:<%= Feathers::Config.white %>;
81
+ }
82
+ }
83
+
84
+ .button.success:hover {
85
+ @include background-gradient(darken(<%= Feathers::Config.success_element %>, 10%), darken(<%= Feathers::Config.success_element %>, 20%));
86
+ }
87
+
88
+ .button.warning {
89
+ border:1px solid darken(<%= Feathers::Config.warning_element %>, 30%);
90
+ @include background-gradient(lighten(<%= Feathers::Config.warning_element %>, 10%), <%= Feathers::Config.warning_element %>);
91
+ color:<%= Feathers::Config.white %>;
92
+ i {
93
+ color:<%= Feathers::Config.white %>;
94
+ }
95
+ }
96
+
97
+ .button.warning:hover {
98
+ @include background-gradient(darken(<%= Feathers::Config.warning_element %>, 10%), darken(<%= Feathers::Config.warning_element %>, 20%));
99
+ }
100
+
@@ -0,0 +1,33 @@
1
+ div.notice, div.error, div.note, div.warning {
2
+ margin:1em 0;
3
+ padding:1em;
4
+ @include border-radius(0.5em);
5
+ i {
6
+ margin-right:1em;
7
+ }
8
+ }
9
+
10
+ div.error {
11
+ background:<%= Feathers::Config.error_background %>;
12
+ border:2px solid darken(<%= Feathers::Config.error_background %>, 10%);
13
+ i {
14
+ color:darken(<%= Feathers::Config.error_background %>, 50%);
15
+ }
16
+ }
17
+
18
+ div.notice {
19
+ background: <%= Feathers::Config.notice_background %>;
20
+ border:2px solid darken(<%= Feathers::Config.notice_background %>, 40%);
21
+ i {
22
+ color:darken(<%= Feathers::Config.notice_background %>, 50%);
23
+ }
24
+ }
25
+
26
+ div.warning {
27
+ background:<%= Feathers::Config.warning_background %>;
28
+ border:2px solid darken(<%= Feathers::Config.warning_background %>, 30%);
29
+ i {
30
+ color:darken(<%= Feathers::Config.warning_background %>, 50%);
31
+ }
32
+ }
33
+
@@ -0,0 +1,118 @@
1
+ fieldset {
2
+ margin:0;
3
+
4
+ input[type=search] { -webkit-appearance:none; }
5
+ input[type=search]::-webkit-search-decoration,
6
+ input[type=search]::-webkit-search-cancel-button,
7
+ input[type=search]::-webkit-search-results-button,
8
+ input[type=search]::-webkit-search-results-decoration {
9
+ display: none;
10
+ }
11
+
12
+ input[type=text],
13
+ input[type=email],
14
+ input[type=tel],
15
+ input[type=number],
16
+ input[type=date],
17
+ input[type=search],
18
+ input[type=password] {
19
+ background:<%= Feathers::Config.white %>;
20
+ border:1px solid <%= Feathers::Config.medium_1 %>;
21
+ padding:0.5em;
22
+ @include border-radius(0.25em);
23
+ }
24
+
25
+ input.error {
26
+ border:1px solid darken(<%= Feathers::Config.error_background %>, 20%);
27
+ }
28
+
29
+ label {
30
+ display:block;
31
+ line-height:2em;
32
+ }
33
+
34
+ label.horizontal {
35
+ display:inline-block;
36
+ min-width:16em;
37
+ }
38
+
39
+ label.inline {
40
+ display:inline-block;
41
+ margin-right:2em;
42
+ input {
43
+ -webkit-appearance:none;
44
+ -moz-appearance:none;
45
+ appearance:none;
46
+ border:none;
47
+ display:inline-block;
48
+ float:left;
49
+ height:20px;
50
+ margin-right:1em;
51
+ width:20px;
52
+ }
53
+ input[type=radio] {
54
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjVJREFUeNrsVb1OAkEQ3uOfXCCQaAQsDBQ2xMLkOhtaH8CeR/A17HwEel9DOxILrSwgEH4DCQRy4Z9zvnXv3BPN6bGxYpIJw/x8Nzszu6NZlsVUUug7paZpQfo5IT4iThHrwmQSj4mHxH1KZuMJSGDH9HNWqVRuDMO4yOVy54lEIgvbdDrtdjqdt2q1+lIulx/It0GgAxcAjmwz0SlxqVarPVoeBB/4IsaFIYEhs1K/33+1fknwFaDHLkAi1Mz4TWY/ZGoAQwbMUc3uLJ+EWGAAKyBKeYQG+B0VEYuJcABT6KZfQBGbkgF1ezT8kIjVZUBlZAOaGFq/ICLWlAHHuAF+AUXsWAYc4jr5BRSxQ+fqKR9s5VdP5eOgfX1g//J8kWrn+dK+e7H3eWA11StA+U057JTdwV6v1xZlxhmy12DzLouaXdJX7/P5/JWdfa/XY6PRiM3nc/4/FouxdDrNMpmMc8J6vf5UKBRuSXxGTe0un6BmMliz2WSNRoO1Wi3Wbrc5Q4YONpsQg1jRRKcprp2CzLrdLhsMBsw0TUZH/ehgKMQWiwWXI5GIk6m0Uzo7O2Wz2fBjTiYTDrZarbgODBk62OADnedOmc1mvGbIBJltt1vneJChgw0+8P3/nRKPx3k3o9Eor1kg8PlNyNDBBh/4eu6UYDDIRyOZTDJd11k4HOY6MGToYIMPdF93SkjeKcVi8Rp/0L3lcskNyMbuLGSAZbNZ1yzKO0X5YCu/eoedsj+9CzAANMf9yP7GAVkAAAAASUVORK5CYII=) top left no-repeat;
55
+ }
56
+ input[type=radio]:checked {
57
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjVJREFUeNrsVb1OAkEQ3uOfXCCQaAQsDBQ2xMLkOhtaH8CeR/A17HwEel9DOxILrSwgEH4DCQRy4Z9zvnXv3BPN6bGxYpIJw/x8Nzszu6NZlsVUUug7paZpQfo5IT4iThHrwmQSj4mHxH1KZuMJSGDH9HNWqVRuDMO4yOVy54lEIgvbdDrtdjqdt2q1+lIulx/It0GgAxcAjmwz0SlxqVarPVoeBB/4IsaFIYEhs1K/33+1fknwFaDHLkAi1Mz4TWY/ZGoAQwbMUc3uLJ+EWGAAKyBKeYQG+B0VEYuJcABT6KZfQBGbkgF1ezT8kIjVZUBlZAOaGFq/ICLWlAHHuAF+AUXsWAYc4jr5BRSxQ+fqKR9s5VdP5eOgfX1g//J8kWrn+dK+e7H3eWA11StA+U057JTdwV6v1xZlxhmy12DzLouaXdJX7/P5/JWdfa/XY6PRiM3nc/4/FouxdDrNMpmMc8J6vf5UKBRuSXxGTe0un6BmMliz2WSNRoO1Wi3Wbrc5Q4YONpsQg1jRRKcprp2CzLrdLhsMBsw0TUZH/ehgKMQWiwWXI5GIk6m0Uzo7O2Wz2fBjTiYTDrZarbgODBk62OADnedOmc1mvGbIBJltt1vneJChgw0+8P3/nRKPx3k3o9Eor1kg8PlNyNDBBh/4eu6UYDDIRyOZTDJd11k4HOY6MGToYIMPdF93SkjeKcVi8Rp/0L3lcskNyMbuLGSAZbNZ1yzKO0X5YCu/eoedsj+9CzAANMf9yP7GAVkAAAAASUVORK5CYII=) bottom left no-repeat;
58
+ }
59
+ input[type=checkbox] {
60
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWtJREFUeNrslU2LglAUhl/lUou2LhWCdubGsk1B/oKZHzvTDwgEd4lFm0Aoog8XgpswXVjTvaD0Nc2YzjAMvosr5yIP77n33HO44/GIIkXownHcSxGwk7l3cha85YGdTL3SL4+CVQJLYAksgb8DJNf9LK+4okfAz6T8v2dKGIbFnOHhcIBlWRiNRvmBcRxjOBxiOp2iWq3er8MMB89g6/WaxZVKJZ9D6iqBUe33++eBruvCtu2bvadSjqIIhmHg/GU1Gg10Op2vHXqeh8FggOVyme5NJpOL9FRVRa/XuzlDcu2CloHjOCwej8eQJAm73Q6z2Sz9r91uo9lsPu42VNvtFpvNJo1938d8PsdqtWJ1RyXL8qewG2C9XocoijBNE4vFgu3R4k1SFQQBrVYrW7chhKDf70NRFBYHQcAughawruvgef659kWd0PQSdbtd1Gq173fse9I0LX239HIyjYBH0Cxd/e/PlA8BBgA6gpuyV9X9zQAAAABJRU5ErkJggg==) top left no-repeat;
61
+ }
62
+ input[type=checkbox]:checked {
63
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWtJREFUeNrslU2LglAUhl/lUou2LhWCdubGsk1B/oKZHzvTDwgEd4lFm0Aoog8XgpswXVjTvaD0Nc2YzjAMvosr5yIP77n33HO44/GIIkXownHcSxGwk7l3cha85YGdTL3SL4+CVQJLYAksgb8DJNf9LK+4okfAz6T8v2dKGIbFnOHhcIBlWRiNRvmBcRxjOBxiOp2iWq3er8MMB89g6/WaxZVKJZ9D6iqBUe33++eBruvCtu2bvadSjqIIhmHg/GU1Gg10Op2vHXqeh8FggOVyme5NJpOL9FRVRa/XuzlDcu2CloHjOCwej8eQJAm73Q6z2Sz9r91uo9lsPu42VNvtFpvNJo1938d8PsdqtWJ1RyXL8qewG2C9XocoijBNE4vFgu3R4k1SFQQBrVYrW7chhKDf70NRFBYHQcAughawruvgef659kWd0PQSdbtd1Gq173fse9I0LX239HIyjYBH0Cxd/e/PlA8BBgA6gpuyV9X9zQAAAABJRU5ErkJggg==) bottom left no-repeat;
64
+ }
65
+ }
66
+
67
+ legend {
68
+ background:<%= Feathers::Config.light_1 %>;
69
+ color:<%= Feathers::Config.dark_1 %>;
70
+ padding:0.5em;
71
+ @include border-radius(0.25em);
72
+ }
73
+
74
+ select {
75
+ -webkit-appearance:none;
76
+ -moz-appearance:none;
77
+ appearance:none;
78
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAIAAAC9o5sfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAH1JREFUeNqkUTsKwCAMNaGDk4qDoGcQZwdHj+1pHLyFpE6l1P5o3xRCHu8TICL2Fch+YNmmUkpr7fSIc55Scs4d9rC3PfMBwBjjvbfWIuIdeeYrpYam1vpV5pzzZk8IEUIY/KvMcNr20O+9xxillHeN0QVqrfQE+PPnVYABAAwmZGpbdzcOAAAAAElFTkSuQmCC) 100% 50% no-repeat <%= Feathers::Config.white %>;
79
+ border:1px solid <%= Feathers::Config.medium_1 %>;
80
+ line-height:1.25em;
81
+ min-width:16em;
82
+ padding:0.5em 3em 0.5em 0.5em;
83
+ @include border-radius(0.25em);
84
+ }
85
+
86
+ input[type=date] {
87
+ -webkit-appearance:none;
88
+ -moz-appearance:none;
89
+ appearance:none;
90
+ border:1px solid <%= Feathers::Config.medium_1 %>;
91
+ line-height:1.25em;
92
+ padding:0.5em;
93
+ @include border-radius(0.25em);
94
+ }
95
+
96
+ span.error-details {
97
+ color:darken(<%= Feathers::Config.error_background %>, 50%);
98
+ display:inline-block;
99
+ margin-left:1em;
100
+ i {
101
+ color:darken(<%= Feathers::Config.error_background %>, 50%);
102
+ }
103
+ }
104
+
105
+ }
106
+
107
+ fieldset > div {
108
+ overflow:hidden;
109
+ padding:0.5em;
110
+ }
111
+
112
+ input[type=reset], input[type=submit], input[type=button] {
113
+ display:inline-block;
114
+ -webkit-tap-highlight-color:rgba(0, 0, 0, 0);
115
+ -moz-tap-highlight-color:rgba(0, 0, 0, 0);
116
+ -o-tap-highlight-color:rgba(0, 0, 0, 0);
117
+ tap-highlight-color:rgba(0, 0, 0, 0);
118
+ }
@@ -0,0 +1,184 @@
1
+ .breadcrumbs {
2
+ background:<%= Feathers::Config.light_1 %>;
3
+ border:1px solid <%= Feathers::Config.light_2 %>;
4
+ color:<%= Feathers::Config.dark_1 %>;
5
+ padding:1em;
6
+ span {
7
+ color:<%= Feathers::Config.dark_2 %>;
8
+ }
9
+ }
10
+
11
+ .drop-menu {
12
+ background:<%= Feathers::Config.light_1 %>;
13
+ display:inline-block;
14
+ padding:0.5em 1em;
15
+ position:relative;
16
+ @include border-radius(0.5em);
17
+ ul {
18
+ background:<%= Feathers::Config.light_1 %>;
19
+ display:none;
20
+ left:0.5em;
21
+ margin:0;
22
+ min-width:12em;
23
+ padding:0;
24
+ position:absolute;
25
+ top:2.5em;
26
+ z-index:1000;
27
+ @include border-radius(0.5em);
28
+ li {
29
+ list-style:none;
30
+ margin:0;
31
+ padding:0;
32
+ a {
33
+ background:<%= Feathers::Config.light_1 %>;
34
+ display:block;
35
+ padding:0.5em;
36
+ }
37
+ a:hover {
38
+ color:<%= Feathers::Config.light_1 %>;
39
+ background:<%= Feathers::Config.dark_1 %>;
40
+ @include border-radius(0.5em);
41
+ }
42
+ }
43
+ }
44
+ ul:before {
45
+ content: "";
46
+ position: absolute;
47
+ width: 0;
48
+ height: 0;
49
+ border-width: 12px;
50
+ border-style: solid;
51
+ border-color: transparent transparent <%= Feathers::Config.light_1 %> transparent;
52
+ top: -24px;
53
+ left: 1em;
54
+ z-index:1000;
55
+ }
56
+ }
57
+ .drop-menu:hover {
58
+ background:<%= Feathers::Config.medium_1 %>;
59
+ > a {
60
+ color:<%= Feathers::Config.dark_2 %>;
61
+ i {
62
+ color:<%= Feathers::Config.dark_2 %>;
63
+ }
64
+ }
65
+ ul {
66
+ display:block;
67
+ }
68
+ }
69
+
70
+ ul.horizontal-menu, ul.vertical-menu {
71
+ margin:0 0 1em 0;
72
+ padding:0;
73
+ li {
74
+ list-style:none;
75
+ margin:0;
76
+ padding:0;
77
+ }
78
+ }
79
+
80
+ ul.horizontal-menu {
81
+ background:<%= Feathers::Config.light_1 %>;
82
+ overflow:hidden;
83
+ padding:0.5em 0;
84
+ @include border-radius(0.5em);
85
+ li {
86
+ display:inline;
87
+ a {
88
+ display:inline-block;
89
+ float:left;
90
+ margin:0 0.5em;
91
+ padding:0 1em;
92
+ }
93
+ a:hover {
94
+ background:<%= Feathers::Config.dark_1 %>;
95
+ color:<%= Feathers::Config.white %>;
96
+ @include border-radius(0.5em);
97
+ }
98
+ }
99
+ }
100
+
101
+ ul.vertical-menu {
102
+ li {
103
+ margin:0;
104
+ padding:0;
105
+ a {
106
+ background:<%= Feathers::Config.light_1 %>;
107
+ display:block;
108
+ margin-bottom:0.5em;
109
+ padding:0.5em 1em;
110
+ @include border-radius(0.5em);
111
+ i {
112
+ display:inline-block;
113
+ float:right;
114
+ line-height:1.5em;
115
+ @include opacity(0.2);
116
+ }
117
+ }
118
+ a:hover {
119
+ background:<%= Feathers::Config.dark_1 %>;
120
+ color:<%= Feathers::Config.white %>;
121
+ i {
122
+ color:<%= Feathers::Config.white %>;
123
+ @include opacity(0.4);
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ .icon-bar {
130
+ border:1px solid <%= Feathers::Config.medium_1 %>;
131
+ display:block;
132
+ height:3em;
133
+ line-height:2em;
134
+ padding:0.5em;
135
+ text-align:center;
136
+ @include background-gradient(lighten(<%= Feathers::Config.light_2 %>, 10%), <%= Feathers::Config.light_2 %>);
137
+ a {
138
+ display:inline-block;
139
+ margin:0 2em;
140
+ i {
141
+ font-size:180%;
142
+ color:<%= Feathers::Config.dark_1 %>;
143
+ @include text-shadow(1px 1px 1px <%= Feathers::Config.white %>);
144
+ }
145
+ }
146
+ a:hover, a:active {
147
+ i {
148
+ color:#333;
149
+ }
150
+ }
151
+ }
152
+
153
+ ul.link-list {
154
+ margin:0;
155
+ padding:0;
156
+ overflow-scroll:touch;
157
+ -webkit-overflow-scroll:touch;
158
+ li {
159
+ list-style:none;
160
+ margin:0;
161
+ padding:0;
162
+ a {
163
+ display:block;
164
+ padding:0.5em;
165
+ margin:0;
166
+ border-bottom:1px solid <%= Feathers::Config.medium_1 %>;
167
+ i {
168
+ color:<%= Feathers::Config.dark_1 %>;
169
+ display:inline-block;
170
+ float:right;
171
+ line-height:1.5em;
172
+ @include opacity(0.2);
173
+ }
174
+ }
175
+ a:hover {
176
+ background:<%= Feathers::Config.light_2 %>;
177
+ }
178
+ }
179
+ li:last-child {
180
+ a {
181
+ border-bottom:none;
182
+ }
183
+ }
184
+ }
@@ -0,0 +1,43 @@
1
+ @mixin background-gradient($startColor: #3C3C3C, $endColor: #999999) {
2
+ background-color: $startColor;
3
+ background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor));
4
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor);
5
+ background-image: -moz-linear-gradient(top, $startColor, $endColor);
6
+ background-image: -ms-linear-gradient(top, $startColor, $endColor);
7
+ background-image: -o-linear-gradient(top, $startColor, $endColor);
8
+ background-image: linear-gradient(top, $startColor, $endColor);
9
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=$startColor, EndColorStr=$endColor);
10
+ }
11
+
12
+ @mixin background-size($width: 100%, $height: 100%) {
13
+ -moz-background-size: $width $height;
14
+ -webkit-background-size: $width $height;
15
+ background-size: $width $height;
16
+ }
17
+
18
+ @mixin border-radius($radius: 5px) {
19
+ -moz-border-radius: $radius;
20
+ -webkit-border-radius: $radius;
21
+ border-radius: $radius;
22
+ }
23
+
24
+ @mixin box-shadow($x: 2px, $y: 2px, $blur: 5px, $color: rgba(0,0,0,.4), $inset: "") {
25
+ -webkit-box-shadow: $inset $x $y $blur $color;
26
+ -moz-box-shadow: $inset $x $y $blur $color;
27
+ box-shadow: $inset $x $y $blur $color;
28
+ }
29
+
30
+ @mixin opacity($opacity: 0.5) {
31
+ filter: alpha(opacity=($opacity * 100));
32
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + ($opacity * 100) + ")";
33
+ -moz-opacity: $opacity;
34
+ -khtml-opacity: $opacity;
35
+ opacity: $opacity;
36
+ }
37
+
38
+ @mixin text-shadow($x: 2px, $y: 2px, $blur: 5px, $color: rgba(0,0,0,.4)) {
39
+ -moz-text-shadow: $x $y $blur $color;
40
+ -webkit-text-shadow: $x $y $blur $color;
41
+ text-shadow: $x $y $blur $color;
42
+ }
43
+
@@ -0,0 +1,101 @@
1
+ .avatar {
2
+ width:64px;
3
+ height:64px;
4
+ }
5
+
6
+ .avatar.circle {
7
+ @include border-radius(100%);
8
+ }
9
+
10
+ .avatar.framed {
11
+ background:<%= Feathers::Config.white %>;
12
+ border:1px solid <%= Feathers::Config.medium_1 %>;
13
+ padding:3px;
14
+ }
15
+
16
+ .pagination {
17
+ overflow:hidden;
18
+ a {
19
+ border:1px solid <%= Feathers::Config.light_2 %>;
20
+ display:inline-block;
21
+ float:left;
22
+ margin-right:0.5em;
23
+ padding:0.25em 0.5em;
24
+ }
25
+ a.current {
26
+ background:#f6f6f6;
27
+ color:<%= Feathers::Config.dark_1 %>;
28
+ }
29
+ a.disabled {
30
+ border:none;
31
+ color:<%= Feathers::Config.medium_1 %>;
32
+ }
33
+ a:hover {
34
+ background:<%= Feathers::Config.dark_2 %>;
35
+ color:<%= Feathers::Config.white %>;
36
+ }
37
+ a.disabled:hover {
38
+ background:<%= Feathers::Config.medium_1 %>;
39
+ color:<%= Feathers::Config.white %>;
40
+ }
41
+ }
42
+
43
+ .progress-bar {
44
+ background:<%= Feathers::Config.light_1 %>;
45
+ height:16px;
46
+ margin:1em 0;
47
+ @include border-radius(1em);
48
+ b {
49
+ background:<%= Feathers::Config.success_element %>;
50
+ color:<%= Feathers::Config.white %>;
51
+ display:block;
52
+ font-size:80%;
53
+ height:16px;
54
+ line-height:16px;
55
+ text-align:center;
56
+ @include border-radius(1em);
57
+ }
58
+ }
59
+
60
+ span.label {
61
+ background:<%= Feathers::Config.default_element %>;
62
+ color:<%= Feathers::Config.white %>;
63
+ font-size:80%;
64
+ font-weight:bold;
65
+ margin-right:0.5em;
66
+ padding:0.25em 0.5em;
67
+ text-transform:lowercase;
68
+ white-space:nowrap;
69
+ @include border-radius(0.25em);
70
+ }
71
+
72
+ span.label.danger { background:<%= Feathers::Config.danger_element %>; }
73
+ span.label.info { background:<%= Feathers::Config.info_element %>; }
74
+ span.label.success { background:<%= Feathers::Config.success_element %>; }
75
+ span.label.warning { background:<%= Feathers::Config.warning_element %>; }
76
+
77
+ div.note {
78
+ background:<%= Feathers::Config.note_background %>;
79
+ border:2px solid darken(<%= Feathers::Config.note_background %>, 30%);
80
+ color:darken(<%= Feathers::Config.note_background %>, 75%);
81
+ margin:1em 0;
82
+ padding:0.5em;
83
+ }
84
+
85
+ .tag-line {
86
+ color:<%= Feathers::Config.dark_1 %>;
87
+ font-size:125%;
88
+ }
89
+
90
+ .title-bar {
91
+ border:1px solid <%= Feathers::Config.medium_2 %>;
92
+ padding:0.5em;
93
+ text-align:center;
94
+ @include background-gradient(lighten(<%= Feathers::Config.default_element %>, 10%), <%= Feathers::Config.default_element %>);
95
+ h1 {
96
+ color:<%= Feathers::Config.dark_1 %>;
97
+ font-size:180%;
98
+ margin:0;
99
+ @include text-shadow(1px 1px 1px <%= Feathers::Config.white %>);
100
+ }
101
+ }
@@ -0,0 +1,30 @@
1
+ @import 'mixins';
2
+
3
+ table.data-table {
4
+ thead {
5
+ th {
6
+ border-bottom:1px solid <%= Feathers::Config.medium_1 %>;
7
+ border-right:1px solid <%= Feathers::Config.medium_1 %>;
8
+ border-top:1px solid <%= Feathers::Config.medium_1 %>;
9
+ color:<%= Feathers::Config.dark_2 %>;
10
+ font-weight:bold;
11
+ text-align:left;
12
+ @include background-gradient(lighten(<%= Feathers::Config.default_element %>, 10%), <%= Feathers::Config.default_element %>);
13
+ }
14
+ th:first-child {
15
+ border-left:1px solid <%= Feathers::Config.medium_1 %>;
16
+ }
17
+ }
18
+ tbody {
19
+ td {
20
+ border-bottom:1px solid <%= Feathers::Config.light_2 %>;
21
+ }
22
+ tr:hover {
23
+ background:<%= Feathers::Config.highlight %>;
24
+ }
25
+ }
26
+ tfoot {
27
+ background:<%= Feathers::Config.light_2 %>;
28
+ color:<%= Feathers::Config.dark_1 %>;
29
+ }
30
+ }
data/feathers.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "feathers/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "feathers"
7
+ s.version = Feathers::VERSION
8
+ s.authors = ["Kelli Shaver"]
9
+ s.email = ["kelli@kellishaver.com"]
10
+ s.homepage = "https://github.com/kellishaver/feathers"
11
+ s.summary = %q{Lightweight CSS boilerplate with sensible defaults}
12
+ s.description = %q{Feathers is a minimalist CSS reset and boilerplate with optional rules that can be 'layered in' to apply sensible defaults to common widgets, such as navigation, forms, buttons, and menus}
13
+ s.license = "MIT"
14
+
15
+ s.rubyforge_project = "feathers"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency "rails", ">= 3.0", "< 4.1.0"
21
+ #s.add_development_dependency "bundler", "~> 1.3"
22
+ #s.add_development_dependency "rake"
23
+ end
data/lib/feathers.rb ADDED
@@ -0,0 +1,8 @@
1
+ require "rails"
2
+
3
+ module Feathers
4
+ require "feathers/config"
5
+ require "feathers/rails/engine"
6
+ require "feathers/rails/railtie"
7
+ require "feathers/version"
8
+ end
@@ -0,0 +1,67 @@
1
+ module Feathers
2
+ class Config
3
+ class << self
4
+
5
+ attr_reader :light_1,
6
+ :light_2,
7
+ :medium_1,
8
+ :medium_2,
9
+ :dark_1,
10
+ :dark_2,
11
+ :highlight,
12
+ :notice_background,
13
+ :warning_background,
14
+ :error_background,
15
+ :note_background,
16
+ :default_element,
17
+ :danger_element,
18
+ :info_element,
19
+ :success_element,
20
+ :warning_element,
21
+ :black,
22
+ :white
23
+
24
+ attr_writer :light_1,
25
+ :light_2,
26
+ :medium_1,
27
+ :medium_2,
28
+ :dark_1,
29
+ :dark_2,
30
+ :highlight,
31
+ :notice_background,
32
+ :warning_border,
33
+ :warning_background,
34
+ :error_background,
35
+ :note_background,
36
+ :default_element,
37
+ :danger_element,
38
+ :info_element,
39
+ :success_element,
40
+ :warning_element,
41
+ :black,
42
+ :white
43
+
44
+ def set_defaults
45
+ @light_1 = "#efefef"
46
+ @light_2 = "#ddd"
47
+ @medium_1 = "#ccc"
48
+ @medium_2 = "#aaa"
49
+ @dark_1 = "#777"
50
+ @dark_2 = "#444"
51
+ @highlight = "#ffe"
52
+ @notice_background = "#ecffd6"
53
+ @warning_background = "#fbefb9"
54
+ @error_background = "#ffebeb"
55
+ @note_background = "#d8f2ff"
56
+ @default_element = "#ccc"
57
+ @danger_element = "#cf0404"
58
+ @info_element = "#448ccb"
59
+ @success_element = "#7ba900"
60
+ @warning_element = "#f3a24d"
61
+ @black = "#000"
62
+ @white = "#fff"
63
+ end
64
+
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,6 @@
1
+ module Feathers
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ require 'feathers'
2
+
3
+ class Railtie < Rails::Railtie
4
+ initializer "Configure Feathers" do
5
+ Feathers::Config.set_defaults
6
+ filename = File.join(Rails.root.to_s, 'config/initializers/feathers.rb')
7
+ load filename if File.exists?(filename)
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Feathers
2
+ VERSION = "0.1.1"
3
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: feathers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Kelli Shaver
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ - - <
21
+ - !ruby/object:Gem::Version
22
+ version: 4.1.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '3.0'
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: 4.1.0
33
+ description: Feathers is a minimalist CSS reset and boilerplate with optional rules
34
+ that can be 'layered in' to apply sensible defaults to common widgets, such as navigation,
35
+ forms, buttons, and menus
36
+ email:
37
+ - kelli@kellishaver.com
38
+ executables: []
39
+ extensions: []
40
+ extra_rdoc_files: []
41
+ files:
42
+ - .gitignore
43
+ - Gemfile
44
+ - README.md
45
+ - Rakefile
46
+ - app/assets/stylesheets/base.css.scss.erb
47
+ - app/assets/stylesheets/buttons.css.scss.erb
48
+ - app/assets/stylesheets/flash-messages.css.scss.erb
49
+ - app/assets/stylesheets/forms.css.scss.erb
50
+ - app/assets/stylesheets/menus.css.scss.erb
51
+ - app/assets/stylesheets/mixins.scss
52
+ - app/assets/stylesheets/other-widgets.css.scss.erb
53
+ - app/assets/stylesheets/tables.css.scss.erb
54
+ - feathers.gemspec
55
+ - lib/feathers.rb
56
+ - lib/feathers/config.rb
57
+ - lib/feathers/rails/engine.rb
58
+ - lib/feathers/rails/railtie.rb
59
+ - lib/feathers/version.rb
60
+ homepage: https://github.com/kellishaver/feathers
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project: feathers
80
+ rubygems_version: 2.0.3
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Lightweight CSS boilerplate with sensible defaults
84
+ test_files: []