- From: Simon Pieters via GitHub <sysbot+gh@w3.org>
- Date: Thu, 24 Oct 2019 10:27:28 +0000
- To: public-css-archive@w3.org
There are some tests in wpt for `:defined` already:
```
$ git grep ":defined"
css/selectors/invalidation/defined.html: <title>CSS Selectors Invalidation: :defined</title>
css/selectors/invalidation/defined.html: <meta name="assert" content="This tests that the :defined selector is effective">
css/selectors/invalidation/defined.html: #a1:defined {
css/selectors/invalidation/defined.html: :defined + #b1 {
css/selectors/invalidation/defined.html: :defined > #c1 {
css/selectors/invalidation/defined.html: div + :defined + * #d1 {
css/selectors/invalidation/defined.html: }, ":defined selector is effective");
custom-elements/Document-createElement.html: assert_false(instance2.matches(':defined'));
custom-elements/pseudo-class-defined.html: :defined { color:${defined}; }
custom-elements/pseudo-class-defined.html: :not(:defined) { color:${not_defined}; }
custom-elements/pseudo-class-defined.html: // Test ":defined" changes when the custom element was defined.
custom-elements/pseudo-class-defined.html: assert_equals(element.matches(':defined'), expected, 'matches(":defined")');
custom-elements/pseudo-class-defined.html: assert_equals(element.matches(':not(:defined)'), !expected, 'matches(":not(:defined")');
custom-elements/pseudo-class-defined.html: }, `${description} should ${expected ? 'be' : 'not be'} :defined`);
```
--
GitHub Notification of comment by zcorpan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/3735#issuecomment-545854368 using your GitHub account
Received on Thursday, 24 October 2019 10:27:29 UTC