inuit-rails 6.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/.bowerrc +3 -0
  3. data/.document +5 -0
  4. data/.gitignore +55 -0
  5. data/.rspec +2 -0
  6. data/.travis.yml +5 -0
  7. data/CODE_OF_CONDUCT.md +49 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +41 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/bower.json +19 -0
  15. data/inuit-rails.gemspec +24 -0
  16. data/lib/inuit-rails.rb +2 -0
  17. data/lib/inuit-rails/rails.rb +1 -0
  18. data/lib/inuit-rails/rails/engine.rb +6 -0
  19. data/lib/inuit-rails/rails/version.rb +5 -0
  20. data/vendor/assets/stylesheets/inuitcss/LICENSE +13 -0
  21. data/vendor/assets/stylesheets/inuitcss/circle.yml +17 -0
  22. data/vendor/assets/stylesheets/inuitcss/components/_example.components.buttons.scss +170 -0
  23. data/vendor/assets/stylesheets/inuitcss/elements/_elements.headings.scss +47 -0
  24. data/vendor/assets/stylesheets/inuitcss/elements/_elements.images.scss +28 -0
  25. data/vendor/assets/stylesheets/inuitcss/elements/_elements.page.scss +22 -0
  26. data/vendor/assets/stylesheets/inuitcss/elements/_elements.tables.scss +11 -0
  27. data/vendor/assets/stylesheets/inuitcss/example.main.scss +154 -0
  28. data/vendor/assets/stylesheets/inuitcss/generic/_generic.box-sizing.scss +22 -0
  29. data/vendor/assets/stylesheets/inuitcss/generic/_generic.normalize.scss +461 -0
  30. data/vendor/assets/stylesheets/inuitcss/generic/_generic.reset.scss +53 -0
  31. data/vendor/assets/stylesheets/inuitcss/generic/_generic.shared.scss +36 -0
  32. data/vendor/assets/stylesheets/inuitcss/objects/_objects.block.scss +63 -0
  33. data/vendor/assets/stylesheets/inuitcss/objects/_objects.box.scss +48 -0
  34. data/vendor/assets/stylesheets/inuitcss/objects/_objects.crop.scss +99 -0
  35. data/vendor/assets/stylesheets/inuitcss/objects/_objects.flag.scss +214 -0
  36. data/vendor/assets/stylesheets/inuitcss/objects/_objects.layout.scss +247 -0
  37. data/vendor/assets/stylesheets/inuitcss/objects/_objects.list-bare.scss +13 -0
  38. data/vendor/assets/stylesheets/inuitcss/objects/_objects.list-inline.scss +53 -0
  39. data/vendor/assets/stylesheets/inuitcss/objects/_objects.media.scss +152 -0
  40. data/vendor/assets/stylesheets/inuitcss/objects/_objects.pack.scss +90 -0
  41. data/vendor/assets/stylesheets/inuitcss/objects/_objects.ratio.scss +85 -0
  42. data/vendor/assets/stylesheets/inuitcss/objects/_objects.tables.scss +74 -0
  43. data/vendor/assets/stylesheets/inuitcss/objects/_objects.wrapper.scss +51 -0
  44. data/vendor/assets/stylesheets/inuitcss/settings/_example.settings.config.scss +24 -0
  45. data/vendor/assets/stylesheets/inuitcss/settings/_example.settings.global.scss +9 -0
  46. data/vendor/assets/stylesheets/inuitcss/settings/_settings.core.scss +93 -0
  47. data/vendor/assets/stylesheets/inuitcss/tools/_tools.clearfix.scss +19 -0
  48. data/vendor/assets/stylesheets/inuitcss/tools/_tools.font-size.scss +44 -0
  49. data/vendor/assets/stylesheets/inuitcss/tools/_tools.hidden.scss +15 -0
  50. data/vendor/assets/stylesheets/inuitcss/tools/_tools.rem.scss +48 -0
  51. data/vendor/assets/stylesheets/inuitcss/utilities/_utilities.clearfix.scss +11 -0
  52. data/vendor/assets/stylesheets/inuitcss/utilities/_utilities.headings.scss +36 -0
  53. data/vendor/assets/stylesheets/inuitcss/utilities/_utilities.hide.scss +21 -0
  54. data/vendor/assets/stylesheets/inuitcss/utilities/_utilities.print.scss +90 -0
  55. data/vendor/assets/stylesheets/inuitcss/utilities/_utilities.spacing.scss +57 -0
  56. data/vendor/assets/stylesheets/inuitcss/utilities/_utilities.widths.scss +167 -0
  57. data/vendor/assets/stylesheets/sass-mq/_mq.scss +287 -0
  58. data/vendor/assets/stylesheets/sass-mq/show-breakpoints.gif +0 -0
  59. metadata +144 -0
