Skip to content

Handle the closing brace for parsing at rule. Make enums as consts. #23

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

maribezler
Copy link

The test case that is failing currently is .foo{font-weight:300;@charset "UTF-8"}.bar{width:100vw;}.
Expected result: .foo{font-weight:300;@charset "UTF-8";}.bar{width:100vw;}

@googlebot
Copy link

Thanks for your pull request. t looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

@maribezler
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@maribezler maribezler changed the title Handle the closing brace for parsing at rule. Handle the closing brace for parsing at rule. Make enums as consts. Mar 5, 2018
Prevent problems with closure running after typescript.
flinst and others added 2 commits August 22, 2018 21:25
This fixes two incompatibilities between shady-css-parser
and browsers.

1. If the css is missing a closing brace like
       div { color:red
   then Shady drops the last rule, but browsers keep it.

2. If a css ruleset has an empty selector like
       /*empty*/ { color: red }
       div { color: blue }
   then Shady discards the { } and produces this:
       color:red;div { color: blue; }
   which has an entirely different meaning.

   Browsers parse the empty-selector block, but then ignore it
   as invalid.

   For this case, we could either make Shady keep the block
   or drop the block. I decided to keep the block, because
   Shady generally passes through many other not-quite-valid
   css text that browsers would ignore.
fix handling of some malformed css
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

udhavsethi and others added 2 commits May 6, 2019 15:53
This fixes the scenario where extra semicolons are immediately
followed (without whitespace) by a boundary token such as '}'.

For the ruleset: .foo{bar:baz;;}div .qux{vim:fet;}

Shady treats the first `}' as an extra token and adds div .qux rule
under the .foo selector.
Fix parsing for minified css with extra semicolons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants