fortitude-sass 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.npmignore +9 -0
  4. data/.scss-lint.yml +13 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +48 -0
  7. data/README.md +19 -0
  8. data/app/assets/javascripts/fortitude/jquery/blocks/flashbar.js +13 -0
  9. data/app/assets/javascripts/fortitude/jquery/blocks/select-input.js +26 -0
  10. data/app/assets/javascripts/fortitude/jquery/blocks/shade.js +48 -0
  11. data/app/assets/javascripts/fortitude/jquery/generic/transition-end.js +50 -0
  12. data/app/assets/javascripts/fortitude/jquery/generic/viewport.js +7 -0
  13. data/app/assets/javascripts/fortitude/jquery/index.js +3 -0
  14. data/app/assets/javascripts/fortitude.jquery.js +45 -0
  15. data/app/assets/stylesheets/fortitude/base/_hr.scss +10 -0
  16. data/app/assets/stylesheets/fortitude/base/_images.scss +32 -0
  17. data/app/assets/stylesheets/fortitude/base/_lists.scss +15 -0
  18. data/app/assets/stylesheets/fortitude/base/_page.scss +28 -0
  19. data/app/assets/stylesheets/fortitude/blocks/_badge.scss +141 -0
  20. data/app/assets/stylesheets/fortitude/blocks/_bare-list.scss +17 -0
  21. data/app/assets/stylesheets/fortitude/blocks/_block-list.scss +83 -0
  22. data/app/assets/stylesheets/fortitude/blocks/_box.scss +23 -0
  23. data/app/assets/stylesheets/fortitude/blocks/_button.scss +229 -0
  24. data/app/assets/stylesheets/fortitude/blocks/_container.scss +67 -0
  25. data/app/assets/stylesheets/fortitude/blocks/_flag.scss +426 -0
  26. data/app/assets/stylesheets/fortitude/blocks/_flashbar.scss +22 -0
  27. data/app/assets/stylesheets/fortitude/blocks/_fluid-container.scss +12 -0
  28. data/app/assets/stylesheets/fortitude/blocks/_inline-list.scss +19 -0
  29. data/app/assets/stylesheets/fortitude/blocks/_input.scss +377 -0
  30. data/app/assets/stylesheets/fortitude/blocks/_layout.scss +288 -0
  31. data/app/assets/stylesheets/fortitude/blocks/_list-navigation.scss +34 -0
  32. data/app/assets/stylesheets/fortitude/blocks/_media.scss +289 -0
  33. data/app/assets/stylesheets/fortitude/blocks/_shade.scss +51 -0
  34. data/app/assets/stylesheets/fortitude/blocks/_table.scss +31 -0
  35. data/app/assets/stylesheets/fortitude/blocks/_tabs-navigation.scss +58 -0
  36. data/app/assets/stylesheets/fortitude/blocks/_tabs.scss +19 -0
  37. data/app/assets/stylesheets/fortitude/blocks/_text.scss +67 -0
  38. data/app/assets/stylesheets/fortitude/blocks/_ui-list.scss +97 -0
  39. data/app/assets/stylesheets/fortitude/generic/_box-sizing.scss +23 -0
  40. data/app/assets/stylesheets/fortitude/generic/_clearfix.scss +3 -0
  41. data/app/assets/stylesheets/fortitude/generic/_normalize.scss +200 -0
  42. data/app/assets/stylesheets/fortitude/generic/_reset.scss +53 -0
  43. data/app/assets/stylesheets/fortitude/settings/_defaults.scss +58 -0
  44. data/app/assets/stylesheets/fortitude/tools/_functions.scss +115 -0
  45. data/app/assets/stylesheets/fortitude/tools/_mixins.scss +58 -0
  46. data/app/assets/stylesheets/fortitude/trumps/_responsive-border.scss +35 -0
  47. data/app/assets/stylesheets/fortitude/trumps/_responsive-column.scss +37 -0
  48. data/app/assets/stylesheets/fortitude/trumps/_responsive-display.scss +35 -0
  49. data/app/assets/stylesheets/fortitude/trumps/_responsive-float.scss +13 -0
  50. data/app/assets/stylesheets/fortitude/trumps/_responsive-font.scss +13 -0
  51. data/app/assets/stylesheets/fortitude/trumps/_responsive-height.scss +13 -0
  52. data/app/assets/stylesheets/fortitude/trumps/_responsive-line-height.scss +13 -0
  53. data/app/assets/stylesheets/fortitude/trumps/_responsive-margin.scss +129 -0
  54. data/app/assets/stylesheets/fortitude/trumps/_responsive-padding.scss +65 -0
  55. data/app/assets/stylesheets/fortitude/trumps/_responsive-text.scss +17 -0
  56. data/app/assets/stylesheets/fortitude.scss +40 -0
  57. data/bin/fortitude +6 -0
  58. data/bower.json +43 -0
  59. data/config.rb +36 -0
  60. data/dist/fortitude.css +5242 -0
  61. data/dist/fortitude.css.map +7 -0
  62. data/dist/fortitude.jquery.js +45 -0
  63. data/fortitude-black.png +0 -0
  64. data/fortitude.gemspec +32 -0
  65. data/fortitude.png +0 -0
  66. data/lib/fortitude-sass/engine.rb +5 -0
  67. data/lib/fortitude-sass/generator.rb +80 -0
  68. data/lib/fortitude-sass/version.rb +3 -0
  69. data/lib/fortitude-sass.rb +27 -0
  70. data/lib/tasks/install.rake +20 -0
  71. data/package.json +24 -0
  72. metadata +187 -0
