New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support import without url keyword in theme generator #14234
Merged
mshabarov
merged 3 commits into
master
from
fix/theme_generator_support_import_without_url
Aug 1, 2022
Merged
fix: support import without url keyword in theme generator #14234
mshabarov
merged 3 commits into
master
from
fix/theme_generator_support_import_without_url
Aug 1, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mshabarov
previously approved these changes
Jul 29, 2022
Need to do an additional check for Vite |
With Vite it may happend that '@import url(...)' in CSS are rewritten as '@import ...', that is a valid CSS statement. Currently the theme generator does not handle the case and this prevents the resource to be added to the head section. A warning is also logged on browser console, stating import rules not allowed when creating stylesheets. This change updates the importMatcher regex to handle @import without url
mcollovati
force-pushed
the
fix/theme_generator_support_import_without_url
branch
from
July 29, 2022 13:16
377b8f4
to
6896c89
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
mshabarov
approved these changes
Aug 1, 2022
vaadin-bot
pushed a commit
that referenced
this pull request
Aug 1, 2022
With Vite it may happend that '@import url(...)' in CSS are rewritten as '@import ...', that is a valid CSS statement. Currently the theme generator does not handle the case and this prevents the resource to be added to the head section. A warning is also logged on browser console, stating import rules not allowed when creating stylesheets. This change updates the importMatcher regex to handle @import without url
mshabarov
pushed a commit
that referenced
this pull request
Aug 1, 2022
…14243) With Vite it may happend that '@import url(...)' in CSS are rewritten as '@import ...', that is a valid CSS statement. Currently the theme generator does not handle the case and this prevents the resource to be added to the head section. A warning is also logged on browser console, stating import rules not allowed when creating stylesheets. This change updates the importMatcher regex to handle @import without url Co-authored-by: Marco Collovati <marco@vaadin.com>
This ticket/PR has been released with Vaadin 23.2.0.beta1 and is also targeting the upcoming stable 23.2.0 version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
With Vite it may happend that '@import url(...)' in CSS are rewritten
as '@import ...', that is a valid CSS statement.
Currently the theme generator does not handle the case and this prevents
the resource to be added to the head section. A warning is also
logged on browser console, stating import rules not allowed when
creating stylesheets.
This change updates the importMatcher regex to handle @import without url
In addition it also handles media query declared in import statements.