cardinal-rails 3.1.0.00

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/License.txt +21 -0
  3. data/README.md +39 -0
  4. data/lib/cardinal/rails.rb +8 -0
  5. data/lib/cardinal/rails/version.rb +5 -0
  6. data/vendor/assets/stylesheets/cardinal.less +83 -0
  7. data/vendor/assets/stylesheets/core/base/anchors.less +18 -0
  8. data/vendor/assets/stylesheets/core/base/blockquotes.less +45 -0
  9. data/vendor/assets/stylesheets/core/base/code.less +68 -0
  10. data/vendor/assets/stylesheets/core/base/embedded-content.less +89 -0
  11. data/vendor/assets/stylesheets/core/base/form-elements.less +130 -0
  12. data/vendor/assets/stylesheets/core/base/headings.less +50 -0
  13. data/vendor/assets/stylesheets/core/base/horizontal-rules.less +10 -0
  14. data/vendor/assets/stylesheets/core/base/lists.less +57 -0
  15. data/vendor/assets/stylesheets/core/base/print.less +69 -0
  16. data/vendor/assets/stylesheets/core/base/root.less +90 -0
  17. data/vendor/assets/stylesheets/core/base/selections.less +30 -0
  18. data/vendor/assets/stylesheets/core/base/tables.less +18 -0
  19. data/vendor/assets/stylesheets/core/base/text-elements.less +83 -0
  20. data/vendor/assets/stylesheets/core/debug.less +154 -0
  21. data/vendor/assets/stylesheets/core/mixins/antialiasing.less +8 -0
  22. data/vendor/assets/stylesheets/core/mixins/clearing.less +27 -0
  23. data/vendor/assets/stylesheets/core/mixins/font-face.less +33 -0
  24. data/vendor/assets/stylesheets/core/mixins/media-queries.less +154 -0
  25. data/vendor/assets/stylesheets/core/mixins/momentum-scrolling.less +8 -0
  26. data/vendor/assets/stylesheets/core/mixins/text-truncate.less +9 -0
  27. data/vendor/assets/stylesheets/core/mixins/to-rem.less +76 -0
  28. data/vendor/assets/stylesheets/core/mixins/vertically-centered.less +9 -0
  29. data/vendor/assets/stylesheets/core/normalize.less +427 -0
  30. data/vendor/assets/stylesheets/core/reset.less +140 -0
  31. data/vendor/assets/stylesheets/core/variables.less +436 -0
  32. data/vendor/assets/stylesheets/layout/boxes.less +53 -0
  33. data/vendor/assets/stylesheets/layout/grids.less +614 -0
  34. data/vendor/assets/stylesheets/layout/wrappers.less +30 -0
  35. data/vendor/assets/stylesheets/objects/buttons.less +132 -0
  36. data/vendor/assets/stylesheets/objects/forms.less +61 -0
  37. data/vendor/assets/stylesheets/objects/lists.less +45 -0
  38. data/vendor/assets/stylesheets/objects/tables.less +116 -0
  39. data/vendor/assets/stylesheets/utilities/display.less +355 -0
  40. data/vendor/assets/stylesheets/utilities/floats.less +137 -0
  41. data/vendor/assets/stylesheets/utilities/font-sizes.less +269 -0
  42. data/vendor/assets/stylesheets/utilities/margins.less +1322 -0
  43. data/vendor/assets/stylesheets/utilities/paddings.less +1322 -0
  44. data/vendor/assets/stylesheets/utilities/positions.less +125 -0
  45. data/vendor/assets/stylesheets/utilities/text-alignment.less +127 -0
  46. data/vendor/assets/stylesheets/utilities/vertical-alignment.less +98 -0
  47. data/vendor/assets/stylesheets/utilities/visually-hidden.less +43 -0
  48. data/vendor/assets/stylesheets/utilities/widths.less +1455 -0
  49. data/vendor/assets/stylesheets/utilities/z-index.less +292 -0
  50. metadata +141 -0
