shoestrap-rails 0.0.1

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.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.md +22 -0
  5. data/README.md +3 -0
  6. data/Rakefile +80 -0
  7. data/assets/stylesheets/_shoestrap.scss +23 -0
  8. data/assets/stylesheets/shoestrap/_grid.scss +84 -0
  9. data/assets/stylesheets/shoestrap/_mixins.scss +18 -0
  10. data/assets/stylesheets/shoestrap/_normalize.scss +427 -0
  11. data/assets/stylesheets/shoestrap/_print.scss +90 -0
  12. data/assets/stylesheets/shoestrap/_scaffolding.scss +161 -0
  13. data/assets/stylesheets/shoestrap/_type.scss +299 -0
  14. data/assets/stylesheets/shoestrap/_utilities.scss +21 -0
  15. data/assets/stylesheets/shoestrap/_variables.scss +240 -0
  16. data/assets/stylesheets/shoestrap/mixins/_background-variant.scss +12 -0
  17. data/assets/stylesheets/shoestrap/mixins/_clearfix.scss +22 -0
  18. data/assets/stylesheets/shoestrap/mixins/_grid-framework.scss +81 -0
  19. data/assets/stylesheets/shoestrap/mixins/_grid.scss +122 -0
  20. data/assets/stylesheets/shoestrap/mixins/_image.scss +33 -0
  21. data/assets/stylesheets/shoestrap/mixins/_reset-text.scss +18 -0
  22. data/assets/stylesheets/shoestrap/mixins/_tab-focus.scss +9 -0
  23. data/assets/stylesheets/shoestrap/mixins/_text-emphasis.scss +12 -0
  24. data/assets/stylesheets/shoestrap/mixins/_text-overflow.scss +8 -0
  25. data/assets/stylesheets/shoestrap/mixins/_vendor-prefixes.scss +222 -0
  26. data/lib/shoestrap-rails.rb +57 -0
  27. data/lib/shoestrap-rails/engine.rb +9 -0
  28. data/lib/shoestrap-rails/version.rb +3 -0
  29. data/shoestrap-rails.gemspec +35 -0
  30. data/test/compilation_test.rb +18 -0
  31. data/test/dummy_rails/README.rdoc +3 -0
  32. data/test/dummy_rails/Rakefile +6 -0
  33. data/test/dummy_rails/app/assets/images/.keep +0 -0
  34. data/test/dummy_rails/app/assets/javascripts/application.js +1 -0
  35. data/test/dummy_rails/app/assets/stylesheets/application.sass +1 -0
  36. data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
  37. data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
  38. data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
  39. data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
  40. data/test/dummy_rails/app/views/pages/root.html.slim +84 -0
  41. data/test/dummy_rails/config.ru +4 -0
  42. data/test/dummy_rails/config/application.rb +30 -0
  43. data/test/dummy_rails/config/boot.rb +5 -0
  44. data/test/dummy_rails/config/environment.rb +5 -0
  45. data/test/dummy_rails/config/environments/development.rb +23 -0
  46. data/test/dummy_rails/config/environments/production.rb +82 -0
  47. data/test/dummy_rails/config/environments/test.rb +38 -0
  48. data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy_rails/config/initializers/inflections.rb +16 -0
  51. data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
  52. data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
  53. data/test/dummy_rails/config/initializers/session_store.rb +3 -0
  54. data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
  55. data/test/dummy_rails/config/locales/en.yml +3 -0
  56. data/test/dummy_rails/config/locales/es.yml +3 -0
  57. data/test/dummy_rails/config/routes.rb +3 -0
  58. data/test/dummy_rails/log/.keep +0 -0
  59. data/test/dummy_rails/log/production.log +0 -0
  60. data/test/dummy_rails/log/test.log +264 -0
  61. data/test/dummy_sass_only/Gemfile +4 -0
  62. data/test/dummy_sass_only/compile.rb +13 -0
  63. data/test/dummy_sass_only/import_all.sass +1 -0
  64. data/test/gemfiles/rails_head.gemfile +17 -0
  65. data/test/gemfiles/rails_head.gemfile.lock +214 -0
  66. data/test/gemfiles/sass_3_3.gemfile +6 -0
  67. data/test/gemfiles/sass_3_3.gemfile.lock +171 -0
  68. data/test/gemfiles/sass_3_4.gemfile +7 -0
  69. data/test/gemfiles/sass_3_4.gemfile.lock +171 -0
  70. data/test/gemfiles/sass_head.gemfile +6 -0
  71. data/test/gemfiles/sass_head.gemfile.lock +183 -0
  72. data/test/pages_test.rb +15 -0
  73. data/test/sass_test.rb +22 -0
  74. data/test/sprockets_rails_test.rb +27 -0
  75. data/test/support/dummy_rails_integration.rb +22 -0
  76. data/test/support/reporting.rb +27 -0
  77. data/test/test_helper.rb +36 -0
  78. data/test/test_helper_rails.rb +6 -0
  79. metadata +352 -0
