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

fix(css/parser): math functions in at-rules #6140

Merged
merged 5 commits into from Oct 14, 2022

Conversation

alexander-akait
Copy link
Collaborator

@alexander-akait alexander-akait commented Oct 13, 2022

Description:

Fix handle math function in @media and @container at-rules + better minificatio them.

There are potential case to improve width: calc(calc(calc(100px + 100px))), I will improve it late, because no one write code in this style + fix keep calc inside @supports, beucase it can be used to check calc exists or not

BREAKING CHANGE:

No

Related issue (if exists):

No

@alexander-akait alexander-akait marked this pull request as ready for review October 13, 2022 16:51
@alexander-akait alexander-akait changed the title Fix calc in media fix(css/parser): math function in at-rules Oct 13, 2022
@alexander-akait alexander-akait changed the title fix(css/parser): math function in at-rules fix(css/parser): math functions in at-rules Oct 13, 2022
@kdy1 kdy1 added this to the Planned milestone Oct 13, 2022
@kdy1 kdy1 self-assigned this Oct 13, 2022
@@ -2328,6 +2328,9 @@ where
value: vec![],
};

println!("FUCK {:?}", function);
println!("FUCK {:?}", self.ctx.block_contents_grammar);
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, sorry 😄

@alexander-akait
Copy link
Collaborator Author

@kdy1 Fixed

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thanks!


swc-bump:

  • swc_css_parser
  • swc_css_minifier

@kdy1 kdy1 enabled auto-merge (squash) October 14, 2022 14:22
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit 26aeb18 into swc-project:main Oct 14, 2022
@alexander-akait alexander-akait deleted the fix-calc-in-media branch October 14, 2022 15:01
@kdy1 kdy1 modified the milestones: Planned, v1.3.9 Oct 17, 2022
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants