Skip to content

Fix parsing of class names like 'w-1/3' as used in selectors like '.w-1\/3' - #4610

Merged
westonruter merged 6 commits into
developfrom
fix/escaped-fraction-class-name
Apr 21, 2020
Merged

Fix parsing of class names like 'w-1/3' as used in selectors like '.w-1\/3'#4610
westonruter merged 6 commits into
developfrom
fix/escaped-fraction-class-name

Conversation

@westonruter

@westonruter westonruter commented Apr 20, 2020

Copy link
Copy Markdown
Member

Summary

Fixes #4609

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@googlebot googlebot added the cla: yes Signed the Google CLA label Apr 20, 2020
@westonruter
westonruter requested a review from pierlon April 20, 2020 21:02
@westonruter
westonruter marked this pull request as ready for review April 20, 2020 21:02
@westonruter

westonruter commented Apr 20, 2020

Copy link
Copy Markdown
Member Author

Build for testing: amp.zip (v1.5.4-alpha-20200420T213813Z-70cee0e15)

diff --git a/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php b/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php
index e18f5d8..26c2e12 100644
--- a/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php
+++ b/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note that SabberWorm PHP CSS Parser seems to use PSR-2/PSR-12, not WPCS, so code style needs to be adapted if this is to be merged into the upstream package.

@pierlon pierlon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Otherwise from @schlessera's note above, this looks good 👍 .

@westonruter

Copy link
Copy Markdown
Member Author

I'll keep this to the v1.6 release since updating the CSS parser could have big impacts.

@westonruter
westonruter merged commit c114f05 into develop Apr 21, 2020
@westonruter
westonruter deleted the fix/escaped-fraction-class-name branch April 21, 2020 17:23
@westonruter westonruter added this to the v1.6 milestone Jun 2, 2020
@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelogged Whether the issue/PR has been added to release notes. cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some TailwindCSS class names are being removed

4 participants