@@ -0,0 +1,90 @@
1
+ /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
2
+
3
+ // ==========================================================================
4
+ // Print styles.
5
+ // Inlined to avoid the additional HTTP request: h5bp.com/r
6
+ // ==========================================================================
7
+
8
+ @media print {
9
+ *,
10
+ *:before,
11
+ *:after {
12
+ background: transparent !important;
13
+ color: #000 !important; // Black prints faster: h5bp.com/s
14
+ box-shadow: none !important;
15
+ text-shadow: none !important;
16
+ }
17
+
18
+ a,
19
+ a:visited {
20
+ text-decoration: underline;
21
+ }
22
+
23
+ a[href]:after {
24
+ content: " (" attr(href) ")";
25
+ }
26
+
27
+ abbr[title]:after {
28
+ content: " (" attr(title) ")";
29
+ }
30
+
31
+ // Don't show links that are fragment identifiers,
32
+ // or use the `javascript:` pseudo protocol
33
+ a[href^="#"]:after,
34
+ a[href^="javascript:"]:after {
35
+ content: "";
36
+ }
37
+ pre,
38
+ blockquote {
39
+ border: 1px solid #999;
40
+ page-break-inside: avoid;
41
+ }
42
+ thead {
43
+ display: table-header-group; // h5bp.com/t
44
+ }
45
+ tr,
46
+ img {
47
+ page-break-inside: avoid;
48
+ }
49
+ img {
50
+ max-width: 100% !important;
51
+ }
52
+ p,
53
+ h2,
54
+ h3 {
55
+ orphans: 3;
56
+ widows: 3;
57
+ }
58
+ h2,
59
+ h3 {
60
+ page-break-after: avoid;
61
+ }
62
+ // Bootstrap specific changes start
63
+ // Bootstrap components
64
+ .navbar {
65
+ display: none;
66
+ }
67
+ .btn,
68
+ .dropup > .btn {
69
+ > .caret {
70
+ border-top-color: #000 !important;
71
+ }
72
+ }
73
+ .label {
74
+ border: 1px solid #000;
75
+ }
76
+ .table {
77
+ border-collapse: collapse !important;
78
+ td,
79
+ th {
80
+ background-color: #fff !important;
81
+ }
82
+ }
83
+ .table-bordered {
84
+ th,
85
+ td {
86
+ border: 1px solid #ddd !important;
87
+ }
88
+ }
89
+ // Bootstrap specific changes end
90
+ }
@@ -0,0 +1,161 @@
1
+ //
2
+ // Scaffolding
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Reset the box-sizing
7
+ //
8
+ // Heads up! This reset may cause conflicts with some third-party widgets.
9
+ // For recommendations on resolving such conflicts, see
10
+ // http://getbootstrap.com/getting-started/#third-box-sizing
11
+ * {
12
+ @include box-sizing(border-box);
13
+ }
14
+ *:before,
15
+ *:after {
16
+ @include box-sizing(border-box);
17
+ }
18
+
19
+
20
+ // Body reset
21
+
22
+ html {
23
+ font-size: 10px;
24
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
25
+ }
26
+
27
+ body {
28
+ font-family: $font-family-base;
29
+ font-size: $font-size-base;
30
+ line-height: $line-height-base;
31
+ color: $text-color;
32
+ background-color: $body-bg;
33
+ }
34
+
35
+ // Reset fonts for relevant elements
36
+ input,
37
+ button,
38
+ select,
39
+ textarea {
40
+ font-family: inherit;
41
+ font-size: inherit;
42
+ line-height: inherit;
43
+ }
44
+
45
+
46
+ // Links
47
+
48
+ a {
49
+ color: $link-color;
50
+ text-decoration: none;
51
+
52
+ &:hover,
53
+ &:focus {
54
+ color: $link-hover-color;
55
+ text-decoration: $link-hover-decoration;
56
+ }
57
+
58
+ &:focus {
59
+ @include tab-focus;
60
+ }
61
+ }
62
+
63
+
64
+ // Figures
65
+ //
66
+ // We reset this here because previously Normalize had no `figure` margins. This
67
+ // ensures we don't break anyone's use of the element.
68
+
69
+ figure {
70
+ margin: 0;
71
+ }
72
+
73
+
74
+ // Images
75
+
76
+ img {
77
+ vertical-align: middle;
78
+ }
79
+
80
+ // Responsive images (ensure images don't scale beyond their parents)
81
+ .img-responsive {
82
+ @include img-responsive;
83
+ }
84
+
85
+ // Rounded corners
86
+ .img-rounded {
87
+ border-radius: $border-radius-large;
88
+ }
89
+
90
+ // Image thumbnails
91
+ //
92
+ // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
93
+ .img-thumbnail {
94
+ padding: $thumbnail-padding;
95
+ line-height: $line-height-base;
96
+ background-color: $thumbnail-bg;
97
+ border: 1px solid $thumbnail-border;
98
+ border-radius: $thumbnail-border-radius;
99
+ @include transition(all .2s ease-in-out);
100
+
101
+ // Keep them at most 100% wide
102
+ @include img-responsive(inline-block);
103
+ }
104
+
105
+ // Perfect circle
106
+ .img-circle {
107
+ border-radius: 50%; // set radius in percents
108
+ }
109
+
110
+
111
+ // Horizontal rules
112
+
113
+ hr {
114
+ margin-top: $line-height-computed;
115
+ margin-bottom: $line-height-computed;
116
+ border: 0;
117
+ border-top: 1px solid $hr-border;
118
+ }
119
+
120
+
121
+ // Only display content to screen readers
122
+ //
123
+ // See: http://a11yproject.com/posts/how-to-hide-content/
124
+
125
+ .sr-only {
126
+ position: absolute;
127
+ width: 1px;
128
+ height: 1px;
129
+ margin: -1px;
130
+ padding: 0;
131
+ overflow: hidden;
132
+ clip: rect(0,0,0,0);
133
+ border: 0;
134
+ }
135
+
136
+ // Use in conjunction with .sr-only to only display content when it's focused.
137
+ // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138
+ // Credit: HTML5 Boilerplate
139
+
140
+ .sr-only-focusable {
141
+ &:active,
142
+ &:focus {
143
+ position: static;
144
+ width: auto;
145
+ height: auto;
146
+ margin: 0;
147
+ overflow: visible;
148
+ clip: auto;
149
+ }
150
+ }
151
+
152
+
153
+ // iOS "clickable elements" fix for role="button"
154
+ //
155
+ // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
156
+ // for traditionally non-focusable elements with role="button"
157
+ // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
158
+
159
+ [role="button"] {
160
+ cursor: pointer;
161
+ }
@@ -0,0 +1,299 @@
1
+
2
+ //
3
+ // Typography
4
+ // --------------------------------------------------
5
+
6
+
7
+ // Headings
8
+ // -------------------------
9
+
10
+ h1, h2, h3, h4, h5, h6,
11
+ .h1, .h2, .h3, .h4, .h5, .h6 {
12
+ font-family: $headings-font-family;
13
+ font-weight: $headings-font-weight;
14
+ line-height: $headings-line-height;
15
+ color: $headings-color;
16
+
17
+ small,
18
+ .small {
19
+ font-weight: normal;
20
+ line-height: 1;
21
+ color: $headings-small-color;
22
+ }
23
+ }
24
+
25
+ h1, .h1,
26
+ h2, .h2,
27
+ h3, .h3 {
28
+ margin-top: $line-height-computed;
29
+ margin-bottom: ($line-height-computed / 2);
30
+
31
+ small,
32
+ .small {
33
+ font-size: 65%;
34
+ }
35
+ }
36
+ h4, .h4,
37
+ h5, .h5,
38
+ h6, .h6 {
39
+ margin-top: ($line-height-computed / 2);
40
+ margin-bottom: ($line-height-computed / 2);
41
+
42
+ small,
43
+ .small {
44
+ font-size: 75%;
45
+ }
46
+ }
47
+
48
+ h1, .h1 { font-size: $font-size-h1; }
49
+ h2, .h2 { font-size: $font-size-h2; }
50
+ h3, .h3 { font-size: $font-size-h3; }
51
+ h4, .h4 { font-size: $font-size-h4; }
52
+ h5, .h5 { font-size: $font-size-h5; }
53
+ h6, .h6 { font-size: $font-size-h6; }
54
+
55
+
56
+ // Body text
57
+ // -------------------------
58
+
59
+ p {
60
+ margin: 0 0 ($line-height-computed / 2);
61
+ }
62
+
63
+ .lead {
64
+ margin-bottom: $line-height-computed;
65
+ font-size: floor(($font-size-base * 1.15));
66
+ font-weight: 300;
67
+ line-height: 1.4;
68
+
69
+ @media (min-width: $screen-sm-min) {
70
+ font-size: ($font-size-base * 1.5);
71
+ }
72
+ }
73
+
74
+
75
+ // Emphasis & misc
76
+ // -------------------------
77
+
78
+ // Ex: (12px small font / 14px base font) * 100% = about 85%
79
+ small,
80
+ .small {
81
+ font-size: floor((100% * $font-size-small / $font-size-base));
82
+ }
83
+
84
+ mark,
85
+ .mark {
86
+ background-color: $state-warning-bg;
87
+ padding: .2em;
88
+ }
89
+
90
+ // Alignment
91
+ .text-left { text-align: left; }
92
+ .text-right { text-align: right; }
93
+ .text-center { text-align: center; }
94
+ .text-justify { text-align: justify; }
95
+ .text-nowrap { white-space: nowrap; }
96
+
97
+ // Transformation
98
+ .text-lowercase { text-transform: lowercase; }
99
+ .text-uppercase { text-transform: uppercase; }
100
+ .text-capitalize { text-transform: capitalize; }
101
+
102
+ // Contextual colors
103
+ .text-muted {
104
+ color: $text-muted;
105
+ }
106
+
107
+ @include text-emphasis-variant('.text-primary', $brand-primary);
108
+
109
+ @include text-emphasis-variant('.text-success', $state-success-text);
110
+
111
+ @include text-emphasis-variant('.text-info', $state-info-text);
112
+
113
+ @include text-emphasis-variant('.text-warning', $state-warning-text);
114
+
115
+ @include text-emphasis-variant('.text-danger', $state-danger-text);
116
+
117
+ // Contextual backgrounds
118
+ // For now we'll leave these alongside the text classes until v4 when we can
119
+ // safely shift things around (per SemVer rules).
120
+ .bg-primary {
121
+ // Given the contrast here, this is the only class to have its color inverted
122
+ // automatically.
123
+ color: #fff;
124
+ }
125
+ @include bg-variant('.bg-primary', $brand-primary);
126
+
127
+ @include bg-variant('.bg-success', $state-success-bg);
128
+
129
+ @include bg-variant('.bg-info', $state-info-bg);
130
+
131
+ @include bg-variant('.bg-warning', $state-warning-bg);
132
+
133
+ @include bg-variant('.bg-danger', $state-danger-bg);
134
+
135
+
136
+ // Page header
137
+ // -------------------------
138
+
139
+ .page-header {
140
+ padding-bottom: (($line-height-computed / 2) - 1);
141
+ margin: ($line-height-computed * 2) 0 $line-height-computed;
142
+ border-bottom: 1px solid $page-header-border-color;
143
+ }
144
+
145
+
146
+ // Lists
147
+ // -------------------------
148
+
149
+ // Unordered and Ordered lists
150
+ ul,
151
+ ol {
152
+ margin-top: 0;
153
+ margin-bottom: ($line-height-computed / 2);
154
+ ul,
155
+ ol {
156
+ margin-bottom: 0;
157
+ }
158
+ }
159
+
160
+ // List options
161
+
162
+ // [converter] extracted from `.list-unstyled` for libsass compatibility
163
+ @mixin list-unstyled {
164
+ padding-left: 0;
165
+ list-style: none;
166
+ }
167
+ // [converter] extracted as `@mixin list-unstyled` for libsass compatibility
168
+ .list-unstyled {
169
+ @include list-unstyled;
170
+ }
171
+
172
+
173
+ // Inline turns list items into inline-block
174
+ .list-inline {
175
+ @include list-unstyled;
176
+ margin-left: -5px;
177
+
178
+ > li {
179
+ display: inline-block;
180
+ padding-left: 5px;
181
+ padding-right: 5px;
182
+ }
183
+ }
184
+
185
+ // Description Lists
186
+ dl {
187
+ margin-top: 0; // Remove browser default
188
+ margin-bottom: $line-height-computed;
189
+ }
190
+ dt,
191
+ dd {
192
+ line-height: $line-height-base;
193
+ }
194
+ dt {
195
+ font-weight: bold;
196
+ }
197
+ dd {
198
+ margin-left: 0; // Undo browser default
199
+ }
200
+
201
+ // Horizontal description lists
202
+ //
203
+ // Defaults to being stacked without any of the below styles applied, until the
204
+ // grid breakpoint is reached (default of ~768px).
205
+
206
+ .dl-horizontal {
207
+ dd {
208
+ @include clearfix; // Clear the floated `dt` if an empty `dd` is present
209
+ }
210
+
211
+ @media (min-width: $dl-horizontal-breakpoint) {
212
+ dt {
213
+ float: left;
214
+ width: ($dl-horizontal-offset - 20);
215
+ clear: left;
216
+ text-align: right;
217
+ @include text-overflow;
218
+ }
219
+ dd {
220
+ margin-left: $dl-horizontal-offset;
221
+ }
222
+ }
223
+ }
224
+
225
+
226
+ // Misc
227
+ // -------------------------
228
+
229
+ // Abbreviations and acronyms
230
+ abbr[title],
231
+ // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
232
+ abbr[data-original-title] {
233
+ cursor: help;
234
+ border-bottom: 1px dotted $abbr-border-color;
235
+ }
236
+ .initialism {
237
+ font-size: 90%;
238
+ @extend .text-uppercase;
239
+ }
240
+
241
+ // Blockquotes
242
+ blockquote {
243
+ padding: ($line-height-computed / 2) $line-height-computed;
244
+ margin: 0 0 $line-height-computed;
245
+ font-size: $blockquote-font-size;
246
+ border-left: 5px solid $blockquote-border-color;
247
+
248
+ p,
249
+ ul,
250
+ ol {
251
+ &:last-child {
252
+ margin-bottom: 0;
253
+ }
254
+ }
255
+
256
+ // Note: Deprecated small and .small as of v3.1.0
257
+ // Context: https://github.com/twbs/bootstrap/issues/11660
258
+ footer,
259
+ small,
260
+ .small {
261
+ display: block;
262
+ font-size: 80%; // back to default font-size
263
+ line-height: $line-height-base;
264
+ color: $blockquote-small-color;
265
+
266
+ &:before {
267
+ content: '\2014 \00A0'; // em dash, nbsp
268
+ }
269
+ }
270
+ }
271
+
272
+ // Opposite alignment of blockquote
273
+ //
274
+ // Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
275
+ .blockquote-reverse,
276
+ blockquote.pull-right {
277
+ padding-right: 15px;
278
+ padding-left: 0;
279
+ border-right: 5px solid $blockquote-border-color;
280
+ border-left: 0;
281
+ text-align: right;
282
+
283
+ // Account for citation
284
+ footer,
285
+ small,
286
+ .small {
287
+ &:before { content: ''; }
288
+ &:after {
289
+ content: '\00A0 \2014'; // nbsp, em dash
290
+ }
291
+ }
292
+ }
293
+
294
+ // Addresses
295
+ address {
296
+ margin-bottom: $line-height-computed;
297
+ font-style: normal;
298
+ line-height: $line-height-base;
299
+ }