@@ -0,0 +1,34 @@
1
+ /*------------------------------------*\
2
+ #list-navigation
3
+ \*------------------------------------*/
4
+
5
+ /**
6
+ * The list-navigation object simply removes any indents and bullet points from lists.
7
+ * and sets the list-navigation__link to `display: block;`
8
+ */
9
+
10
+ @mixin fortitude-list-navigation {
11
+ margin: 0;
12
+ padding: 0;
13
+ list-style: none;
14
+ }
15
+
16
+ @mixin fortitude-list-navigation__item {
17
+ display: block;
18
+ }
19
+
20
+ @mixin fortitude-list-navigation__link {
21
+ display: block;
22
+ }
23
+
24
+ .#{$fortitude-namespace}list-navigation {
25
+ @include fortitude-list-navigation;
26
+ }
27
+
28
+ .#{$fortitude-namespace}list-navigation__item {
29
+ @include fortitude-list-navigation__item;
30
+ }
31
+
32
+ .#{$fortitude-namespace}list-navigation__link {
33
+ @include fortitude-list-navigation__link;
34
+ }
@@ -0,0 +1,289 @@
1
+ /*------------------------------------*\
2
+ #MEDIA
3
+ \*------------------------------------*/
4
+
5
+ /**
6
+ * Place any image- and text-like content side-by-side, as per:
7
+ * stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code
8
+ */
9
+
10
+ // Predefine the variables below in order to alter and enable specific features.
11
+ $fortitude-media-gutter: $fortitude-base-spacing-unit !default;
12
+ $fortitude-media-gutter--small: halve($fortitude-media-gutter) !default;
13
+ $fortitude-media-gutter--large: double($fortitude-media-gutter) !default;
14
+
15
+ $fortitude-enable-media--small: false !default;
16
+ $fortitude-enable-media--large: false !default;
17
+ $fortitude-enable-media--rev: false !default;
18
+ $fortitude-enable-media--flush: false !default;
19
+ $fortitude-enable-media--responsive: false !default;
20
+ $fortitude-media-collapse-at: 720px !default;
21
+
22
+
23
+
24
+
25
+
26
+ @mixin fortitude-media {
27
+ @include fortitude-clearfix;
28
+ display: block;
29
+ }
30
+
31
+ @mixin fortitude-media__object {
32
+ float: left;
33
+ margin-right: $fortitude-media-gutter;
34
+
35
+ > img {
36
+ display: block;
37
+ margin-left: auto;
38
+ margin-right: auto;
39
+ }
40
+ }
41
+
42
+ @mixin fortitude-media__body {
43
+ overflow: hidden;
44
+ display: block;
45
+ }
46
+
47
+ @mixin fortitude-media--small__object {
48
+ margin-right: $fortitude-media-gutter--small;
49
+ }
50
+
51
+ @mixin fortitude-media--small--rev__object {
52
+ margin-right: 0;
53
+ margin-left: $fortitude-media-gutter--small;
54
+ }
55
+
56
+ @mixin fortitude-media--large__object {
57
+ margin-right: $fortitude-media-gutter--large;
58
+ }
59
+
60
+ @mixin fortitude-media--large--rev__object {
61
+ margin-right: 0;
62
+ margin-left: $fortitude-media-gutter--large;
63
+ }
64
+
65
+ @mixin fortitude-media--rev__object {
66
+ float: right;
67
+ margin-right: 0;
68
+ margin-left: $fortitude-media-gutter;
69
+ }
70
+
71
+ @mixin fortitude-media--flush__object {
72
+ margin-right: 0;
73
+ margin-left: 0;
74
+ }
75
+
76
+ @mixin fortitude-media--responsive__object {
77
+ float: none;
78
+ margin-right: 0;
79
+ margin-bottom: $fortitude-media-gutter;
80
+ margin-left: 0;
81
+ }
82
+
83
+ @mixin fortitude-media--responsive--small__object {
84
+ margin-right: 0;
85
+ margin-left: 0;
86
+ }
87
+
88
+ @mixin fortitude-media--responsive--large__object {
89
+ margin-right: 0;
90
+ margin-left: 0;
91
+ }
92
+
93
+
94
+
95
+ .#{$fortitude-namespace}media {
96
+ @include fortitude-media;
97
+ }
98
+
99
+ .#{$fortitude-namespace}media__object {
100
+ @include fortitude-media__object;
101
+ }
102
+
103
+ .#{$fortitude-namespace}media__body {
104
+ @include fortitude-media__body;
105
+ }
106
+
107
+
108
+
109
+
110
+
111
+ @if ($fortitude-enable-media--small == true) {
112
+
113
+ /**
114
+ * Small media objects.
115
+ */
116
+
117
+ .#{$fortitude-namespace}media--small {
118
+
119
+ > .#{$fortitude-namespace}media__object {
120
+ @include fortitude-media--small__object;
121
+ }
122
+
123
+ @if ($fortitude-enable-media--rev == true) {
124
+
125
+ /**
126
+ * Small reversed media objects.
127
+ */
128
+
129
+ &.#{$fortitude-namespace}media--rev {
130
+
131
+ > .#{$fortitude-namespace}media__object {
132
+ @include fortitude-media--small--rev__object;
133
+ }
134
+
135
+ }
136
+
137
+ }
138
+
139
+ }
140
+
141
+ }
142
+
143
+ @if ($fortitude-enable-media--large == true) {
144
+
145
+ /**
146
+ * Large media objects.
147
+ */
148
+
149
+ .#{$fortitude-namespace}media--large {
150
+
151
+ > .#{$fortitude-namespace}media__object {
152
+ @include fortitude-media--large__object;
153
+ }
154
+
155
+ @if ($fortitude-enable-media--rev == true) {
156
+
157
+ /**
158
+ * Large reversed media objects.
159
+ */
160
+
161
+ &.#{$fortitude-namespace}media--rev {
162
+
163
+ > .#{$fortitude-namespace}media__object {
164
+ @include fortitude-media--large--rev__object;
165
+ }
166
+
167
+ }
168
+
169
+ }
170
+
171
+ }
172
+
173
+ }
174
+
175
+
176
+
177
+
178
+
179
+ @if ($fortitude-enable-media--rev == true) {
180
+
181
+ /**
182
+ * Reversed image location (right instead of left). Extends `.media`.
183
+ */
184
+
185
+ .#{$fortitude-namespace}media--rev {
186
+
187
+ > .#{$fortitude-namespace}media__object {
188
+ @include fortitude-media--rev__object;
189
+ }
190
+
191
+ }
192
+
193
+ }
194
+
195
+
196
+
197
+
198
+
199
+ @if ($fortitude-enable-media--flush == true) {
200
+
201
+ /**
202
+ * Flush media objects have no space between the image- and text-content.
203
+ */
204
+
205
+ .#{$fortitude-namespace}media--flush {
206
+
207
+ > .#{$fortitude-namespace}media__object {
208
+ @include fortitude-media--flush__object;
209
+ }
210
+
211
+ }
212
+
213
+ }
214
+
215
+
216
+
217
+
218
+
219
+ @if ($fortitude-enable-media--responsive == true) {
220
+
221
+ /**
222
+ * Responsive media objects.
223
+ *
224
+ * There is a very pragmatic, simple implementation of a responsive media
225
+ * object, which simply places the text-content beneath the image-content.
226
+ *
227
+ * We use a `max-width` media query because:
228
+ *
229
+ * a) it is the least verbose method in terms of amount of code required.
230
+ * b) the media object’s default state is image-next-to-text, so its stacked
231
+ * state is the exception, rather than the rule.
232
+ */
233
+
234
+ @media screen and (max-width: $fortitude-media-collapse-at) {
235
+
236
+ .#{$fortitude-namespace}media--responsive {
237
+
238
+ /**
239
+ * Rework the spacings on regular media objects.
240
+ */
241
+ > .#{$fortitude-namespace}media__object {
242
+ @include fortitude-media--responsive__object;
243
+ }
244
+
245
+ @if ($fortitude-enable-media--small == true) {
246
+
247
+ /**
248
+ * Small responsive media objects.
249
+ *
250
+ * Take a little more heavy-handed approach to reworking
251
+ * spacings on media objects that are also small media objects
252
+ * in their regular state.
253
+ */
254
+
255
+ &.#{$fortitude-namespace}media--small {
256
+
257
+ > .#{$fortitude-namespace}media__object {
258
+ @include fortitude-media--responsive--small__object;
259
+ }
260
+
261
+ }
262
+
263
+ }
264
+
265
+ @if ($fortitude-enable-media--large == true) {
266
+
267
+ /**
268
+ * Large responsive media objects.
269
+ *
270
+ * Take a little more heavy-handed approach to reworking
271
+ * spacings on media objects that are also large media objects
272
+ * in their regular state.
273
+ */
274
+
275
+ &.#{$fortitude-namespace}media--large {
276
+
277
+ > .#{$fortitude-namespace}media__object {
278
+ @include fortitude-media--responsive--large__object;
279
+ }
280
+
281
+ }
282
+
283
+ }
284
+
285
+ }
286
+
287
+ }
288
+
289
+ }
@@ -0,0 +1,51 @@
1
+ /*------------------------------------*\
2
+ #SHADE
3
+ \*------------------------------------*/
4
+
5
+ $fortitude-shade-background-color: rgba(0,0,0, 0.3) !default;
6
+ $fortitude-shade-transition-speed: 0.3s !default;
7
+
8
+ @mixin fortitude-shade {
9
+ transition: opacity $fortitude-shade-transition-speed ease-in-out;
10
+ display: none;
11
+ position: fixed;
12
+ top: 0;
13
+ right: 0;
14
+ bottom: 0;
15
+ left: 0;
16
+ overflow: hidden;
17
+ -webkit-overflow-scrolling: touch;
18
+ -moz-overflow-scrolling: touch;
19
+ -ms-overflow-scrolling: touch;
20
+ overflow-scrolling: touch;
21
+ opacity: 0;
22
+ @if $fortitude-shade-background-color {
23
+ background-color: $fortitude-shade-background-color;
24
+ }
25
+ }
26
+
27
+ @mixin fortitude-html--shade--is-transitioning($selector: ".#{$fortitude-namespace}shade") {
28
+ #{$selector} {
29
+ display: block;
30
+ opacity: 0;
31
+ }
32
+ }
33
+
34
+ @mixin fortitude-html--shade--is-active($selector: ".#{$fortitude-namespace}shade") {
35
+ #{$selector} {
36
+ display: block;
37
+ opacity: 1;
38
+ }
39
+ }
40
+
41
+ .#{$fortitude-namespace}shade {
42
+ @include fortitude-shade;
43
+ }
44
+
45
+ .#{$fortitude-namespace}html--shade--is-transitioning {
46
+ @include fortitude-html--shade--is-transitioning;
47
+ }
48
+
49
+ .#{$fortitude-namespace}html--shade--is-active {
50
+ @include fortitude-html--shade--is-active;
51
+ }
@@ -0,0 +1,31 @@
1
+ /*------------------------------------*\
2
+ #TABLES
3
+ \*------------------------------------*/
4
+
5
+ // Predefine the variables below in order to alter and enable specific features.
6
+ $fortitude-enable-table--fixed: false !default;
7
+
8
+
9
+
10
+
11
+
12
+ .#{$fortitude-namespace}table,
13
+ %#{$fortitude-namespace}table {
14
+ width: 100%;
15
+ }
16
+
17
+
18
+
19
+
20
+
21
+ @if ($fortitude-enable-table--fixed == true) {
22
+
23
+ /**
24
+ * Force tables into having equal-width columns.
25
+ */
26
+ .#{$fortitude-namespace}table--fixed,
27
+ %#{$fortitude-namespace}table--fixed {
28
+ table-layout: fixed;
29
+ }
30
+
31
+ }
@@ -0,0 +1,58 @@
1
+ /*------------------------------------*\
2
+ #TABS NAVIGATION
3
+ \*------------------------------------*/
4
+
5
+
6
+ @mixin fortitude-tabs-navigation {
7
+ /**
8
+ * A simple abstraction for making equal-width navigation tabs.
9
+ *
10
+ * 1. Reset any residual styles (most likely from lists).
11
+ * 2. Tables for layout!
12
+ */
13
+
14
+ margin: 0; /* [1] */
15
+ padding: 0; /* [1] */
16
+ list-style: none; /* [1] */
17
+ display: table; /* [2] */
18
+ text-align: center;
19
+ }
20
+
21
+ @mixin fortitude-tabs-navigation--fixed {
22
+ /**
23
+ * 1. Force all `table-cell` children to have equal widths.
24
+ * 2. Force the object to be the full width of its parent. Combined with [2],
25
+ * this makes the object behave in a quasi-`display: block;` manner.
26
+ */
27
+
28
+ table-layout: fixed; /* [1] */
29
+ width: 100%; /* [2] */
30
+ }
31
+
32
+ @mixin fortitude-tabs-navigation__item {
33
+ /**
34
+ * 1. Tables for layout!
35
+ */
36
+
37
+ display: table-cell; /* [1] */
38
+ }
39
+
40
+ @mixin fortitude-tabs-navigation__link {
41
+ display: block;
42
+ }
43
+
44
+ .#{$fortitude-namespace}tabs-navigation {
45
+ @include fortitude-tabs-navigation;
46
+
47
+ &--fixed {
48
+ @include fortitude-tabs-navigation--fixed;
49
+ }
50
+ }
51
+
52
+ .#{$fortitude-namespace}tabs-navigation__item {
53
+ @include fortitude-tabs-navigation__item;
54
+ }
55
+
56
+ .#{$fortitude-namespace}tabs-navigation__link {
57
+ @include fortitude-tabs-navigation__link;
58
+ }