@@ -0,0 +1,53 @@
1
+ /* ==========================================================================
2
+ #RESET
3
+ ========================================================================== */
4
+
5
+ /**
6
+ * A very simple reset that sits on top of Normalize.css.
7
+ */
8
+
9
+ body,
10
+ h1, h2, h3, h4, h5, h6,
11
+ blockquote, p, pre,
12
+ dl, dd, ol, ul,
13
+ figure,
14
+ hr,
15
+ fieldset, legend {
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+
21
+ /**
22
+ * Remove trailing margins from nested lists.
23
+ */
24
+
25
+ li > {
26
+
27
+ ol,
28
+ ul {
29
+ margin-bottom: 0;
30
+ }
31
+
32
+ }
33
+
34
+
35
+ /**
36
+ * Remove default table spacing.
37
+ */
38
+
39
+ table {
40
+ border-collapse: collapse;
41
+ border-spacing: 0;
42
+ }
43
+
44
+
45
+ /**
46
+ * 1. Reset Chrome and Firefox behaviour which sets a `min-width: min-content;`
47
+ * on fieldsets.
48
+ */
49
+
50
+ fieldset {
51
+ min-width: 0; /* [1] */
52
+ border: 0;
53
+ }
@@ -0,0 +1,36 @@
1
+ /* ==========================================================================
2
+ #SHARED
3
+ ========================================================================== */
4
+
5
+ /**
6
+ * Shared declarations for certain elements.
7
+ */
8
+
9
+ /**
10
+ * Always declare margins in the same direction:
11
+ * csswizardry.com/2012/06/single-direction-margin-declarations
12
+ */
13
+
14
+ /* stylelint-disable selector-list-comma-newline-after */
15
+
16
+ address,
17
+ h1, h2, h3, h4, h5, h6,
18
+ blockquote, p, pre,
19
+ dl, ol, ul,
20
+ figure,
21
+ hr,
22
+ table,
23
+ fieldset {
24
+ @include inuit-rem(margin-bottom, $inuit-global-spacing-unit);
25
+ }
26
+
27
+
28
+ /**
29
+ * Consistent indentation for lists.
30
+ */
31
+
32
+ dd, ol, ul {
33
+ @include inuit-rem(margin-left, $inuit-global-spacing-unit);
34
+ }
35
+
36
+ /* stylelint-enable selector-list-comma-newline-after */
@@ -0,0 +1,63 @@
1
+ /* ==========================================================================
2
+ #BLOCK
3
+ ========================================================================== */
4
+
5
+ /**
6
+ * Stacked image-with-text object. A simple abstraction to cover a very commonly
7
+ * occurring design pattern.
8
+ */
9
+
10
+ .o-block {
11
+ display: block;
12
+ text-align: center;
13
+ }
14
+
15
+
16
+ .o-block__img {
17
+ margin-bottom: $inuit-global-spacing-unit;
18
+
19
+
20
+ /* Size variants.
21
+ ====================================================================== */
22
+
23
+ .o-block--flush > & {
24
+ margin-bottom: 0;
25
+ }
26
+
27
+ .o-block--tiny > & {
28
+ margin-bottom: $inuit-global-spacing-unit-tiny;
29
+ }
30
+
31
+ .o-block--small > & {
32
+ margin-bottom: $inuit-global-spacing-unit-small;
33
+ }
34
+
35
+ .o-block--large > & {
36
+ margin-bottom: $inuit-global-spacing-unit-large;
37
+ }
38
+
39
+ .o-block--huge > & {
40
+ margin-bottom: $inuit-global-spacing-unit-huge;
41
+ }
42
+
43
+ }
44
+
45
+
46
+ .o-block__body {
47
+ display: block;
48
+ }
49
+
50
+
51
+
52
+
53
+
54
+ /* Alignment variants.
55
+ ========================================================================== */
56
+
57
+ .o-block--right {
58
+ text-align: right;
59
+ }
60
+
61
+ .o-block--left {
62
+ text-align: left;
63
+ }
@@ -0,0 +1,48 @@
1
+ /* ==========================================================================
2
+ #BOX
3
+ ========================================================================== */
4
+
5
+ /**
6
+ * The box object simply boxes off content. Extend with cosmetic styles in the
7
+ * Components layer.
8
+ *
9
+ * 1. So we can apply the `.o-box` class to naturally-inline elements.
10
+ */
11
+
12
+ .o-box {
13
+ @include inuit-clearfix();
14
+ display: block; /* [1] */
15
+ padding: $inuit-global-spacing-unit;
16
+
17
+ > :last-child {
18
+ margin-bottom: 0;
19
+ }
20
+
21
+ }
22
+
23
+
24
+
25
+
26
+
27
+ /* Size variants
28
+ ========================================================================== */
29
+
30
+ .o-box--flush {
31
+ padding: 0;
32
+ }
33
+
34
+ .o-box--tiny {
35
+ padding: $inuit-global-spacing-unit-tiny;
36
+ }
37
+
38
+ .o-box--small {
39
+ padding: $inuit-global-spacing-unit-small;
40
+ }
41
+
42
+ .o-box--large {
43
+ padding: $inuit-global-spacing-unit-large;
44
+ }
45
+
46
+ .o-box--huge {
47
+ padding: $inuit-global-spacing-unit-huge;
48
+ }
@@ -0,0 +1,99 @@
1
+ /* ==========================================================================
2
+ #CROP
3
+ ========================================================================== */
4
+
5
+ // A list of cropping ratios that get generated as modifier classes.
6
+
7
+ $inuit-crops: (
8
+ (2:1),
9
+ (4:3),
10
+ (16:9),
11
+ ) !default;
12
+
13
+
14
+
15
+ /**
16
+ * Provide a cropping container in order to display media (usually images)
17
+ * cropped to certain ratios.
18
+ *
19
+ * 1. Set up a positioning context in which the image can sit.
20
+ * 2. This is the crucial part: where the cropping happens.
21
+ */
22
+
23
+ .o-crop {
24
+ position: relative; /* [1] */
25
+ display: block;
26
+ overflow: hidden; /* [2] */
27
+ }
28
+
29
+
30
+ /**
31
+ * Apply this class to the content (usually `img`) that needs cropping.
32
+ *
33
+ * 1. Image’s default positioning is top-left in the cropping box.
34
+ * 2. Make sure the media doesn’t stop itself too soon.
35
+ */
36
+
37
+ .o-crop__content {
38
+ position: absolute;
39
+ top: 0; /* [1] */
40
+ left: 0; /* [1] */
41
+ max-width: none; /* [2] */
42
+ }
43
+
44
+
45
+ /**
46
+ * We can position the media in different locations within the cropping area.
47
+ */
48
+
49
+ .o-crop__content--right {
50
+ right: 0;
51
+ left: auto;
52
+ }
53
+
54
+ .o-crop__content--bottom {
55
+ top: auto;
56
+ bottom: 0;
57
+ }
58
+
59
+ .o-crop__content--center {
60
+ top: 50%;
61
+ left: 50%;
62
+ transform: translate(-50%, -50%);
63
+ }
64
+
65
+
66
+
67
+ /* stylelint-disable */
68
+
69
+ /* Crop-ratio variants.
70
+ ========================================================================== */
71
+
72
+ /**
73
+ * Generate a series of crop classes to be used like so:
74
+ *
75
+ * <div class="o-crop o-crop--16:9">
76
+ *
77
+ */
78
+
79
+ @each $crop in $inuit-crops {
80
+
81
+ @each $antecedent, $consequent in $crop {
82
+
83
+ @if (type-of($antecedent) != number) {
84
+ @error "`#{$antecedent}` needs to be a number."
85
+ }
86
+
87
+ @if (type-of($consequent) != number) {
88
+ @error "`#{$consequent}` needs to be a number."
89
+ }
90
+
91
+ .o-crop--#{$antecedent}\:#{$consequent} {
92
+ padding-bottom: ($consequent/$antecedent) * 100%;
93
+ }
94
+
95
+ }
96
+
97
+ }
98
+
99
+ /* stylelint-enable */
@@ -0,0 +1,214 @@
1
+ /* ==========================================================================
2
+ #FLAG
3
+ ========================================================================== */
4
+
5
+ /**
6
+ * The flag object is a design pattern similar to the media object, however it
7
+ * utilises `display: table[-cell];` to give us control over the vertical
8
+ * alignments of the text and image.
9
+ *
10
+ * http://csswizardry.com/2013/05/the-flag-object/
11
+ *
12
+ * 1. Allows us to control vertical alignments.
13
+ * 2. Force the object to be the full width of its parent. Combined with [1],
14
+ * this makes the object behave in a quasi-`display: block;` manner.
15
+ */
16
+
17
+ .o-flag {
18
+ display: table; /* [1] */
19
+ width: 100%; /* [2] */
20
+ }
21
+
22
+
23
+ /**
24
+ * Items within a flag object. There should only ever be one of each.
25
+ *
26
+ * 1. Default to aligning content to their middles.
27
+ */
28
+
29
+ .o-flag__img,
30
+ .o-flag__body {
31
+ display: table-cell;
32
+ vertical-align: middle; /* [1] */
33
+ }
34
+
35
+
36
+ /**
37
+ * Flag images have a space between them and the body of the object.
38
+ *
39
+ * 1. Force `.flag__img` to take up as little space as possible:
40
+ * https://pixelsvsbytes.com/2012/02/this-css-layout-grid-is-no-holy-grail/
41
+ */
42
+
43
+ .o-flag__img {
44
+ width: 1px; /* [1] */
45
+ padding-right: $inuit-global-spacing-unit;
46
+
47
+
48
+ /**
49
+ * 1. Fixes problem with images disappearing.
50
+ */
51
+
52
+ > img {
53
+ max-width: none; /* [1] */
54
+ }
55
+
56
+ }
57
+
58
+
59
+ /**
60
+ * The container for the main content of the flag object.
61
+ *
62
+ * 1. Forces the `.flag__body` to take up all remaining space.
63
+ */
64
+
65
+ .o-flag__body {
66
+ width: auto; /* [1] */
67
+
68
+ &,
69
+ > :last-child {
70
+ margin-bottom: 0;
71
+ }
72
+
73
+ }
74
+
75
+
76
+
77
+
78
+
79
+ /* Size variants.
80
+ ========================================================================== */
81
+
82
+ .o-flag--tiny {
83
+
84
+ > .o-flag__img {
85
+ padding-right: $inuit-global-spacing-unit-tiny;
86
+ }
87
+
88
+ &.o-flag--reverse {
89
+
90
+ > .o-flag__img {
91
+ padding-right: 0;
92
+ padding-left: $inuit-global-spacing-unit-tiny;
93
+ }
94
+
95
+ }
96
+
97
+ }
98
+
99
+ .o-flag--small {
100
+
101
+ > .o-flag__img {
102
+ padding-right: $inuit-global-spacing-unit-small;
103
+ }
104
+
105
+ &.o-flag--reverse {
106
+
107
+ > .o-flag__img {
108
+ padding-right: 0;
109
+ padding-left: $inuit-global-spacing-unit-small;
110
+ }
111
+
112
+ }
113
+
114
+ }
115
+
116
+ .o-flag--large {
117
+
118
+ > .o-flag__img {
119
+ padding-right: $inuit-global-spacing-unit-large;
120
+ }
121
+
122
+ &.o-flag--reverse {
123
+
124
+ > .o-flag__img {
125
+ padding-right: 0;
126
+ padding-left: $inuit-global-spacing-unit-large;
127
+ }
128
+
129
+ }
130
+
131
+ }
132
+
133
+ .o-flag--huge {
134
+
135
+ > .o-flag__img {
136
+ padding-right: $inuit-global-spacing-unit-huge;
137
+ }
138
+
139
+ &.o-flag--reverse {
140
+
141
+ > .o-flag__img {
142
+ padding-right: 0;
143
+ padding-left: $inuit-global-spacing-unit-huge;
144
+ }
145
+
146
+ }
147
+
148
+ }
149
+
150
+ .o-flag--flush {
151
+
152
+ > .o-flag__img {
153
+ padding-right: 0;
154
+ padding-left: 0;
155
+ }
156
+
157
+ }
158
+
159
+
160
+
161
+
162
+
163
+ /* Reversed flag.
164
+ ========================================================================== */
165
+
166
+ /**
167
+ * 1. Swap the rendered direction of the object…
168
+ * 2. …and reset it.
169
+ * 3. Reassign margins to the correct sides.
170
+ */
171
+
172
+ .o-flag--reverse {
173
+ direction: rtl; /* [1] */
174
+
175
+ > .o-flag__img,
176
+ > .o-flag__body {
177
+ direction: ltr; /* [2] */
178
+ }
179
+
180
+ > .o-flag__img {
181
+ padding-right: 0; /* [3] */
182
+ padding-left: $inuit-global-spacing-unit; /* [3] */
183
+ }
184
+
185
+ }
186
+
187
+
188
+
189
+
190
+
191
+ /* Alignment variants.
192
+ ========================================================================== */
193
+
194
+ /**
195
+ * Vertically align the image- and body-content differently. Defaults to middle.
196
+ */
197
+
198
+ .o-flag--top {
199
+
200
+ > .o-flag__img,
201
+ > .o-flag__body {
202
+ vertical-align: top;
203
+ }
204
+
205
+ }
206
+
207
+ .o-flag--bottom {
208
+
209
+ > .o-flag__img,
210
+ > .o-flag__body {
211
+ vertical-align: bottom;
212
+ }
213
+
214
+ }