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: handle pseudo-class in middle of selector #68

Merged
merged 2 commits into from Jan 14, 2021

Conversation

alan-agius4
Copy link
Contributor

@alan-agius4 alan-agius4 commented Dec 14, 2020

fix: handle pseudo-class in middle of selector

At the moment critters doesn't correctly handle pseudo-class in the middle of the selector string and pseudo-class which take a value such as :not

Example

.mat-slider:hover .mat-slider-track-background
.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover.mat-slider-disabled .mat-slider-thumb

More context about CSS pseudo-classes can be found https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes

Closes #51

fix: handle classes with colons

Class names can have : if they are escapped. Example: .flex\:box

At the moment critters doesn't correctly handle pseudo-class in the middle of the selector string and pseudo-class which take a value such as `:not`

Example
```
.mat-slider:hover .mat-slider-track-background
.mat-slider-min-value:not(.mat-slider-thumb-label-showing):hover.mat-slider-disabled .mat-slider-thumb
```

More context about CSS pseudo-classes can be found https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes

Closes GoogleChromeLabs#51
@alan-agius4
Copy link
Contributor Author

@janicklas-ralph mind taking a look at this?

src/index.js Outdated Show resolved Hide resolved
@alan-agius4 alan-agius4 force-pushed the preudo-class branch 2 times, most recently from df47245 to d0acb0b Compare January 11, 2021 07:53
Class names can have `:` if they are escapped. Example: `.flex\:box`
@alan-agius4
Copy link
Contributor Author

@developit, changes done. PTAL.

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.

None yet

2 participants