-
-
Notifications
You must be signed in to change notification settings - Fork 876
feat(scss): add basic SCSS declaration support and comments #8721
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5bf69c3
feat(scss): add basic SCSS declaration support and comments
denbezrukov a050e77
update snapshots
denbezrukov f0c570c
remove unused method
denbezrukov 1dcd594
fix formatter and better error diagnostic
denbezrukov 54c5a05
remove changeset
denbezrukov d4366f6
add #[allow(dead_code)] to scss() method in CssTestFormatLanguage
denbezrukov d5d6f6b
format
denbezrukov 11b32d3
fix clippy
denbezrukov 21f6b2c
prettier specs formatting for scss
denbezrukov 37d9d5f
split css and scss declaration
denbezrukov 15225da
add SCSS test for declaration without semicolon at EOF
denbezrukov 588f995
format
denbezrukov 1010922
revert for declaration eof
denbezrukov f3c5f72
[autofix.ci] apply automated fixes
autofix-ci[bot] 4acdbf2
add support for formatting CssRootItemList and AnyCssRootItem
denbezrukov e808093
rename CssRuleList to CssRootItemList and adjust related grammar rules
denbezrukov c979b11
update linter rules to use CssRootItemList instead of CssRuleList
denbezrukov 1ebe145
refactor no_duplicate_at_import_rules to simplify control flow and im…
denbezrukov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Media query parse errors also abort the scan.
The
_ => return Nonebranches on lines 104 and 116 will abort the entire function when a media query fails to parse. Consider usingcontinueto skip problematic entries whilst still catching duplicates in the rest of the stylesheet.🛠️ Proposed fix for both branches
for media in import_rule.media() { match media { Ok(media) => { if !media_query_set.insert( media.to_trimmed_text().to_lowercase_cow().into(), ) { return Some(import_rule); } } - _ => return None, + Err(_) => continue, } } } else { let mut media_set: HashSet<String> = HashSet::new(); for media in import_rule.media() { match media { Ok(media) => { media_set.insert( media.to_trimmed_text().to_lowercase_cow().into(), ); } - _ => return None, + Err(_) => continue, } }Also applies to: 109-118
🤖 Prompt for AI Agents