Skip to content
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

refactor(css_semantic): improve CSS semantic model structure and API #4908

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

togami2864
Copy link
Contributor

Summary

  • Use CssSyntaxNode instead of a String so that the model has more flexibility and extensibility
  • Fixed the lint rule that already used the model

Test Plan

CI should pass

@togami2864 togami2864 self-assigned this Jan 18, 2025
@github-actions github-actions bot added A-Linter Area: linter L-CSS Language: CSS labels Jan 18, 2025
Comment on lines +33 to +45
// #[cfg(test)]
// mod tests {
// use biome_css_parser::parse_css;
// use biome_css_parser::CssParserOptions;
// use biome_rowan::TextRange;

// #[test]
// fn test_simple_ruleset() {
// let parse = parse_css(
// r#"p {
// font-family: verdana;
// font-size: 20px;
// }"#,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily disable the tests. I will make another PR to split them into another module.

@togami2864 togami2864 changed the title Feat/change css model struct refactor(css_semantic): Improve CSS semantic model structure and API Jan 18, 2025
@togami2864 togami2864 changed the title refactor(css_semantic): Improve CSS semantic model structure and API refactor(css_semantic): improve CSS semantic model structure and API Jan 18, 2025
Copy link

codspeed-hq bot commented Jan 18, 2025

CodSpeed Performance Report

Merging #4908 will improve performances by 8.88%

Comparing togami2864:feat/change-css-model-struct (03789ed) with main (37382ce)

Summary

⚡ 2 improvements
✅ 93 untouched benchmarks

Benchmarks breakdown

Benchmark main togami2864:feat/change-css-model-struct Change
css_analyzer[bulma_5641719244145477318.css] 624.2 ms 587.1 ms +6.32%
css_analyzer[foundation_11602414662825430680.css] 149.5 ms 137.3 ms +8.88%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant