suitcss-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +4 -0
  6. data/README.md +37 -0
  7. data/Rakefile +6 -0
  8. data/app/assets/stylesheets/normalize.css +424 -0
  9. data/app/assets/stylesheets/suitcss.css +5 -0
  10. data/app/assets/stylesheets/suitcss/base.css +1 -0
  11. data/app/assets/stylesheets/suitcss/base/index.css +83 -0
  12. data/app/assets/stylesheets/suitcss/components.css +4 -0
  13. data/app/assets/stylesheets/suitcss/components/arrange.css +155 -0
  14. data/app/assets/stylesheets/suitcss/components/button.css +77 -0
  15. data/app/assets/stylesheets/suitcss/components/flex-embed.css +74 -0
  16. data/app/assets/stylesheets/suitcss/components/grid.css +121 -0
  17. data/app/assets/stylesheets/suitcss/utils.css +9 -0
  18. data/app/assets/stylesheets/suitcss/utils/after.css +4 -0
  19. data/app/assets/stylesheets/suitcss/utils/after/index.css +117 -0
  20. data/app/assets/stylesheets/suitcss/utils/after/lg.css +127 -0
  21. data/app/assets/stylesheets/suitcss/utils/after/md.css +127 -0
  22. data/app/assets/stylesheets/suitcss/utils/after/sm.css +127 -0
  23. data/app/assets/stylesheets/suitcss/utils/align.css +21 -0
  24. data/app/assets/stylesheets/suitcss/utils/before.css +4 -0
  25. data/app/assets/stylesheets/suitcss/utils/before/index.css +117 -0
  26. data/app/assets/stylesheets/suitcss/utils/before/lg.css +127 -0
  27. data/app/assets/stylesheets/suitcss/utils/before/md.css +127 -0
  28. data/app/assets/stylesheets/suitcss/utils/before/sm.css +127 -0
  29. data/app/assets/stylesheets/suitcss/utils/display.css +53 -0
  30. data/app/assets/stylesheets/suitcss/utils/flex.css +4 -0
  31. data/app/assets/stylesheets/suitcss/utils/flex/index.css +253 -0
  32. data/app/assets/stylesheets/suitcss/utils/flex/lg.css +259 -0
  33. data/app/assets/stylesheets/suitcss/utils/flex/md.css +259 -0
  34. data/app/assets/stylesheets/suitcss/utils/flex/sm.css +259 -0
  35. data/app/assets/stylesheets/suitcss/utils/layout.css +66 -0
  36. data/app/assets/stylesheets/suitcss/utils/link.css +55 -0
  37. data/app/assets/stylesheets/suitcss/utils/offset.css +2 -0
  38. data/app/assets/stylesheets/suitcss/utils/position.css +48 -0
  39. data/app/assets/stylesheets/suitcss/utils/size.css +4 -0
  40. data/app/assets/stylesheets/suitcss/utils/size/index.css +172 -0
  41. data/app/assets/stylesheets/suitcss/utils/size/lg.css +176 -0
  42. data/app/assets/stylesheets/suitcss/utils/size/md.css +176 -0
  43. data/app/assets/stylesheets/suitcss/utils/size/sm.css +176 -0
  44. data/app/assets/stylesheets/suitcss/utils/text.css +76 -0
  45. data/bin/console +14 -0
  46. data/bin/setup +8 -0
  47. data/lib/suitcss/rails.rb +6 -0
  48. data/lib/suitcss/rails/version.rb +5 -0
  49. data/suitcss-rails.gemspec +24 -0
  50. metadata +133 -0
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @define utilities
3
+ * Contain floats
4
+ *
5
+ * Make an element expand to contain floated children.
6
+ * Uses pseudo-elements (micro clearfix).
7
+ *
8
+ * 1. The space content is one way to avoid an Opera bug when the
9
+ * `contenteditable` attribute is included anywhere else in the document.
10
+ * Otherwise it causes space to appear at the top and bottom of the
11
+ * element.
12
+ * 2. The use of `table` rather than `block` is only necessary if using
13
+ * `:before` to contain the top-margins of child elements.
14
+ */
15
+
16
+ .u-cf::before,
17
+ .u-cf::after {
18
+ content: " "; /* 1 */
19
+ display: table; /* 2 */
20
+ }
21
+
22
+ .u-cf::after {
23
+ clear: both;
24
+ }
25
+
26
+ /**
27
+ * New block formatting context
28
+ *
29
+ * This affords some useful properties to the element. It won't wrap under
30
+ * floats. Will also contain any floated children.
31
+ * N.B. This will clip overflow. Use the alternative method below if this is
32
+ * problematic.
33
+ */
34
+
35
+ .u-nbfc {
36
+ overflow: hidden !important;
37
+ }
38
+
39
+ /**
40
+ * New block formatting context (alternative)
41
+ *
42
+ * Alternative method when overflow must not be clipped.
43
+ *
44
+ * 1. Create a new block formatting context (NBFC).
45
+ * 2. Avoid shrink-wrap behaviour of table-cell.
46
+ *
47
+ * N.B. This breaks down in some browsers when elements within this element
48
+ * exceed its width.
49
+ */
50
+
51
+ .u-nbfcAlt {
52
+ display: table-cell !important; /* 1 */
53
+ width: 10000px !important; /* 2 */
54
+ }
55
+
56
+ /**
57
+ * Floats
58
+ */
59
+
60
+ .u-floatLeft {
61
+ float: left !important;
62
+ }
63
+
64
+ .u-floatRight {
65
+ float: right !important;
66
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @define utilities
3
+ * Clean link
4
+ *
5
+ * A link without any text-decoration at all.
6
+ */
7
+
8
+ .u-linkClean,
9
+ .u-linkClean:hover,
10
+ .u-linkClean:focus,
11
+ .u-linkClean:active {
12
+ text-decoration: none !important;
13
+ }
14
+
15
+ /**
16
+ * Link complex
17
+ *
18
+ * A common pattern is to have a link with several pieces of text and/or an
19
+ * icon, where only one piece of text should display the underline when the
20
+ * link is the subject of user interaction.
21
+ *
22
+ * Example HTML:
23
+ *
24
+ * <a class="u-linkComplex" href="#">
25
+ * Link complex
26
+ * <span class="u-linkComplexTarget">target</span>
27
+ * </a>
28
+ */
29
+
30
+ .u-linkComplex,
31
+ .u-linkComplex:hover,
32
+ .u-linkComplex:focus,
33
+ .u-linkComplex:active {
34
+ text-decoration: none !important;
35
+ }
36
+
37
+ .u-linkComplex:hover .u-linkComplexTarget,
38
+ .u-linkComplex:focus .u-linkComplexTarget,
39
+ .u-linkComplex:active .u-linkComplexTarget {
40
+ text-decoration: underline !important;
41
+ }
42
+
43
+ /**
44
+ * Block-level link
45
+ *
46
+ * Combination of traits commonly used in vertical navigation lists.
47
+ */
48
+
49
+ .u-linkBlock,
50
+ .u-linkBlock:hover,
51
+ .u-linkBlock:focus,
52
+ .u-linkBlock:active {
53
+ display: block !important;
54
+ text-decoration: none !important;
55
+ }
@@ -0,0 +1,2 @@
1
+ @import "after";
2
+ @import "before";
@@ -0,0 +1,48 @@
1
+ /** @define utilities */
2
+
3
+ .u-posFit,
4
+ .u-posAbsoluteCenter,
5
+ .u-posAbsolute {
6
+ position: absolute !important;
7
+ }
8
+
9
+ /**
10
+ * Element will be centered to its nearest relatively-positioned
11
+ * ancestor.
12
+ */
13
+
14
+ .u-posFixedCenter,
15
+ .u-posAbsoluteCenter {
16
+ left: 50% !important;
17
+ top: 50% !important;
18
+ transform: translate(-50%, -50%) !important;
19
+ }
20
+
21
+ .u-posFit,
22
+ .u-posFullScreen {
23
+ bottom: 0 !important;
24
+ left: 0 !important;
25
+ margin: auto !important;
26
+ right: 0 !important;
27
+ top: 0 !important;
28
+ }
29
+
30
+ /**
31
+ * 1. Make sure fixed elements are promoted into a new layer, for performance
32
+ * reasons.
33
+ */
34
+
35
+ .u-posFullScreen,
36
+ .u-posFixedCenter,
37
+ .u-posFixed {
38
+ backface-visibility: hidden; /* 1 */
39
+ position: fixed !important;
40
+ }
41
+
42
+ .u-posRelative {
43
+ position: relative !important;
44
+ }
45
+
46
+ .u-posStatic {
47
+ position: static !important;
48
+ }
@@ -0,0 +1,4 @@
1
+ @import "size/index";
2
+ @import "size/sm";
3
+ @import "size/md";
4
+ @import "size/lg";
@@ -0,0 +1,172 @@
1
+ /**
2
+ * @define utilities
3
+ * Sizing utilities
4
+ */
5
+
6
+ /* Proportional widths
7
+ ========================================================================== */
8
+
9
+ /**
10
+ * Specify the proportional width of an object.
11
+ * Intentional redundancy build into each set of unit classes.
12
+ * Supports: 2, 3, 4, 5, 6, 8, 10, 12 part
13
+ *
14
+ * 1. Use `flex-basis: auto` with a width to avoid box-sizing bug in IE10/11
15
+ * http://git.io/vllMD
16
+ */
17
+
18
+ /* postcss-bem-linter: ignore */
19
+
20
+ [class*="u-size"] {
21
+ flex-basis: auto !important; /* 1 */
22
+ }
23
+
24
+ .u-size1of12 {
25
+ width: calc(100% * 1 / 12) !important;
26
+ }
27
+
28
+ .u-size1of10 {
29
+ width: 10% !important;
30
+ }
31
+
32
+ .u-size1of8 {
33
+ width: 12.5% !important;
34
+ }
35
+
36
+ .u-size1of6,
37
+ .u-size2of12 {
38
+ width: calc(100% * 1 / 6) !important;
39
+ }
40
+
41
+ .u-size1of5,
42
+ .u-size2of10 {
43
+ width: 20% !important;
44
+ }
45
+
46
+ .u-size1of4,
47
+ .u-size2of8,
48
+ .u-size3of12 {
49
+ width: 25% !important;
50
+ }
51
+
52
+ .u-size3of10 {
53
+ width: 30% !important;
54
+ }
55
+
56
+ .u-size1of3,
57
+ .u-size2of6,
58
+ .u-size4of12 {
59
+ width: calc(100% * 1 / 3) !important;
60
+ }
61
+
62
+ .u-size3of8 {
63
+ width: 37.5% !important;
64
+ }
65
+
66
+ .u-size2of5,
67
+ .u-size4of10 {
68
+ width: 40% !important;
69
+ }
70
+
71
+ .u-size5of12 {
72
+ width: calc(100% * 5 / 12) !important;
73
+ }
74
+
75
+ .u-size1of2,
76
+ .u-size2of4,
77
+ .u-size3of6,
78
+ .u-size4of8,
79
+ .u-size5of10,
80
+ .u-size6of12 {
81
+ width: 50% !important;
82
+ }
83
+
84
+ .u-size7of12 {
85
+ width: calc(100% * 7 / 12) !important;
86
+ }
87
+
88
+ .u-size3of5,
89
+ .u-size6of10 {
90
+ width: 60% !important;
91
+ }
92
+
93
+ .u-size5of8 {
94
+ width: 62.5% !important;
95
+ }
96
+
97
+ .u-size2of3,
98
+ .u-size4of6,
99
+ .u-size8of12 {
100
+ width: calc(100% * 2 / 3) !important;
101
+ }
102
+
103
+ .u-size7of10 {
104
+ width: 70% !important;
105
+ }
106
+
107
+ .u-size3of4,
108
+ .u-size6of8,
109
+ .u-size9of12 {
110
+ width: 75% !important;
111
+ }
112
+
113
+ .u-size4of5,
114
+ .u-size8of10 {
115
+ width: 80% !important;
116
+ }
117
+
118
+ .u-size5of6,
119
+ .u-size10of12 {
120
+ width: calc(100% * 5 / 6) !important;
121
+ }
122
+
123
+ .u-size7of8 {
124
+ width: 87.5% !important;
125
+ }
126
+
127
+ .u-size9of10 {
128
+ width: 90% !important;
129
+ }
130
+
131
+ .u-size11of12 {
132
+ width: calc(100% * 11 / 12) !important;
133
+ }
134
+
135
+ /* Intrinsic widths
136
+ ========================================================================== */
137
+
138
+ /**
139
+ * Make an element fill the remaining space.
140
+ *
141
+ * 1. Be explicit to work around IE10 bug with shorthand flex
142
+ * http://git.io/vllC7
143
+ * 2. IE10 ignores previous `flex-basis` value. Setting again here fixes
144
+ * http://git.io/vllMt
145
+ */
146
+
147
+ .u-sizeFill {
148
+ flex: 1 1 0% !important; /* 1 */
149
+ flex-basis: 0% !important; /* 2 */
150
+ }
151
+
152
+ /**
153
+ * An alternative method to make an element fill the remaining space.
154
+ * Distributes space based on the initial width and height of the element
155
+ *
156
+ * http://www.w3.org/TR/css-flexbox/images/rel-vs-abs-flex.svg
157
+ */
158
+
159
+ .u-sizeFillAlt {
160
+ flex: 1 1 auto !important;
161
+ flex-basis: auto !important;
162
+ }
163
+
164
+ /**
165
+ * Make an element the width of its parent.
166
+ */
167
+
168
+ .u-sizeFull {
169
+ box-sizing: border-box !important;
170
+ display: block !important;
171
+ width: 100% !important;
172
+ }
@@ -0,0 +1,176 @@
1
+ /**
2
+ * @define utilities
3
+ * Size: breakpoint 3 (large)
4
+ */
5
+
6
+ @media (--lg-viewport) {
7
+
8
+ /* Proportional widths: breakpoint 3 (large)
9
+ ======================================================================== */
10
+
11
+ /**
12
+ * Specify the proportional width of an object.
13
+ * Intentional redundancy build into each set of unit classes.
14
+ * Supports: 2, 3, 4, 5, 6, 8, 10, 12 part
15
+ *
16
+ * 1. Use `flex-basis: auto` with a width to avoid box-sizing bug in IE10/11
17
+ * http://git.io/vllMD
18
+ */
19
+
20
+ /* postcss-bem-linter: ignore */
21
+
22
+ [class*="u-lg-size"] {
23
+ flex-basis: auto !important; /* 1 */
24
+ }
25
+
26
+ .u-lg-size1of12 {
27
+ width: calc(100% * 1 / 12) !important;
28
+ }
29
+
30
+ .u-lg-size1of10 {
31
+ width: 10% !important;
32
+ }
33
+
34
+ .u-lg-size1of8 {
35
+ width: 12.5% !important;
36
+ }
37
+
38
+ .u-lg-size1of6,
39
+ .u-lg-size2of12 {
40
+ width: calc(100% * 1 / 6) !important;
41
+ }
42
+
43
+ .u-lg-size1of5,
44
+ .u-lg-size2of10 {
45
+ width: 20% !important;
46
+ }
47
+
48
+ .u-lg-size1of4,
49
+ .u-lg-size2of8,
50
+ .u-lg-size3of12 {
51
+ width: 25% !important;
52
+ }
53
+
54
+ .u-lg-size3of10 {
55
+ width: 30% !important;
56
+ }
57
+
58
+ .u-lg-size1of3,
59
+ .u-lg-size2of6,
60
+ .u-lg-size4of12 {
61
+ width: calc(100% * 1 / 3) !important;
62
+ }
63
+
64
+ .u-lg-size3of8 {
65
+ width: 37.5% !important;
66
+ }
67
+
68
+ .u-lg-size2of5,
69
+ .u-lg-size4of10 {
70
+ width: 40% !important;
71
+ }
72
+
73
+ .u-lg-size5of12 {
74
+ width: calc(100% * 5 / 12) !important;
75
+ }
76
+
77
+ .u-lg-size1of2,
78
+ .u-lg-size2of4,
79
+ .u-lg-size3of6,
80
+ .u-lg-size4of8,
81
+ .u-lg-size5of10,
82
+ .u-lg-size6of12 {
83
+ width: 50% !important;
84
+ }
85
+
86
+ .u-lg-size7of12 {
87
+ width: calc(100% * 7 / 12) !important;
88
+ }
89
+
90
+ .u-lg-size3of5,
91
+ .u-lg-size6of10 {
92
+ width: 60% !important;
93
+ }
94
+
95
+ .u-lg-size5of8 {
96
+ width: 62.5% !important;
97
+ }
98
+
99
+ .u-lg-size2of3,
100
+ .u-lg-size4of6,
101
+ .u-lg-size8of12 {
102
+ width: calc(100% * 2 / 3) !important;
103
+ }
104
+
105
+ .u-lg-size7of10 {
106
+ width: 70% !important;
107
+ }
108
+
109
+ .u-lg-size3of4,
110
+ .u-lg-size6of8,
111
+ .u-lg-size9of12 {
112
+ width: 75% !important;
113
+ }
114
+
115
+ .u-lg-size4of5,
116
+ .u-lg-size8of10 {
117
+ width: 80% !important;
118
+ }
119
+
120
+ .u-lg-size5of6,
121
+ .u-lg-size10of12 {
122
+ width: calc(100% * 5 / 6) !important;
123
+ }
124
+
125
+ .u-lg-size7of8 {
126
+ width: 87.5% !important;
127
+ }
128
+
129
+ .u-lg-size9of10 {
130
+ width: 90% !important;
131
+ }
132
+
133
+ .u-lg-size11of12 {
134
+ width: calc(100% * 11 / 12) !important;
135
+ }
136
+
137
+ /* Intrinsic widths
138
+ ======================================================================== */
139
+
140
+ /**
141
+ * Make an element fill the remaining space.
142
+ *
143
+ * 1. Be explicit to work around IE10 bug with shorthand flex
144
+ * http://git.io/vllC7
145
+ * 2. IE10 ignores previous `flex-basis` value. Setting again here fixes
146
+ * http://git.io/vllMt
147
+ */
148
+
149
+ .u-lg-sizeFill {
150
+ flex: 1 1 0% !important; /* 1 */
151
+ flex-basis: 0% !important; /* 2 */
152
+ }
153
+
154
+ /**
155
+ * An alternative method to make an element fill the remaining space.
156
+ * Distributes space based on the initial width and height of the element
157
+ *
158
+ * http://www.w3.org/TR/css-flexbox/images/rel-vs-abs-flex.svg
159
+ */
160
+
161
+ .u-lg-sizeFillAlt {
162
+ flex: 1 1 auto !important;
163
+ flex-basis: auto !important;
164
+ }
165
+
166
+ /**
167
+ * Make an element the width of its parent.
168
+ */
169
+
170
+ .u-lg-sizeFull {
171
+ box-sizing: border-box !important;
172
+ display: block !important;
173
+ width: 100% !important;
174
+ }
175
+
176
+ }