bones-rails 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/README.md +29 -7
  2. data/app/assets/stylesheets/bones.scss +65 -0
  3. data/app/assets/stylesheets/bones/config/bones_config.scss +262 -0
  4. data/app/assets/stylesheets/bones/helpers/_background.scss +138 -0
  5. data/app/assets/stylesheets/bones/helpers/_border.scss +138 -0
  6. data/app/assets/stylesheets/bones/helpers/_color.scss +138 -0
  7. data/app/assets/stylesheets/bones/helpers/_margin.scss +82 -0
  8. data/app/assets/stylesheets/bones/helpers/_padding.scss +82 -0
  9. data/app/assets/stylesheets/bones/helpers/_positioning.scss +24 -0
  10. data/app/assets/stylesheets/bones/helpers/_size.scss +34 -0
  11. data/app/assets/stylesheets/bones/mixins/_buttons.scss +19 -0
  12. data/app/assets/stylesheets/bones/mixins/_forms.scss +15 -0
  13. data/app/assets/stylesheets/bones/mixins/_globals.scss +15 -0
  14. data/app/assets/stylesheets/bones/mixins/_grid.scss +4 -0
  15. data/app/assets/stylesheets/bones/mixins/_nav.scss +41 -0
  16. data/app/assets/stylesheets/bones/mixins/_typography.scss +15 -0
  17. data/app/assets/stylesheets/bones/partials/_buttons.scss +86 -0
  18. data/app/assets/stylesheets/bones/partials/_code.scss +99 -0
  19. data/app/assets/stylesheets/bones/partials/_components.scss +22 -0
  20. data/app/assets/stylesheets/bones/partials/_forms.scss +49 -0
  21. data/app/assets/stylesheets/bones/partials/_globals.scss +27 -0
  22. data/app/assets/stylesheets/bones/partials/_grid.scss +112 -0
  23. data/app/assets/stylesheets/bones/partials/_images.scss +52 -0
  24. data/app/assets/stylesheets/bones/partials/_nav.scss +111 -0
  25. data/app/assets/stylesheets/bones/partials/_tables.scss +19 -0
  26. data/app/assets/stylesheets/bones/partials/_typography.scss +174 -0
  27. data/app/assets/stylesheets/bones/variables/_buttons.scss +16 -0
  28. data/app/assets/stylesheets/bones/variables/_code.scss +15 -0
  29. data/app/assets/stylesheets/bones/variables/_colors.scss +122 -0
  30. data/app/assets/stylesheets/bones/variables/_forms.scss +12 -0
  31. data/app/assets/stylesheets/bones/variables/_globals.scss +12 -0
  32. data/app/assets/stylesheets/bones/variables/_grid.scss +8 -0
  33. data/app/assets/stylesheets/bones/variables/_helpers.scss +9 -0
  34. data/app/assets/stylesheets/bones/variables/_images.scss +13 -0
  35. data/app/assets/stylesheets/bones/variables/_nav.scss +40 -0
  36. data/app/assets/stylesheets/bones/variables/_tables.scss +7 -0
  37. data/app/assets/stylesheets/bones/variables/_typography.scss +61 -0
  38. data/app/assets/stylesheets/bones/vendor/_normalize.scss +406 -0
  39. data/bones-rails.gemspec +11 -10
  40. data/lib/bones/generators/install_generator.rb +18 -0
  41. data/lib/bones/rails.rb +2 -3
  42. data/lib/bones/rails/version.rb +1 -3
  43. metadata +67 -8
  44. checksums.yaml +0 -15
  45. data/app/assets/stylesheets/bones.css +0 -1
data/README.md CHANGED
@@ -1,24 +1,46 @@
1
- # Bones::Rails
1
+ # Bones for Rails
2
2
 
3
- TODO: Write a gem description
3
+ Bones for Rails packages up the current build of Bones CSS Framework and inserts it into the asset pipeline to help streamline the design of your application.
4
4
 
5
- ## Installation
5
+ ## WARNING
6
+
7
+ Please note that Bones is still undergoing a rewrite, and Bones for Rails follows right behind it. Bones will be documented after the rewrite is complete.
8
+
9
+ ## Getting Started
6
10
 
7
11
  Add this line to your application's Gemfile:
8
12
 
9
13
  gem 'bones-rails'
10
14
 
11
- And then execute:
15
+ Install using:
12
16
 
13
- $ bundle
17
+ $ bundle install
14
18
 
15
- Or install it yourself as:
19
+ Or install it to your system:
16
20
 
17
21
  $ gem install bones-rails
18
22
 
