-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add tests for remaining supported pseudo-classes #747
Comments
JakeQZ
added a commit
that referenced
this issue
Sep 29, 2019
Also updated the regex for supported pseudo-classes (`PSEUDO_CLASS_MATCHER`) so that those supported are explicitly specified (rather than ‘anything ending with `-child` or anything ending with `-type(`’), without acually affecting the valid pseudo-class names it will match. Except in the `Emogrifier` class – this doesn’t support `:nth-last-child` so that has been removed (to the effect that rules with it will be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-child` to the list of supported pseudo-classes in the README. (Also, for consistency, added `()` to the other `:nth…` pseudo-classes in that section.) Part of #747.
JakeQZ
added a commit
that referenced
this issue
Sep 29, 2019
Also updated the regex for supported pseudo-classes (`PSEUDO_CLASS_MATCHER`) so that those supported are explicitly specified (rather than ‘anything ending with `-child` or anything ending with `-type(`’), without acually affecting the valid pseudo-class names it will match. Except in the `Emogrifier` class – this doesn’t support `:nth-last-child` so that has been removed (to the effect that rules with it will now be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-child` to the list of supported pseudo-classes in the README. (Also, for consistency, added `()` to the other `:nth…` pseudo-classes in that section.) Part of #747.
oliverklee
pushed a commit
that referenced
this issue
Sep 29, 2019
Also updated the regex for supported pseudo-classes (`PSEUDO_CLASS_MATCHER`) so that those supported are explicitly specified (rather than ‘anything ending with `-child` or anything ending with `-type(`’), without acually affecting the valid pseudo-class names it will match. Except in the `Emogrifier` class – this doesn’t support `:nth-last-child` so that has been removed (to the effect that rules with it will now be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-child` to the list of supported pseudo-classes in the README. (Also, for consistency, added `()` to the other `:nth…` pseudo-classes in that section.) Part of #747.
JakeQZ
added a commit
that referenced
this issue
Sep 29, 2019
Also removed it from the regex for supported pseudo-classes (`Emogrifier::PSEUDO_CLASS_MATCHER`) for the legacy `Emogrifier` class which does not support it (to the effect that rules with it will now be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-of-type` to the list of supported pseudo-classes in the README. Part of #747.
JakeQZ
added a commit
that referenced
this issue
Sep 29, 2019
Also removed it from the regex for supported pseudo-classes (`Emogrifier::PSEUDO_CLASS_MATCHER`) for the legacy `Emogrifier` class which does not support it (to the effect that rules with it will now be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-of-type` to the list of supported pseudo-classes in the README. Part of #747.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
- Move pseudo-elements and dynamic pseudo-classes to separate list of ‘what is copied to a `<style>` element because it can’t be inlined’, removing no-longer-relevant “some of them will never be supported”; - Mention the pitfalls of the `…-of-type()` selectors in the ‘not implemented yet’ section; - Mention that any (static) pseudo-classes not claimed to be supported will have their rules preserved and copied to a `<style>` element. - Correct “@media queries” to “`@media` rules” and remove obsolete “now”; - Mention that declarations in `@media` rules may need `!important`, with example; - Add caveat note about pseudo-elements and dynamic pseudo-classes being treated similarly to `@media` rules, with the same possible need for `!important`; - Replace nonsensical observation about `<link>` elements with something more appropriate; - Remove superseded caveat about only supporting CSS 1 and a few CSS 2 selectors. Resolves #723. #747 and #748 have been opened to cover remaining issues.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
- Move pseudo-elements and dynamic pseudo-classes to separate list of ‘what is copied to a `<style>` element because it can’t be inlined’, removing no-longer-relevant “some of them will never be supported”; - Mention the pitfalls of the `…-of-type()` selectors in the ‘not implemented yet’ section; - Mention that any (static) pseudo-classes not claimed to be supported will have their rules preserved and copied to a `<style>` element. - Correct “@media queries” to “`@media` rules” and remove obsolete “now”; - Mention that declarations in `@media` rules may need `!important`, with example; - Add caveat note about pseudo-elements and dynamic pseudo-classes being treated similarly to `@media` rules, with the same possible need for `!important`; - Replace nonsensical observation about `<link>` elements with something more appropriate; - Remove superseded caveat about only supporting CSS 1 and a few CSS 2 selectors. Resolves #723. #747 and #748 have been opened to cover remaining issues.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
- Move pseudo-elements and dynamic pseudo-classes to separate list of ‘what is copied to a `<style>` element because it can’t be inlined’, removing no-longer-relevant “some of them will never be supported”; - Mention the pitfalls of the `…-of-type()` selectors in the ‘not implemented yet’ section; - Mention that any (static) pseudo-classes not claimed to be supported will have their rules preserved and copied to a `<style>` element. - Correct “@media queries” to “`@media` rules” and remove obsolete “now”; - Mention that declarations in `@media` rules may need `!important`, with example; - Add caveat note about pseudo-elements and dynamic pseudo-classes being treated similarly to `@media` rules, with the same possible need for `!important`; - Replace nonsensical observation about `<link>` elements with something more appropriate; - Remove superseded caveat about only supporting CSS 1 and a few CSS 2 selectors. Resolves #723. #747 and #748 have been opened to cover remaining issues.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
Also removed it from the regex for supported pseudo-classes (`Emogrifier::PSEUDO_CLASS_MATCHER`) for the legacy `Emogrifier` class which does not support it (to the effect that rules with it will now be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-of-type` to the list of supported pseudo-classes in the README. Part of #747.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
Also removed ‘support’ for `:only-child` from `Emogrifier` class by adjusting the `PSEUDO_CLASS_MATCHER` regex, so that rules with such selectors will be copied to a `<style>` element. (It is not supported.) Closes #747.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
And updated README to indicate it is supported. Also removed ‘support’ for `:only-child` from `Emogrifier` class by adjusting the `PSEUDO_CLASS_MATCHER` regex, so that rules with such selectors will be copied to a `<style>` element. (It is not supported in that class.) Closes #747.
Merged
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
And updated README to indicate it is supported. Also removed ‘support’ for `:only-child` from `Emogrifier` class by adjusting the `PSEUDO_CLASS_MATCHER` regex, so that rules with such selectors will be copied to a `<style>` element. (It is not supported in that class.) Closes #747.
oliverklee
pushed a commit
that referenced
this issue
Sep 30, 2019
Also removed it from the regex for supported pseudo-classes (`Emogrifier::PSEUDO_CLASS_MATCHER`) for the legacy `Emogrifier` class which does not support it (to the effect that rules with it will now be copied to the `<style>` element rather than attempted to be inlined). And added `:nth-last-of-type` to the list of supported pseudo-classes in the README. Part of #747.
oliverklee
pushed a commit
that referenced
this issue
Sep 30, 2019
- Move pseudo-elements and dynamic pseudo-classes to separate list of ‘what is copied to a `<style>` element because it can’t be inlined’, removing no-longer-relevant “some of them will never be supported”; - Mention the pitfalls of the `…-of-type()` selectors in the ‘not implemented yet’ section; - Mention that any (static) pseudo-classes not claimed to be supported will have their rules preserved and copied to a `<style>` element. - Correct “@media queries” to “`@media` rules” and remove obsolete “now”; - Mention that declarations in `@media` rules may need `!important`, with example; - Add caveat note about pseudo-elements and dynamic pseudo-classes being treated similarly to `@media` rules, with the same possible need for `!important`; - Replace nonsensical observation about `<link>` elements with something more appropriate; - Remove superseded caveat about only supporting CSS 1 and a few CSS 2 selectors. Resolves #723. #747 and #748 have been opened to cover remaining issues.
JakeQZ
added a commit
that referenced
this issue
Sep 30, 2019
And updated README to indicate it is supported. Also removed ‘support’ for `:only-child` from `Emogrifier` class by adjusting the `PSEUDO_CLASS_MATCHER` regex, so that rules with such selectors will be copied to a `<style>` element. (It is not supported in that class.) Closes #747.
oliverklee
pushed a commit
that referenced
this issue
Sep 30, 2019
And updated README to indicate it is supported. Also removed ‘support’ for `:only-child` from `Emogrifier` class by adjusting the `PSEUDO_CLASS_MATCHER` regex, so that rules with such selectors will be copied to a `<style>` element. (It is not supported in that class.) Closes #747.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following are (presumably) supported by Symfony CssSelector, and the regex
PSEUDO_CLASS_MATCHER
allows them, but we do not have any tests confirming this::nth-last-child
:nth-last-of-type
(with a type):only-child
When confirmed as supported by adding tests, we can list them as supported in the README - see #723.
The text was updated successfully, but these errors were encountered: