Merge pull request #2106 from freeCodeCamp/sprockets

Update dependency sprockets to 4.2.1
pull/2111/head
Simon Legner 1 year ago committed by GitHub
commit 75e39c8572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,11 +20,10 @@ group :app do
gem 'rack-ssl-enforcer'
gem 'rack'
gem 'rss'
gem 'sass'
gem 'sassc'
gem 'sinatra-contrib'
gem 'sinatra'
gem 'sprockets-helpers'
gem 'sprockets-sass'
gem 'sprockets'
gem 'thin'
end

@ -84,9 +84,6 @@ GEM
rack-test (2.1.0)
rack (>= 1.3)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.6.0)
rexml (3.2.6)
rouge (1.11.1)
@ -94,11 +91,8 @@ GEM
rss (0.3.0)
rexml
ruby2_keywords (0.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
sinatra (3.1.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
@ -110,13 +104,11 @@ GEM
rack-protection (= 3.1.0)
sinatra (= 3.1.0)
tilt (~> 2.0)
sprockets (3.7.2)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
rack (>= 2.2.4, < 4)
sprockets-helpers (1.4.0)
sprockets (>= 2.2)
sprockets-sass (2.0.0.beta2)
sprockets (>= 2.0, < 4.0)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
@ -170,12 +162,11 @@ DEPENDENCIES
redcarpet
rr
rss
sass
sassc
sinatra
sinatra-contrib
sprockets
sprockets-helpers
sprockets-sass
terminal-table
terser
thin

@ -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',

@ -1,3 +0,0 @@
._hide-in-development {
<%= App.environment != :production ? 'display: none;' : '' %>
}

@ -1,43 +0,0 @@
<% 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('')
%>
Loading…
Cancel
Save