19
23
  ## Usage
20
24
 
21
- TODO: Write usage instructions here
25
+ We can add the necesasry files to the asset pipeline by running:
26
+
27
+ $ rails g bones:install
28
+
29
+ The installation generator performs two tasks:
30
+
31
+ ### 1. Manifest File
32
+
33
+ It adds the following line to the top of your `application.scss` file:
34
+
35
+ @import 'bones';
36
+
37
+ Note: this requires your application stylesheet to use the sass file extension -- `.scss`.
38
+
39
+ ### 2. Configuration File
40
+
41
+ The generator also creates a file: `app/assets/stylesheets/bones_config.scss`. This file comes equipped with all the variables available in the Bones framework.
42
+
43
+ This file is loaded from the Bones manifest file. Therefore, it must remain in the exact location with the same filename.
22
44
 
23
45
  ## Contributing
24
46
 
@@ -0,0 +1,65 @@
1
+ /*
2
+ ==========================
3
+ Bones CSS Framework
4
+ ==========================
5
+
6
+ This is the manifest file for Bones' CSS. It's purpose is to bring all files together.
7
+
8
+ --------------------------
9
+
10
+ docs on using files coming ...
11
+
12
+ */
13
+
14
+ // vendor
15
+ @import
16
+ 'bones/vendor/normalize'; // normalizes for cross-browser consistency
17
+
18
+ // variables
19
+ @import
20
+ 'bones/variables/colors',
21
+ 'bones/variables/globals',
22
+ 'bones/variables/grid',
23
+ 'bones/variables/typography',
24
+ 'bones/variables/code',
25
+ 'bones/variables/buttons',
26
+ 'bones/variables/forms',
27
+ 'bones/variables/tables',
28
+ 'bones/variables/nav',
29
+ 'bones/variables/images',
30
+ 'bones/variables/helpers';
31
+
32
+ // custom variables
33
+ @import 'bones_config';
34
+
35
+ // mixins
36
+ @import
37
+ 'bones/mixins/globals',
38
+ 'bones/mixins/grid',
39
+ 'bones/mixins/typography',
40
+ 'bones/mixins/buttons',
41
+ 'bones/mixins/forms',
42
+ 'bones/mixins/nav';
43
+
44
+ // partials
45
+ @import
46
+ 'bones/partials/globals',
47
+ 'bones/partials/grid',
48
+ 'bones/partials/typography',
49
+ 'bones/partials/code',
50
+ 'bones/partials/buttons',
51
+ 'bones/partials/forms',
52
+ 'bones/partials/tables',
53
+ 'bones/partials/nav',
54
+ 'bones/partials/images',
55
+ 'bones/partials/components';
56
+
57
+ // helpers
58
+ @import
59
+ 'bones/helpers/margin',
60
+ 'bones/helpers/padding',
61
+ 'bones/helpers/positioning',
62
+ 'bones/helpers/color',
63
+ 'bones/helpers/background',
64
+ 'bones/helpers/border',
65
+ 'bones/helpers/size';
@@ -0,0 +1,262 @@
1
+ // buttons
2
+ $button-color: $accent-light;
3
+ $button-background-color: $primary;
4
+ $button-hover-background-color: $primary-dark;
5
+ $button-active-background-color: $primary-darker;
6
+
7
+ // default styles
8
+ $button-border: none;
9
+ $button-padding: 0.65em 1em;
10
+ $button-margin: $default-margin;
11
+ $button-font-size: $default-font-size;
12
+
13
+ // size
14
+ $button-huge-font-size: 200%;
15
+ $button-large-font-size: 150%;
16
+ $button-small-font-size: 75%;
17
+
18
+ // code
19
+ $code-font-family: Consolas, monospace;
20
+ $code-color: $code;
21
+ $code-font-size: 12px;
22
+ $code-background: $accent-light;
23
+ $code-padding: 1px 2px;
24
+ $code-border: $accent-light-dark;
25
+
26
+ // code block
27
+ $code-block-margin: 1.25em 0;
28
+ $code-block-padding: 1.25em 0.75em;
29
+ $code-block-font-family: $code-font-family;
30
+ $code-block-color: $font;
31
+ $code-block-background: $accent-light;
32
+ $code-block-border: $accent-light-dark;
33
+ $code-block-font-size: 13px;
34
+ $code-block-line-height: 19px;
35
+
36
+ // palette
37
+ $primary: #1D9BC7; // blue
38
+ $accent-1: #E05432; // red/orange
39
+ $accent-2: #168719; // green
40
+ $accent-dark: #444444; // dark
41
+ $accent-light: #efefef; // light
42
+
43
+ $warning: #CCA300;
44
+ $danger: #CC0000;
45
+ $success: #008A2E;
46
+
47
+ // tones
48
+ $primary-light: #6BCEF0;
49
+ $primary-lighter: #AEE4F5;
50
+ $primary-lightest: lighten(#AEE4F5, 5%);
51
+ $primary-dark: darken($primary, 5%);
52
+ $primary-darker: darken($primary, 15%);
53
+ $primary-darkest: darken($primary, 25%);
54
+
55
+ $accent-1-light: lighten($accent-1, 5%);
56
+ $accent-1-lighter: lighten($accent-1, 15%);
57
+ $accent-1-lightest: lighten($accent-1, 25%);
58
+ $accent-1-dark: darken($accent-1, 5%);
59
+ $accent-1-darker: darken($accent-1, 15%);
60
+ $accent-1-darkest: darken($accent-1, 25%);
61
+
62
+ $accent-2-light: lighten($accent-2, 5%);
63
+ $accent-2-lighter: lighten($accent-2, 15%);
64
+ $accent-2-lightest: lighten($accent-2, 25%);
65
+ $accent-2-dark: darken($accent-2, 5%);
66
+ $accent-2-darker: darken($accent-2, 15%);
67
+ $accent-2-darkest: darken($accent-2, 25%);
68
+
69
+ $accent-dark-light: lighten($accent-dark, 5%);
70
+ $accent-dark-lighter: lighten($accent-dark, 15%);
71
+ $accent-dark-lightest: lighten($accent-dark, 25%);
72
+
73
+ $accent-light-dark: darken($accent-light, 5%);
74
+ $accent-light-darker: darken($accent-light, 15%);
75
+ $accent-light-darkest: darken($accent-light, 25%);
76
+
77
+ $success-dark: darken($success, 5%);
78
+ $success-darker: darken($success, 15%);
79
+ $success-darkest: darken($success, 25%);
80
+
81
+ $warning-dark: darken($warning, 5%);
82
+ $warning-darker: darken($warning, 15%);
83
+ $warning-darkest: darken($warning, 25%);
84
+
85
+ $danger-dark: darken($danger, 5%);
86
+ $danger-darker: darken($danger, 15%);
87
+ $danger-darkest: darken($danger, 25%);
88
+
89
+ // groups
90
+ $font: $accent-dark;
91
+ $code: $accent-1;
92
+ $shadow: $accent-light;
93
+
94
+ $form-margin: $default-margin;
95
+ $form-width: 100%;
96
+ $form-box-sizing: border-box;
97
+ $form-border: 1px solid $accent-light-darker;
98
+ $form-focus-outline: none;
99
+ $form-focus-border: 1px solid $primary;
100
+ $form-input-padding: 4px;
101
+ $form-radio-margin: 0 0 0.5em 0;
102
+
103
+ $form-fieldset-border: 1px solid $accent-light-darker;
104
+ $form-fieldset-legend-font-weight: 600;
105
+ $form-fieldset-legend-padding: 0 5px;
106
+
107
+ // ALL SIZING IS RELATIVE TO THIS VALUE
108
+ $default-font-size: 16px;
109
+
110
+ $default-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
111
+ $default-font-weight: 200;
112
+ $default-line-height: 1.25em;
113
+ $default-color: $font;
114
+ $default-margin: 0.75em 0;
115
+
116
+ $hr-color: $accent-light-dark;
117
+ $hr-height: 1px;
118
+ $hr-margin: $default-margin;
119
+
120
+ $container-width: 1200px;
121
+ $container-padding: 20px;
122
+
123
+ $grid-cols: 12;
124
+ $grid-col-margin: 0.5%;
125
+ $grid-col-padding: 0.5%;
126
+ $grid-col-margin-top-bottom: 0.5%;
127
+ $grid-col-padding-top-bottom: 0.5%;
128
+
129
+ // margin
130
+ $margin-small: 0.25em;
131
+ $margin-medium: 0.5em;
132
+ $margin-large: 0.75em;
133
+
134
+ // padding
135
+ $padding-small: 0.5em;
136
+ $padding-medium: 1em;
137
+ $padding-large: 1.5em;
138
+
139
+ // sizes
140
+ $img-thumb-width: 100px;
141
+ $img-medium-width: 250px;
142
+ $img-large-width: 400px;
143
+
144
+ // border and outlines
145
+ $img-outline-color: $accent-light-dark;
146
+ $img-frame-width: 0.5em;
147
+ $img-polaroid-frame-width: 0.75em;
148
+ $img-polaroid-bottom-width: 2.75em;
149
+
150
+ // panoramic
151
+ $img-panoramic-height: 200px;
152
+
153
+ // top bar
154
+ $nav-tb-padding: 0.5em 1.25em;
155
+ $nav-tb-font-size: 1.1em;
156
+ $nav-tb-background: transparent;
157
+ $nav-tb-color: $primary-light;
158
+ $nav-tb-background-hover: transparent;
159
+ $nav-tb-color-hover: $accent-light;
160
+
161
+ // horizontal
162
+ $nav-h-padding: $nav-tb-padding;
163
+ $nav-h-font-size: $nav-tb-font-size;
164
+ $nav-h-background: transparent;
165
+ $nav-h-color: $primary;
166
+ $nav-h-background-hover: $primary;
167
+ $nav-h-color-hover: $accent-light;
168
+
169
+ // vertical
170
+ $nav-v-padding: 0.5em;
171
+ $nav-v-font-size: 1em;
172
+ $nav-v-background: transparent;
173
+ $nav-v-color: $accent-light-darkest;
174
+ $nav-v-background-hover: transparent;
175
+ $nav-v-color-hover: $primary;
176
+
177
+ // filters
178
+ $nav-f-padding: 0.5em;
179
+ $nav-f-font-size: 0.9em;
180
+ $nav-f-background: transparent;
181
+ $nav-f-color: $primary;
182
+ $nav-f-background-hover: $primary;
183
+ $nav-f-color-hover: $accent-light;
184
+
185
+ // breadcrumbs
186
+ $nav-b-padding: 0.5em;
187
+ $nav-b-font-size: 0.9em;
188
+ $nav-b-background: transparent;
189
+ $nav-b-color: $primary-light;
190
+ $nav-b-background-hover: transparent;
191
+ $nav-b-color-hover: $primary;
192
+ $nav-b-separator: " \002F ";
193
+
194
+ $table-width: 100%;
195
+ $table-border: 1px solid $accent-light-darker;
196
+ $table-cell-padding: 5px 10px;
197
+ $table-header-background: $primary;
198
+ $table-header-color: $accent-light;
199
+ $table-header-font-weight: 400;
200
+ $table-cell-accent-background: $accent-light;
201
+
202
+ // apply to all headings
203
+ $heading-margin: $default-margin;
204
+ $heading-color: $font;
205
+ $heading-caps: false;
206
+ $heading-font-weight: 600;
207
+
208
+ // individual headings
209
+ $h1-font-size: 2.75em;
210
+ $h2-font-size: 2.4em;
211
+ $h3-font-size: 2.05em;
212
+ $h4-font-size: 1.7em;
213
+ $h5-font-size: 1.35em;
214
+ $h6-font-size: 1.0em;
215
+
216
+ // subheadings
217
+ $subheading-color: $accent-dark-lightest;
218
+ $subheading-font-weight: 200;
219
+ $subheading-size-factor: 0.75;
220
+
221
+ // small headings
222
+ $heading-small-factor: 60%;
223
+ $heading-small-color: $subheading-color;
224
+
225
+ // body copy
226
+ $paragraph-font: $default-font-size;
227
+ $paragraph-font-weight: $default-font-weight;
228
+ $paragraph-margin: $default-margin;
229
+ $paragraph-line-height: $default-line-height;
230
+ $paragraph-color: $font;
231
+
232
+ // blockquotes
233
+ $blockquote-padding: 0.25em 0.75em;
234
+ $blockquote-margin: $default-margin;
235
+ $blockquote-background: $accent-light;
236
+ $blockquote-border-left: 7.5px solid $accent-light-dark;
237
+ $blockquote-font-size: $default-font-size;
238
+
239
+ // links
240
+ $link-color: $primary;
241
+ $link-underline: false;
242
+ $link-hover-color: $primary-darker;
243
+ $link-hover-underline: false;
244
+
245
+ // individual characters
246
+ $small-font-factor: 60%;
247
+ $big-font-factor: 140%;
248
+ $strong-font-weight: 600;
249
+
250
+ // unordered lists
251
+ $ul-margin-left-level-1: -20px;
252
+ $ul-margin-left-level-2: 0;
253
+ $ul-style-type: disc;
254
+ $ul-line-height: 1.5;
255
+
256
+ // ordered lists
257
+ $ol-margin-left-level-1: $ul-margin-left-level-1;
258
+ $ol-margin-left-level-2: $ul-margin-left-level-2;
259
+ $ol-line-height: $ul-line-height;
260
+
261
+ // horizontal lists
262
+ $ul-h-padding: 0.5em 1.25em;
@@ -0,0 +1,138 @@
1
+ // primary
2
+ .bg-primary {
3
+ background-color: $primary !important;
4
+ }
5
+ .bg-primary-light {
6
+ background-color: $primary-light !important;
7
+ }
8
+ .bg-primary-lighter {
9
+ background-color: $primary-lighter !important;
10
+ }
11
+ .bg-primary-lightest {
12
+ background-color: $primary-lightest !important;
13
+ }
14
+ .bg-primary-dark {
15
+ background-color: $primary-dark !important;
16
+ }
17
+ .bg-primary-darker {
18
+ background-color: $primary-darker !important;
19
+ }
20
+ .bg-primary-darkest {
21
+ background-color: $primary-darkest !important;
22
+ }
23
+
24
+ // accent-1
25
+ .bg-accent-1 {
26
+ background-color: $accent-1 !important;
27
+ }
28
+ .bg-accent-1-light {
29
+ background-color: $accent-1-light !important;
30
+ }
31
+ .bg-accent-1-lighter {
32
+ background-color: $accent-1-lighter !important;
33
+ }
34
+ .bg-accent-1-lightest {
35
+ background-color: $accent-1-lightest !important;
36
+ }
37
+ .bg-accent-1-dark {
38
+ background-color: $accent-1-dark !important;
39
+ }
40
+ .bg-accent-1-darker {
41
+ background-color: $accent-1-darker !important;
42
+ }
43
+ .bg-accent-1-darkest {
44
+ background-color: $accent-1-darkest !important;
45
+ }
46
+
47
+ // accent-2
48
+ .bg-accent-2 {
49
+ background-color: $accent-2 !important;
50
+ }
51
+ .bg-accent-2-light {
52
+ background-color: $accent-2-light !important;
53
+ }
54
+ .bg-accent-2-lighter {
55
+ background-color: $accent-2-lighter !important;
56
+ }
57
+ .bg-accent-2-lightest {
58
+ background-color: $accent-2-lightest !important;
59
+ }
60
+ .bg-accent-2-dark {
61
+ background-color: $accent-2-dark !important;
62
+ }
63
+ .bg-accent-2-darker {
64
+ background-color: $accent-2-darker !important;
65
+ }
66
+ .bg-accent-2-darkest {
67
+ background-color: $accent-2-darkest !important;
68
+ }
69
+
70
+ // accent-light
71
+ .bg-accent-light {
72
+ background-color: $accent-light !important;
73
+ }
74
+ .bg-accent-light-dark {
75
+ background-color: $accent-light-dark !important;
76
+ }
77
+ .bg-accent-light-darker {
78
+ background-color: $accent-light-darker !important;
79
+ }
80
+ .bg-accent-light-darkest {
81
+ background-color: $accent-light-darkest !important;
82
+ }
83
+
84
+ // accent-dark
85
+ .bg-accent-dark {
86
+ background-color: $accent-dark !important;
87
+ }
88
+ .bg-accent-dark-light {
89
+ background-color: $accent-dark-light !important;
90
+ }
91
+ .bg-accent-dark-lighter {
92
+ background-color: $accent-dark-lighter !important;
93
+ }
94
+ .bg-accent-dark-lightest {
95
+ background-color: $accent-dark-lightest !important;
96
+ }
97
+
98
+ // success
99
+ .bg-success {
100
+ background-color: $success !important;
101
+ }
102
+ .bg-success-dark {
103
+ background-color: $success-dark !important;
104
+ }
105
+ .bg-success-darker {
106
+ background-color: $success-darker !important;
107
+ }
108
+ .bg-success-darkest {
109
+ background-color: $success-darkest !important;
110
+ }
111
+
112
+ // warning
113
+ .bg-warning {
114
+ background-color: $warning !important;
115
+ }
116
+ .bg-warning-dark {
117
+ background-color: $warning-dark !important;
118
+ }
119
+ .bg-warning-darker {
120
+ background-color: $warning-darker !important;
121
+ }
122
+ .bg-warning-darkest {
123
+ background-color: $warning-darkest !important;
124
+ }
125
+
126
+ // danger
127
+ .bg-danger {
128
+ background-color: $danger !important;
129
+ }
130
+ .bg-danger-dark {
131
+ background-color: $danger-dark !important;
132
+ }
133
+ .bg-danger-darker {
134
+ background-color: $danger-darker !important;
135
+ }
136
+ .bg-danger-darkest {
137
+ background-color: $danger-darkest !important;
138
+ }