@@ -0,0 +1,50 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Headings ($core-base-headings)
3
+ \* ========================================================================== */
4
+
5
+ /**
6
+ * 1. Use the `text-rendering` property with caution.
7
+ * @link http://cbrac.co/SJt8p1
8
+ */
9
+
10
+ h1,
11
+ h2,
12
+ h3,
13
+ h4,
14
+ h5,
15
+ h6 {
16
+ font-family: @heading-font-family;
17
+ font-weight: @heading-font-weight;
18
+ color: @heading-text-color;
19
+ text-rendering: optimizeLegibility; /* 1 */
20
+ }
21
+
22
+ h1,
23
+ .h1 {
24
+ .to-rem(font-size, @font-size-heading-1);
25
+ }
26
+
27
+ h2,
28
+ .h2 {
29
+ .to-rem(font-size, @font-size-heading-2);
30
+ }
31
+
32
+ h3,
33
+ .h3 {
34
+ .to-rem(font-size, @font-size-heading-3);
35
+ }
36
+
37
+ h4,
38
+ .h4 {
39
+ .to-rem(font-size, @font-size-heading-4);
40
+ }
41
+
42
+ h5,
43
+ .h5 {
44
+ .to-rem(font-size, @font-size-heading-5);
45
+ }
46
+
47
+ h6,
48
+ .h6 {
49
+ .to-rem(font-size, @font-size-heading-6);
50
+ }
@@ -0,0 +1,10 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Horizontal Rules ($core-base-horizontal-rules)
3
+ \* ========================================================================== */
4
+
5
+ hr {
6
+ display: block;
7
+ padding: 0;
8
+ border: 0;
9
+ .to-rem(border-top, @hr-border-width, @hr-border-style @hr-border-color);
10
+ }
@@ -0,0 +1,57 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Lists ($core-base-lists)
3
+ \* ========================================================================== */
4
+
5
+ /**
6
+ * Set some basic styles for definition lists.
7
+ */
8
+
9
+ dl {
10
+ dt {
11
+ font-weight: @definition-lists-font-weight;
12
+ color: @definition-lists-text-color;
13
+ }
14
+ dd {
15
+ margin: 0;
16
+ }
17
+ }
18
+
19
+ /**
20
+ * Reset the left margin for <ol> and <ul> elements.
21
+ */
22
+
23
+ ol,
24
+ ul {
25
+ li {
26
+ .to-rem(margin-left, @list-item-margin-left);
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Set nested `list-style` types for ordered lists.
32
+ */
33
+
34
+ ol {
35
+ list-style: decimal;
36
+ & & {
37
+ list-style: upper-alpha;
38
+ }
39
+ & & & {
40
+ list-style: lower-roman;
41
+ }
42
+ & & & & {
43
+ list-style: lower-alpha;
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Remove `margin-bottom` on nested lists.
49
+ */
50
+
51
+ ol,
52
+ ul {
53
+ ol,
54
+ ul {
55
+ margin-bottom: 0;
56
+ }
57
+ }
@@ -0,0 +1,69 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Print ($core-base-print)
3
+ \* ========================================================================== */
4
+
5
+ @media print {
6
+ /* 1. Black prints faster - http://cbrac.co/XvusCs */
7
+ * {
8
+ color: @print-text-color !important; /* 1 */
9
+ background: transparent !important;
10
+ box-shadow: none !important;
11
+ text-shadow: none !important;
12
+ }
13
+
14
+ @page {
15
+ margin: 0.5cm;
16
+ }
17
+
18
+ a,
19
+ a:visited {
20
+ text-decoration: underline;
21
+ }
22
+
23
+ a[href]:after {
24
+ content: " (" attr(href) ")";
25
+ }
26
+
27
+ /* Don’t show links for images, or javascript/internal links */
28
+ a[href^="#"]:after,
29
+ a[href^="javascript:"]:after {
30
+ content: "";
31
+ }
32
+
33
+ abbr[title]:after {
34
+ content: " (" attr(title) ")";
35
+ }
36
+
37
+ blockquote,
38
+ pre {
39
+ border: 1px solid @color-gray-dark;
40
+
41
+ page-break-inside: avoid;
42
+ }
43
+
44
+ h2,
45
+ h3,
46
+ p {
47
+ orphans: 3;
48
+ widows: 3;
49
+ }
50
+
51
+ h2,
52
+ h3 {
53
+ page-break-after: avoid;
54
+ }
55
+
56
+ img,
57
+ tr {
58
+ page-break-inside: avoid;
59
+ }
60
+
61
+ img {
62
+ max-width: 100% !important;
63
+ }
64
+
65
+ /* 1. http://cbrac.co/Q6s1o2 */
66
+ thead {
67
+ display: table-header-group; /* 1 */
68
+ }
69
+ }
@@ -0,0 +1,90 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Root ($core-base-root)
3
+ \* ========================================================================== */
4
+
5
+ /**
6
+ * The <html> element.
7
+ *
8
+ * 1. Set the default `font-size` and `line-height` for the project based on
9
+ variables set previously. The `font-size` is represented in `rem`s, and
10
+ the `line-height` is represented as a unitless value.
11
+ * 2. Force a vertical scrollbar.
12
+ * @link http://cbrac.co/163MspB
13
+ * 3. Ensure the <html> element's `height` is at least the viewport height.
14
+ *
15
+ * NOTES:
16
+ *
17
+ * Use `text-rendering` with caution.
18
+ * @link http://cbrac.co/SJt8p1
19
+ *
20
+ * Avoid the webkit anti-aliasing trap.
21
+ * @link http://cbrac.co/TAdhbH
22
+ *
23
+ * IE for Windows Phone 8 ignores `-ms-text-size-adjust` if the viewport <meta>
24
+ * tag is used.
25
+ * @link http://cbrac.co/1cFrAvl
26
+ */
27
+
28
+ html {
29
+ font-family: @font-family-sans-serif;
30
+ .to-rem(font-size, @font-size); /* 1 */
31
+ line-height: @line-height-ratio; /* 1 */
32
+ overflow-y: scroll; /* 2 */
33
+ height: 100%; /* 3 */
34
+ background-color: @root-background-color;
35
+ color: @root-text-color;
36
+ }
37
+
38
+ /**
39
+ * The <body> element.
40
+ *
41
+ * 1. Ensure the <body> element's `min-height` is at least the viewport height.
42
+ */
43
+
44
+ body {
45
+ min-height: 100%; /* [1] */
46
+ }
47
+
48
+ /**
49
+ * Set a consistent margin for common elements to maintain vertical rhythm.
50
+ */
51
+
52
+ blockquote,
53
+ dl,
54
+ figure,
55
+ h1,
56
+ h2,
57
+ h3,
58
+ h4,
59
+ h5,
60
+ h6,
61
+ .h1,
62
+ .h2,
63
+ .h3,
64
+ .h4,
65
+ .h5,
66
+ .h6,
67
+ hr,
68
+ menu,
69
+ ol,
70
+ p,
71
+ pre,
72
+ summary,
73
+ table,
74
+ ul {
75
+ .to-rem(margin-bottom, @spacing-base);
76
+ }
77
+
78
+ /**
79
+ * Add word wrapping and basic hyphenation to common elements.
80
+ */
81
+
82
+ caption,
83
+ p,
84
+ table,
85
+ td,
86
+ textarea,
87
+ th {
88
+ word-wrap: break-word;
89
+ hyphens: auto;
90
+ }
@@ -0,0 +1,30 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Selections ($core-base-selections)
3
+ \* ========================================================================== */
4
+
5
+ /**
6
+ * 1. Customize `background` for text selections.
7
+ * 2. Remove `text-shadow` selection highlight.
8
+ * @link http://cbrac.co/Q6swON
9
+ */
10
+
11
+ ::selection {
12
+ background: @selection-background-color; /* 1 */
13
+ text-shadow: none; /* 2 */
14
+
15
+ /**
16
+ * Change `background` for text selections when browser is unfocused
17
+ */
18
+
19
+ &:window-inactive {
20
+ background: @selection-inactive-background-color;
21
+ }
22
+
23
+ /**
24
+ * Remove `background` on images when selected
25
+ */
26
+
27
+ img& {
28
+ background: transparent;
29
+ }
30
+ }
@@ -0,0 +1,18 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Tables ($core-base-tables)
3
+ \* ========================================================================== */
4
+
5
+ table {
6
+ width: 100%;
7
+ empty-cells: show;
8
+ }
9
+
10
+ th,
11
+ tfoot td {
12
+ text-align: left;
13
+ }
14
+
15
+ th,
16
+ td {
17
+ overflow: visible;
18
+ }
@@ -0,0 +1,83 @@
1
+ /* ========================================================================== *\
2
+ Core -> Base -> Text Elements ($core-base-text-elements)
3
+ \* ========================================================================== */
4
+
5
+ /**
6
+ * Add a help cursor to elements that need one.
7
+ */
8
+
9
+ abbr,
10
+ acronym,
11
+ dfn[title] {
12
+ cursor: help;
13
+ }
14
+
15
+ /**
16
+ * Remove `text-decoration` on links inside <abbr> elements, since there are
17
+ * already border styles on the <abbr> element.
18
+ */
19
+
20
+ abbr a {
21
+ text-decoration: none;
22
+ }
23
+
24
+ /**
25
+ * Set <acronym> elements to be uppercase by default.
26
+ */
27
+
28
+ acronym {
29
+ text-transform: uppercase;
30
+ }
31
+
32
+ /**
33
+ * Set some basic styles for <del> tags.
34
+ */
35
+
36
+ del {
37
+ font-style: @text-del-font-style;
38
+ text-decoration: @text-del-text-decoration;
39
+ color: @text-del-text-color;
40
+ }
41
+
42
+ /**
43
+ * Give <details> elements a pointer cursor.
44
+ */
45
+
46
+ details {
47
+ cursor: pointer;
48
+ }
49
+
50
+ /**
51
+ * Set some basic styles for definition lists.
52
+ */
53
+
54
+ dl {
55
+ dt {
56
+ font-weight: @text-dt-font-weight;
57
+ color: @text-dt-text-color;
58
+ }
59
+ dd {
60
+ margin: 0;
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Ensure commonly italicized elements are italicized.
66
+ */
67
+
68
+ em,
69
+ i,
70
+ cite {
71
+ font-style: italic;
72
+ }
73
+
74
+ /**
75
+ * Address styling not present in IE9.
76
+ */
77
+
78
+ ins,
79
+ mark {
80
+ text-decoration: none;
81
+ color: @text-highlights-text-color;
82
+ background: @text-highlights-bg-color;
83
+ }
@@ -0,0 +1,154 @@
1
+ /* ========================================================================== *\
2
+ Core -> Debug ($core-debug)
3
+ \* ========================================================================== */
4
+
5
+ //
6
+ // DO NOT USE THIS STYLESHEET IN PRODUCTION!
7
+ //
8
+ // This stylesheet is for developers only. It can help you visually detect any
9
+ // nesting issues, invalid markup, or inaccessible code in your project.
10
+ //
11
+ // @link http://cbrac.co/1C01g8C
12
+ //
13
+ // DO NOT USE THIS STYLESHEET IN PRODUCTION!
14
+ //
15
+
16
+ @debug-outline-width: 5px;
17
+ @debug-outline-style: solid;
18
+ @debug-outline-color-error: red;
19
+ @debug-outline-color-warning: yellow;
20
+
21
+ //
22
+ // Debug
23
+ //
24
+ // red = error
25
+ // yellow = warning
26
+ // none = no issues
27
+ //
28
+
29
+ /**
30
+ * Images require `alt` attributes, empty `alt` is fine but should be
31
+ * double-checked, no `alt` is bad.
32
+ */
33
+
34
+ img {
35
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-error !important;
36
+ }
37
+
38
+ img[alt] {
39
+ outline: none !important;
40
+ }
41
+
42
+ img[alt=""] {
43
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
44
+ }
45
+
46
+ /**
47
+ * Double-check any links whose `href` is something questionable.
48
+ */
49
+
50
+ a[href=""],
51
+ a[href="#"],
52
+ a[href*="javascript"] {
53
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
54
+ }
55
+
56
+ /**
57
+ * Try to avoid using the `target` attribute.
58
+ */
59
+
60
+ a[target] {
61
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
62
+ }
63
+
64
+
65
+ /**
66
+ * Ensure any lists only contain <li> as children.
67
+ */
68
+
69
+ ul,
70
+ ol {
71
+ > *:not(li) {
72
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-error !important;
73
+ }
74
+ }
75
+
76
+ /**
77
+ * It's always nice to give <th> the `scope` attribute.
78
+ */
79
+
80
+ th {
81
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
82
+ }
83
+
84
+ th[scope] {
85
+ outline: none !important;
86
+ }
87
+
88
+
89
+ /**
90
+ * <tr> as child of <table> ain't great, did you need a <thead> or <tbody>?
91
+ */
92
+
93
+ table > tr {
94
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
95
+ }
96
+
97
+
98
+ /**
99
+ * `tfoot` needs to come *before* `tbody`.
100
+ */
101
+
102
+ tbody + tfoot {
103
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
104
+ }
105
+
106
+
107
+ /**
108
+ * Forms require `action` attributes.
109
+ */
110
+
111
+ form {
112
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-error !important;
113
+ }
114
+
115
+ form[action] {
116
+ outline: none !important;
117
+ }
118
+
119
+
120
+ /**
121
+ * Various form-field types have required attributes. <input> needs a `type`
122
+ * attribute, <textarea> needs `rows` and `cols` attributes, and submit buttons
123
+ * need a `value` attribute.
124
+ */
125
+
126
+ textarea,
127
+ input {
128
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-error !important;
129
+ }
130
+
131
+ input[type] {
132
+ outline: none !important;
133
+ }
134
+
135
+ textarea[rows][cols] {
136
+ outline: none !important;
137
+ }
138
+
139
+ input[type=submit] {
140
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-error !important;
141
+ }
142
+
143
+ input[type=submit][value] {
144
+ outline: none !important;
145
+ }
146
+
147
+
148
+ /**
149
+ * Avoid inline styles wherever possible.
150
+ */
151
+
152
+ [style] {
153
+ outline: @debug-outline-width @debug-outline-style @debug-outline-color-warning !important;
154
+ }