Make background SVGs consistent #5478
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensures that all background SVGs in the SCSS source are not fully or partially Base64 or URL encoded.
Description
This PR fixes some inconsistencies in the inline background SVG definitions in
src/style/_form.scss.We're using
swagger-uiembedded in our main web site and use a clone of the main repo to enable us to apply styling overrides to the SCSS source as we compile our site's assets (as opposed to using the pre-built npm packages).Our build workflow includes several
postcssoptimisations, which were borked on two SVG definitions.The first is an SVG which is Base64 encoded (and which is also covered by a PR to the
postcss-encode-background-svgsplugin). This PR replaces that SVG with an unencoded version, including stripping out extraneous tags from the application that originally generated the SVG.The second is a partially URL encoded SVG which included invalid, non-printing characters (
LF). This PR replaces the SVG with an unencoded version, again stripping out extraneous application generated tags as well as theLF.Motivation and Context
As noted above, to override some styling in the generated UI, we're including the source SCSS in our site's generated CSS. The inconsistent SVG definitions cause issues with upstream CSS optimisations, including those from
postcssand associated plugins.How Has This Been Tested?
npm run testandnpm run e2epackage.json; all tests pass.Screenshots (if appropriate):
Not applicable.
Checklist
My PR contains...
src/is unmodified: changes to documentation, CI, metadata, etc.)package.json)My changes...
Documentation
Automated tests