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

Add tests for remaining supported pseudo-classes #747

Closed
JakeQZ opened this issue Sep 29, 2019 · 0 comments · Fixed by #754
Closed

Add tests for remaining supported pseudo-classes #747

JakeQZ opened this issue Sep 29, 2019 · 0 comments · Fixed by #754
Assignees
Milestone

Comments

@JakeQZ
Copy link
Contributor

JakeQZ commented Sep 29, 2019

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.

@JakeQZ JakeQZ added this to the 3.0.0 milestone Sep 29, 2019
@JakeQZ JakeQZ self-assigned this Sep 29, 2019
JakeQZ added a commit that referenced this issue Sep 29, 2019
This updates the list to those that are supported **and** for which we have
tests.  There are some others that are (probably) supported but for which we
don’t yet have any tests – see #747 – these have not been added to the list …
yet.

Part of #723.
oliverklee pushed a commit that referenced this issue Sep 29, 2019
This updates the list to those that are supported **and** for which we have
tests.  There are some others that are (probably) supported but for which we
don’t yet have any tests – see #747 – these have not been added to the list …
yet.

Part of #723.
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.
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant