|
|
@@ -10,11 +10,61 @@
|
|
|
* http://mozilla.org/MPL/2.0/
|
|
|
*/
|
|
|
|
|
|
+/* https://github.com/rails/sass-rails/issues/139 */
|
|
|
+
|
|
|
+<% manifest = JSON.parse(File.read('assets/images/sprites/docs.json')) %>
|
|
|
+
|
|
|
+%svg-icon {
|
|
|
+ display: inline-block;
|
|
|
+ vertical-align: top;
|
|
|
+ width: 1rem;
|
|
|
+ height: 1rem;
|
|
|
+ pointer-events: none;
|
|
|
+ fill: currentColor;
|
|
|
+}
|
|
|
+
|
|
|
+%doc-icon {
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ width: 1rem;
|
|
|
+ height: 1rem;
|
|
|
+ background-image: image-url('sprites/docs.png');
|
|
|
+ background-size: <%= manifest['icons_per_row'] %>rem <%= manifest['icons_per_row'] %>rem;
|
|
|
+}
|
|
|
+
|
|
|
+@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
|
|
|
+ %doc-icon { background-image: image-url('sprites/docs@2x.png'); }
|
|
|
+}
|
|
|
+
|
|
|
+html._theme-dark {
|
|
|
+ %darkIconFix {
|
|
|
+ filter: invert(100%) grayscale(100%);
|
|
|
+ -webkit-filter: invert(100%) grayscale(100%);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+<%=
|
|
|
+ items = []
|
|
|
+
|
|
|
+ manifest['items'].each do |item|
|
|
|
+ rules = []
|
|
|
+ rules << "background-position: -#{item['col']}rem -#{item['row']}rem;"
|
|
|
+ rules << "@extend %darkIconFix !optional;" if item['dark_icon_fix']
|
|
|
+ items << "._icon-#{item['type']}:before { #{rules.join(' ')} }"
|
|
|
+ end
|
|
|
+
|
|
|
+ items.join('')
|
|
|
+ %>
|
|
|
+
|
|
|
+._hide-in-development {
|
|
|
+ <%= App.environment != :production ? 'display: none;' : '' %>
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
@import 'global/variables-light',
|
|
|
'global/variables-dark',
|
|
|
'global/variables',
|
|
|
'global/mixins',
|
|
|
- 'global/icons',
|
|
|
'global/classes',
|
|
|
'global/base';
|
|
|
|
|
|
@@ -29,8 +79,8 @@
|
|
|
'components/path',
|
|
|
'components/notice',
|
|
|
'components/prism',
|
|
|
- 'components/mobile',
|
|
|
- 'components/environment';
|
|
|
+ 'components/mobile';
|
|
|
+
|
|
|
|
|
|
@import 'pages/simple',
|
|
|
'pages/angular',
|