face_of_active_admin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +21 -0
  4. data/app/assets/images/face_of_active_admin/logo.jpg +0 -0
  5. data/app/assets/javascripts/face_of_active_admin/base.js.coffee +34 -0
  6. data/app/assets/stylesheets/face_of_active_admin/_base.scss +38 -0
  7. data/app/assets/stylesheets/face_of_active_admin/_forms.scss +551 -0
  8. data/app/assets/stylesheets/face_of_active_admin/_header.scss +283 -0
  9. data/app/assets/stylesheets/face_of_active_admin/_mixins.scss +1 -0
  10. data/app/assets/stylesheets/face_of_active_admin/_typography.scss +250 -0
  11. data/app/assets/stylesheets/face_of_active_admin/components/_batch_actions.scss +13 -0
  12. data/app/assets/stylesheets/face_of_active_admin/components/_blank_slates.scss +32 -0
  13. data/app/assets/stylesheets/face_of_active_admin/components/_breadcrumbs.scss +27 -0
  14. data/app/assets/stylesheets/face_of_active_admin/components/_buttons.scss +16 -0
  15. data/app/assets/stylesheets/face_of_active_admin/components/_ckeditor.scss +6 -0
  16. data/app/assets/stylesheets/face_of_active_admin/components/_columns.scss +3 -0
  17. data/app/assets/stylesheets/face_of_active_admin/components/_comments.scss +52 -0
  18. data/app/assets/stylesheets/face_of_active_admin/components/_date_picker.scss +315 -0
  19. data/app/assets/stylesheets/face_of_active_admin/components/_dropdown_menu.scss +161 -0
  20. data/app/assets/stylesheets/face_of_active_admin/components/_flash_messages.scss +44 -0
  21. data/app/assets/stylesheets/face_of_active_admin/components/_grid.scss +57 -0
  22. data/app/assets/stylesheets/face_of_active_admin/components/_index_list.scss +12 -0
  23. data/app/assets/stylesheets/face_of_active_admin/components/_init.scss +16 -0
  24. data/app/assets/stylesheets/face_of_active_admin/components/_links.scss +8 -0
  25. data/app/assets/stylesheets/face_of_active_admin/components/_modal_dialog.scss +67 -0
  26. data/app/assets/stylesheets/face_of_active_admin/components/_nav.scss +64 -0
  27. data/app/assets/stylesheets/face_of_active_admin/components/_pagination.scss +70 -0
  28. data/app/assets/stylesheets/face_of_active_admin/components/_panels.scss +89 -0
  29. data/app/assets/stylesheets/face_of_active_admin/components/_popovers.scss +124 -0
  30. data/app/assets/stylesheets/face_of_active_admin/components/_scopes.scss +10 -0
  31. data/app/assets/stylesheets/face_of_active_admin/components/_status_tags.scss +28 -0
  32. data/app/assets/stylesheets/face_of_active_admin/components/_table_tools.scss +70 -0
  33. data/app/assets/stylesheets/face_of_active_admin/components/_tables.scss +305 -0
  34. data/app/assets/stylesheets/face_of_active_admin/mixins/_all.scss +11 -0
  35. data/app/assets/stylesheets/face_of_active_admin/mixins/_buttons.scss +71 -0
  36. data/app/assets/stylesheets/face_of_active_admin/mixins/_gradients.scss +52 -0
  37. data/app/assets/stylesheets/face_of_active_admin/mixins/_icons.scss +31 -0
  38. data/app/assets/stylesheets/face_of_active_admin/mixins/_reset.scss +214 -0
  39. data/app/assets/stylesheets/face_of_active_admin/mixins/_rounded.scss +42 -0
  40. data/app/assets/stylesheets/face_of_active_admin/mixins/_sections.scss +38 -0
  41. data/app/assets/stylesheets/face_of_active_admin/mixins/_select.scss +22 -0
  42. data/app/assets/stylesheets/face_of_active_admin/mixins/_shadows.scss +21 -0
  43. data/app/assets/stylesheets/face_of_active_admin/mixins/_utilities.scss +17 -0
  44. data/app/assets/stylesheets/face_of_active_admin/mixins/_variables.scss +69 -0
  45. data/app/assets/stylesheets/face_of_active_admin/pages/_logged_out.scss +96 -0
  46. data/app/assets/stylesheets/face_of_active_admin/print.scss +283 -0
  47. data/app/assets/stylesheets/face_of_active_admin/structure/_footer.scss +28 -0
  48. data/app/assets/stylesheets/face_of_active_admin/structure/_main_structure.scss +86 -0
  49. data/app/assets/stylesheets/face_of_active_admin/structure/_title_bar.scss +69 -0
  50. data/config/routes.rb +2 -0
  51. data/lib/face_of_active_admin/version.rb +3 -0
  52. data/lib/face_of_active_admin.rb +10 -0
  53. data/lib/generators/face_of_active_admin/variables/USAGE +8 -0
  54. data/lib/generators/face_of_active_admin/variables/variables_generator.rb +12 -0
  55. metadata +126 -0
