Skip to content

Commit 1b58ff1

Browse files
committed
Update dependency sprockets to 4.2.1
1 parent 5dd454c commit 1b58ff1

5 files changed

Lines changed: 59 additions & 65 deletions

File tree

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ group :app do
2020
gem 'rack-ssl-enforcer'
2121
gem 'rack'
2222
gem 'rss'
23-
gem 'sass'
23+
gem 'sassc'
2424
gem 'sinatra-contrib'
2525
gem 'sinatra'
2626
gem 'sprockets-helpers'
27-
gem 'sprockets-sass'
2827
gem 'sprockets'
2928
gem 'thin'
3029
end

Gemfile.lock

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,15 @@ GEM
7373
rack-test (2.1.0)
7474
rack (>= 1.3)
7575
rake (13.0.6)
76-
rb-fsevent (0.11.2)
77-
rb-inotify (0.10.1)
78-
ffi (~> 1.0)
7976
redcarpet (3.6.0)
8077
rexml (3.2.6)
8178
rouge (1.11.1)
8279
rr (3.1.0)
8380
rss (0.3.0)
8481
rexml
8582
ruby2_keywords (0.0.5)
86-
sass (3.7.4)
87-
sass-listen (~> 4.0.0)
88-
sass-listen (4.0.0)
89-
rb-fsevent (~> 0.9, >= 0.9.4)
90-
rb-inotify (~> 0.9, >= 0.9.7)
83+
sassc (2.4.0)
84+
ffi (~> 1.9)
9185
sinatra (3.1.0)
9286
mustermann (~> 3.0)
9387
rack (~> 2.2, >= 2.2.4)
@@ -99,13 +93,11 @@ GEM
9993
rack-protection (= 3.1.0)
10094
sinatra (= 3.1.0)
10195
tilt (~> 2.0)
102-
sprockets (3.7.2)
96+
sprockets (4.2.1)
10397
concurrent-ruby (~> 1.0)
104-
rack (> 1, < 3)
98+
rack (>= 2.2.4, < 4)
10599
sprockets-helpers (1.4.0)
106100
sprockets (>= 2.2)
107-
sprockets-sass (2.0.0.beta2)
108-
sprockets (>= 2.0, < 4.0)
109101
strings (0.2.1)
110102
strings-ansi (~> 0.2)
111103
unicode-display_width (>= 1.5, < 3.0)
@@ -159,12 +151,11 @@ DEPENDENCIES
159151
redcarpet
160152
rr
161153
rss
162-
sass
154+
sassc
163155
sinatra
164156
sinatra-contrib
165157
sprockets
166158
sprockets-helpers
167-
sprockets-sass
168159
terminal-table
169160
terser
170161
thin

assets/stylesheets/application.css.scss renamed to assets/stylesheets/application.css.scss.erb

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,61 @@
1010
* http://mozilla.org/MPL/2.0/
1111
*/
1212

13+
/* https://github.com/rails/sass-rails/issues/139 */
14+
15+
<% manifest = JSON.parse(File.read('assets/images/sprites/docs.json')) %>
16+
17+
%svg-icon {
18+
display: inline-block;
19+
vertical-align: top;
20+
width: 1rem;
21+
height: 1rem;
22+
pointer-events: none;
23+
fill: currentColor;
24+
}
25+
26+
%doc-icon {
27+
content: '';
28+
display: block;
29+
width: 1rem;
30+
height: 1rem;
31+
background-image: image-url('sprites/docs.png');
32+
background-size: <%= manifest['icons_per_row'] %>rem <%= manifest['icons_per_row'] %>rem;
33+
}
34+
35+
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
36+
%doc-icon { background-image: image-url('sprites/[email protected]'); }
37+
}
38+
39+
html._theme-dark {
40+
%darkIconFix {
41+
filter: invert(100%) grayscale(100%);
42+
-webkit-filter: invert(100%) grayscale(100%);
43+
}
44+
}
45+
46+
<%=
47+
items = []
48+
49+
manifest['items'].each do |item|
50+
rules = []
51+
rules << "background-position: -#{item['col']}rem -#{item['row']}rem;"
52+
rules << "@extend %darkIconFix !optional;" if item['dark_icon_fix']
53+
items << "._icon-#{item['type']}:before { #{rules.join(' ')} }"
54+
end
55+
56+
items.join('')
57+
%>
58+
59+
._hide-in-development {
60+
<%= App.environment != :production ? 'display: none;' : '' %>
61+
}
62+
63+
1364
@import 'global/variables-light',
1465
'global/variables-dark',
1566
'global/variables',
1667
'global/mixins',
17-
'global/icons',
1868
'global/classes',
1969
'global/base';
2070

@@ -29,8 +79,8 @@
2979
'components/path',
3080
'components/notice',
3181
'components/prism',
32-
'components/mobile',
33-
'components/environment';
82+
'components/mobile';
83+
3484

3585
@import 'pages/simple',
3686
'pages/angular',

assets/stylesheets/components/_environment.scss.erb

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/stylesheets/global/_icons.scss.erb

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)