You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inline all SVGs for the workbench when building #8516
Do you recall why for HC theme we do this? If we inline all SVGs, we end up duplicating the data URI value if we reference the image multiple times. Maybe there is a way to avoid this and still have a good looking HC theme?
The reason why we historically started doing pseudo elements with content is because of Windows' high-contrast mode. When in high-contrast mode, Edge and Internet Explorer both remove all background images (thus all of our icons that are used in background images, which is most). To get around this we used the pseudo elements to insert images inline via content. See this issue #3690 for more info and for a media query solution that would make it so would no longer need to do anything special for high-contrast theme to make icons display in background.
Brad Gashler (@bgashler1) I commented on that issue, imho we should make this change and delete all our custom HC rules. This would not only enable this issue for inlining but also make it much easier to introduce new icons to Code because you don't have to deal with this ugly hack.
changed the title [-]Explore to inline all SVGs for the workbench when building[/-][+]Inline all SVGs for the workbench when building[/+]on Jul 11, 2016
Activity
bpasero commentedon Jul 6, 2016
Brad Gashler (@bgashler1) we have many places in code where the same SVG is referenced in a rule with
backgroundandcontent(e.g. https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/browser/parts/editor/media/titlecontrol.css#L114 and https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/browser/parts/editor/media/titlecontrol.css#L126).Do you recall why for HC theme we do this? If we inline all SVGs, we end up duplicating the data URI value if we reference the image multiple times. Maybe there is a way to avoid this and still have a good looking HC theme?
bpasero commentedon Jul 6, 2016
Interesting, on Mac comparing the 2 application bundles I see this:
152.424.577bytes (158,9MB on disk)152.386.366bytes (159,7MB on disk)So, in raw bytes we loose, but in terms of allocated disk space we win :)
bgashler1 commentedon Jul 6, 2016
Benjamin Pasero (@bpasero):
Removing junk metadata and unused classes I think can be done automatically with this or another gulp package https://www.npmjs.com/package/gulp-svgmin
The reason why we historically started doing pseudo elements with
contentis because of Windows' high-contrast mode. When in high-contrast mode, Edge and Internet Explorer both remove all background images (thus all of our icons that are used in background images, which is most). To get around this we used the pseudo elements to insert images inline viacontent. See this issue #3690 for more info and for a media query solution that would make it so would no longer need to do anything special for high-contrast theme to make icons display in background.bpasero commentedon Jul 9, 2016
Brad Gashler (@bgashler1) I commented on that issue, imho we should make this change and delete all our custom HC rules. This would not only enable this issue for inlining but also make it much easier to introduce new icons to Code because you don't have to deal with this ugly hack.
[-]Explore to inline all SVGs for the workbench when building[/-][+]Inline all SVGs for the workbench when building[/+]bpasero commentedon Jul 11, 2016
Pushed to master. I got rid of our high contrast CSS hacks for background image.