@@ -0,0 +1,305 @@
1
+ // ----------------------------------- Tables
2
+
3
+ table tr {
4
+ td {
5
+ vertical-align: top;
6
+ }
7
+ }
8
+
9
+ // --------- Index Tables
10
+
11
+ table.index_table {
12
+ width: 100%;
13
+ margin-bottom: 10px;
14
+ border: 1px solid #d3d8dc;
15
+ border-spacing: 0;
16
+ background: #fff;
17
+
18
+ th {
19
+ @include section-header;
20
+
21
+ text-align: left;
22
+ background: #f1f5f6;
23
+ border: 1px #d3d8dc;
24
+ border-style: none solid solid none;
25
+ padding: 7px 10px;
26
+
27
+ @include no-shadow;
28
+
29
+ color: $skinTextColor;
30
+
31
+ a, a:link, a:visited {
32
+ color: $skinTextColor;
33
+ text-decoration: none;
34
+ display: block;
35
+ white-space: nowrap;
36
+ -webkit-font-smoothing: antialiased;
37
+ }
38
+
39
+ &.sortable a {
40
+ position: relative;
41
+ padding-left: 20px;
42
+
43
+ &:before {
44
+ color: lighten($skinActiveColor, 10%);
45
+
46
+ @extend .fa;
47
+
48
+ @extend .fa-sort;
49
+
50
+ background: none;
51
+ position: absolute;
52
+ left: 5px;
53
+ top: 5px;
54
+ }
55
+ }
56
+
57
+ &.sorted-asc a {
58
+ position: relative;
59
+ padding-left: 20px;
60
+
61
+ &:before {
62
+ font-size: 1.5em;
63
+ color: lighten($skinActiveColor, 10%);
64
+
65
+ @extend .fa;
66
+
67
+ @extend .fa-sort-amount-asc;
68
+
69
+ background: none;
70
+ position: absolute;
71
+ left: -5px;
72
+ top: -3px;
73
+ }
74
+ }
75
+
76
+ &.sorted-desc a {
77
+ position: relative;
78
+ padding-left: 20px;
79
+
80
+ &:before {
81
+ color: lighten($skinActiveColor, 10%);
82
+ font-size: 1.5em;
83
+
84
+ @extend .fa;
85
+
86
+ @extend .fa-sort-amount-desc;
87
+
88
+ background: none;
89
+ position: absolute;
90
+ left: -5px;
91
+ top: -3px;
92
+ }
93
+ }
94
+
95
+ &.sorted-asc, &.sorted-desc {
96
+ background: $title-bar-background;
97
+
98
+ // @include gradient(darken($secondary-gradient-start, 5%), darken($secondary-gradient-stop, 5%));
99
+
100
+ }
101
+
102
+ &:last-child {
103
+ border-right: none;
104
+ }
105
+ }
106
+
107
+ tr.even td {
108
+ background: $table-stripe-color;
109
+ }
110
+
111
+ tr:hover td {
112
+ background-color: $table-selected-color;
113
+ }
114
+
115
+ tr.selected td {
116
+ background: $table-selected-color;
117
+ }
118
+
119
+ td {
120
+ padding: 10px $cell-horizontal-padding 8px $cell-horizontal-padding;
121
+ border-bottom: 1px solid #e8e8e8;
122
+ vertical-align: top;
123
+ color: $skinTextTable;
124
+
125
+ a, a:link, a:visited {
126
+ color: $skinTextTable;
127
+ display: inline-block;
128
+ padding: 2px 3px;
129
+ margin: (-2px) 0;
130
+ transition: $link_transition_dutarion;
131
+
132
+ &:hover {
133
+ color: #fff;
134
+ background: lighten($skinActiveColor, 10%);
135
+ }
136
+ }
137
+
138
+ a.delete_link {
139
+ &:hover {
140
+ background: darken($skinActiveColor, 10%);
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ // --------- Tables inside Panels
147
+
148
+ .panel_contents table {
149
+ margin-top: 5px;
150
+
151
+ th {
152
+ padding-top: 10px;
153
+ background: none;
154
+ color: $primary-color;
155
+
156
+ @include no-shadow;
157
+
158
+ text-transform: uppercase;
159
+ border-bottom: 1px solid #ccc;
160
+ }
161
+
162
+ tr.odd td {
163
+ background: darken($table-stripe-color, 3%);
164
+ }
165
+
166
+ tr.even td {
167
+ background: $table-stripe-color;
168
+ }
169
+ }
170
+
171
+ // -------------------------------------- Resource Attributes Table
172
+ .attributes_table {
173
+ overflow: hidden;
174
+ }
175
+
176
+ .attributes_table table {
177
+ col.even {
178
+ background: $table-stripe-color;
179
+ }
180
+
181
+ col.odd {
182
+ background: darken($table-stripe-color, 3%);
183
+ }
184
+
185
+ th, td {
186
+ padding: 8px $cell-horizontal-padding 6px $cell-horizontal-padding;
187
+ vertical-align: top;
188
+ border-bottom: 1px solid #e8e8e8;
189
+ }
190
+
191
+ th {
192
+ @include no-shadow;
193
+
194
+ @include no-gradient;
195
+
196
+ width: 150px;
197
+ font-weight: normal;
198
+ font-size: 1.2em;
199
+ padding: 10px 0 10px 10px;
200
+ font-family: $skinFontFamily;
201
+ text-transform: uppercase;
202
+ color: $primary-color;
203
+
204
+ @include text-shadow;
205
+ }
206
+
207
+ td {
208
+ padding: 10px 0 10px 10px;
209
+ font-family: $skinFontFamily;
210
+ color: $primary-color;
211
+
212
+ .empty {
213
+ color: #bbb;
214
+ font-size: 0.8em;
215
+ text-transform: uppercase;
216
+ letter-spacing: 0.2em;
217
+ }
218
+
219
+ &:first-child {
220
+ width: 25%;
221
+ }
222
+ }
223
+ }
224
+
225
+ .sidebar_section .attributes_table th {
226
+ width: 50px;
227
+ }
228
+
229
+ //-----------------------default table styling
230
+
231
+ table {
232
+ width: 100%;
233
+ max-width: 100%;
234
+ margin-bottom: 20px;
235
+ border: 1px solid lighten($primary-color, 35%);
236
+
237
+ // Cells
238
+ > thead,
239
+ > tbody,
240
+ > tfoot {
241
+ > tr {
242
+ > th,
243
+ > td {
244
+ padding: 6px;
245
+ line-height: 1.5;
246
+ vertical-align: top;
247
+
248
+ // border: 1px solid lighten( $primary-color, 35%);
249
+
250
+ }
251
+ }
252
+ }
253
+
254
+ // Bottom align for column headings
255
+ > thead > tr {
256
+ > th {
257
+ vertical-align: bottom;
258
+ border-bottom: 2px solid lighten($primary-color, 35%);
259
+ }
260
+
261
+ > th,
262
+ > td {
263
+ border-bottom-width: 2px;
264
+ }
265
+ }
266
+
267
+ > tbody > tr:hover {
268
+ background-color: $table-selected-color;
269
+ }
270
+
271
+ // Remove top border from thead by default
272
+ > caption + thead,
273
+ > colgroup + thead,
274
+ > thead:first-child {
275
+ > tr:first-child {
276
+ > th,
277
+ > td {
278
+ border-top: 0;
279
+ }
280
+ }
281
+ }
282
+
283
+ // Account for multiple tbody instances
284
+ > tbody + tbody {
285
+ border-top: 2px solid lighten($primary-color, 35%);
286
+ }
287
+
288
+ // Nesting
289
+ .table {
290
+ background-color: $main-background-color;
291
+ }
292
+ }
293
+
294
+ .table_actions {
295
+ text-align: center;
296
+
297
+ a.member_link {
298
+ text-decoration: none;
299
+
300
+ &:before {
301
+ font-size: 1.5em;
302
+ padding: 5px;
303
+ }
304
+ }
305
+ }
@@ -0,0 +1,11 @@
1
+ @import "face_of_active_admin/mixins/variables";
2
+ @import "face_of_active_admin/mixins/reset";
3
+ @import "face_of_active_admin/mixins/gradients";
4
+ @import "face_of_active_admin/mixins/shadows";
5
+ @import "face_of_active_admin/mixins/icons";
6
+ @import "face_of_active_admin/mixins/rounded";
7
+ @import "face_of_active_admin/mixins/buttons";
8
+ @import "face_of_active_admin/mixins/sections";
9
+ @import "face_of_active_admin/mixins/select";
10
+ @import "face_of_active_admin/mixins/utilities";
11
+ @import "bourbon";
@@ -0,0 +1,71 @@
1
+ @mixin basic-button {
2
+ @include rounded(0);
3
+
4
+ display: inline-block;
5
+ font-weight: bold;
6
+ font-size: 1.0em;
7
+ font-family: $skinFontFamily;
8
+ line-height: 12px;
9
+ margin-right: 3px;
10
+ padding: 7px 16px 6px;
11
+ text-decoration: none;
12
+ -webkit-font-smoothing: antialiased;
13
+
14
+ &.disabled {
15
+ opacity: 0.5;
16
+ cursor: default;
17
+ }
18
+ }
19
+
20
+ @mixin default-button {
21
+ @include basic-button;
22
+
23
+ background: $primary-color;
24
+
25
+ // @include text-shadow(#000);
26
+ // box-shadow: 0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0px rgba(255,255,255, 0.2) inset;
27
+ border: solid 1px #686868;
28
+ color: #efefef;
29
+
30
+ &:not(.disabled) {
31
+ &:hover {
32
+ background: darken($primary-color, 10%);
33
+ }
34
+
35
+ &:active {
36
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 0 0px #FFF;
37
+
38
+ @include gradient(lighten($primary-color, 8%), darken($primary-color, 17%));
39
+ }
40
+ }
41
+ }
42
+
43
+ @mixin light-button {
44
+ @include basic-button;
45
+
46
+ background: $action-button-default-background;
47
+
48
+ @include border-colors(#d3d3d3, #c7c7c7, #c2c2c2);
49
+
50
+ color: $action-button-default-text;
51
+
52
+ &:not(.disabled) {
53
+ &:hover {
54
+ background: $action-button-hover-background;
55
+ color: $action-button-hover-text;
56
+ }
57
+
58
+ &:active {
59
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22) inset, 0 1px 0 0px #EEE;
60
+
61
+ @include border-colors(#c2c2c2, #b9b9b9, #b7b7b7);
62
+
63
+ background: $action-button-active-background;
64
+ color: $action-button-active-text;
65
+ }
66
+ }
67
+ }
68
+
69
+ @mixin dark-button {
70
+ @include default-button;
71
+ }
@@ -0,0 +1,52 @@
1
+ $secondary-gradient-start: #efefef !default;
2
+ $secondary-gradient-stop: #dfe1e2 !default;
3
+
4
+ @mixin gradient($start, $end) {
5
+ background: $start;
6
+ background: -webkit-linear-gradient(-90deg, $start, $end);
7
+ background: -moz-linear-gradient(-90deg, $start, $end);
8
+ background: linear-gradient(-90deg, $start, $end);
9
+
10
+ // IE 6 & 7
11
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($end)}');
12
+
13
+ // IE 8
14
+ -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($end)}');
15
+ }
16
+
17
+ @mixin header-background-gradient {
18
+ background: $page-header-background-color;
19
+ }
20
+
21
+ @mixin title-bar-gradient {
22
+ background: $title-bar-background;
23
+ }
24
+
25
+ @mixin primary-gradient {
26
+ // background: $secondary-color;
27
+ @include gradient(lighten($primary-color, 5%), darken($primary-color, 7%));
28
+
29
+ border-bottom: 1px solid darken($primary-color, 11%);
30
+ }
31
+
32
+ // @mixin secondary-gradient {
33
+ // @include gradient($secondary-gradient-start, $secondary-gradient-stop);
34
+ // }
35
+
36
+ @mixin highlight-gradient {
37
+ @include gradient(#75a1c2, #608cb4);
38
+ }
39
+
40
+ @mixin reverse-highlight-gradient {
41
+ @include gradient(#608cb4, #75a1c2);
42
+ }
43
+
44
+ @mixin no-gradient {
45
+ background: none;
46
+
47
+ // IE 6 & 7
48
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
49
+
50
+ // IE 8
51
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
52
+ }
@@ -0,0 +1,31 @@
1
+ span.icon {
2
+ vertical-align: middle;
3
+ display: inline-block;
4
+ }
5
+
6
+ span.icon svg {
7
+ vertical-align: baseline;
8
+ }
9
+
10
+ @mixin icon-color($color) {
11
+ span.icon svg {
12
+ path, polygon, rect, circle {
13
+ fill: $color !important;
14
+ }
15
+ }
16
+ }
17
+
18
+ @mixin icon-size($size) {
19
+ span.icon {
20
+ width: $size;
21
+ height: $size;
22
+ }
23
+ }
24
+
25
+ @mixin icon($color, $size) {
26
+ @include icon-color($color);
27
+
28
+ @include icon-size($size);
29
+ }
30
+
31
+ @include icon-size(0.8em);
@@ -0,0 +1,214 @@
1
+ // FROM The Compass Framework (compass-style.org)
2
+ //
3
+ // Copyright (c) 2009 Christopher M. Eppstein
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ // this software and associated documentation files (the "Software"), to deal in
7
+ // the Software without restriction, including without limitation the rights to
8
+ // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ // the Software, and to permit persons to whom the Software is furnished to do so,
10
+ // subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software. No attribution is required by
14
+ // products that make use of this software.
15
+ //
16
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ //
23
+ // Except as contained in this notice, the name(s) of the above copyright holders
24
+ // shall not be used in advertising or otherwise to promote the sale, use or other
25
+ // dealings in this Software without prior written authorization.
26
+ //
27
+ // Contributors to this project agree to grant all rights to the copyright holder
28
+ // of the primary product. Attribution is maintained in the source control history
29
+ // of the product.
30
+ //
31
+ // Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
32
+ // Global reset rules.
33
+ // For more specific resets, use the reset mixins provided below
34
+ //
35
+ // *Please Note*: tables still need `cellspacing="0"` in the markup.
36
+ @mixin global-reset {
37
+ html, body, div, span, applet, object, iframe,
38
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
39
+ a, abbr, acronym, address, big, cite, code,
40
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
41
+ small, strike, strong, sub, sup, tt, var,
42
+ dl, dt, dd, ol, ul, li,
43
+ fieldset, form, label, legend,
44
+ table, caption, tbody, tfoot, thead, tr, th, td {
45
+ @include reset-box-model;
46
+
47
+ @include reset-font;
48
+ }
49
+
50
+ body {
51
+ @include reset-body;
52
+ }
53
+
54
+ ol, ul {
55
+ @include reset-list-style;
56
+ }
57
+
58
+ table {
59
+ @include reset-table;
60
+ }
61
+
62
+ caption, th, td {
63
+ @include reset-table-cell;
64
+ }
65
+
66
+ q, blockquote {
67
+ @include reset-quotation;
68
+ }
69
+
70
+ a img {
71
+ @include reset-image-anchor-border;
72
+ }
73
+ }
74
+
75
+ // Reset all elements within some selector scope. To reset the selector itself,
76
+ // mixin the appropriate reset mixin for that element type as well. This could be
77
+ // useful if you want to style a part of your page in a dramatically different way.
78
+ //
79
+ // *Please Note*: tables still need `cellspacing="0"` in the markup.
80
+ @mixin nested-reset {
81
+ div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
82
+ pre, a, abbr, acronym, address, code, del, dfn, em, img,
83
+ dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
84
+ @include reset-box-model;
85
+
86
+ @include reset-font;
87
+ }
88
+
89
+ table {
90
+ @include reset-table;
91
+ }
92
+
93
+ caption, th, td {
94
+ @include reset-table-cell;
95
+ }
96
+
97
+ q, blockquote {
98
+ @include reset-quotation;
99
+ }
100
+
101
+ a img {
102
+ @include reset-image-anchor-border;
103
+ }
104
+ }
105
+
106
+ // Reset the box model measurements.
107
+ @mixin reset-box-model {
108
+ margin: 0;
109
+ padding: 0;
110
+ border: 0;
111
+ outline: 0;
112
+ }
113
+
114
+ // Reset the font and vertical alignment.
115
+ @mixin reset-font {
116
+ font: {
117
+ weight: inherit;
118
+ style: inherit;
119
+ size: 100%;
120
+ family: inherit;
121
+ };
122
+ vertical-align: baseline;
123
+ }
124
+
125
+ // Resets the outline when focus.
126
+ // For accessibility you need to apply some styling in its place.
127
+ @mixin reset-focus {
128
+ outline: 0;
129
+ }
130
+
131
+ // Reset a body element.
132
+ @mixin reset-body {
133
+ line-height: 1;
134
+ color: black;
135
+ background: white;
136
+ }
137
+
138
+ // Reset the list style of an element.
139
+ @mixin reset-list-style {
140
+ list-style: none;
141
+ }
142
+
143
+ // Reset a table
144
+ @mixin reset-table {
145
+ border-collapse: separate;
146
+ border-spacing: 0;
147
+ vertical-align: middle;
148
+ }
149
+
150
+ // Reset a table cell (`th`, `td`)
151
+ @mixin reset-table-cell {
152
+ text-align: left;
153
+ font-weight: normal;
154
+ vertical-align: middle;
155
+ }
156
+
157
+ // Reset a quotation (`q`, `blockquote`)
158
+ @mixin reset-quotation {
159
+ quotes: "" "";
160
+
161
+ &:before, &:after {
162
+ content: "";
163
+ }
164
+ }
165
+
166
+ // Resets the border.
167
+ @mixin reset-image-anchor-border {
168
+ border: none;
169
+ }
170
+
171
+ // Unrecognized elements are displayed inline.
172
+ // This reset provides a basic reset for html5 elements
173
+ // so they are rendered correctly in browsers that don't recognize them
174
+ // and reset in browsers that have default styles for them.
175
+ @mixin reset-html5 {
176
+ article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
177
+ @include reset-box-model;
178
+
179
+ display: block;
180
+ }
181
+ }
182
+
183
+ // Resets the display of inline and block elements to their default display
184
+ // according to their tag type. Elements that have a default display that varies across
185
+ // versions of html or browser are not handled here, but this covers the 90% use case.
186
+ // Usage Example:
187
+ //
188
+ // // Turn off the display for both of these classes
189
+ // .unregistered-only, .registered-only
190
+ // display: none
191
+ // // Now turn only one of them back on depending on some other context.
192
+ // body.registered
193
+ // +reset-display(".registered-only")
194
+ // body.unregistered
195
+ // +reset-display(".unregistered-only")
196
+ @mixin reset-display($selector: "", $important: false) {
197
+ #{append-selector(elements-of-type("inline"), $selector)} {
198
+ @if $important {
199
+ display: inline !important;
200
+ }
201
+ @else {
202
+ display: inline;
203
+ }
204
+ }
205
+
206
+ #{append-selector(elements-of-type("block"), $selector)} {
207
+ @if $important {
208
+ display: block !important;
209
+ }
210
+ @else {
211
+ display: block;
212
+ }
213
+ }
214
+ }