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

Enhancemenet: add `:defined` pseudo class, fix #4080 #4081

Merged
merged 1 commit into from Jun 1, 2019

Conversation

4 participants
@lkraav
Copy link
Contributor

commented May 14, 2019

Best practice for eliminating FOUC when using custom elements 1

app-drawer:not(:defined) {
  /* Pre-style, give layout, replicate app-drawer's eventual styles, etc. */
  display: inline-block;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

Which issue, if any, is this issue related to?

Closes #4080

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

@hudochenkov

This comment has been minimized.

Enhancemenet: add `:defined` pseudo class, fix #4080
Best practice for eliminating FOUC when using custom elements [1]

```css
app-drawer:not(:defined) {
  /* Pre-style, give layout, replicate app-drawer's eventual styles, etc. */
  display: inline-block;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
```

[1]: https://developers.google.com/web/fundamentals/web-components/customelements#prestyle

@lkraav lkraav force-pushed the lkraav:master branch from 9c057e3 to 8fc2594 May 31, 2019

@lkraav

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2019

Not a 100% sure of what I was doing here, but maybe good enough?

PS it seemed like quite many pseudo elements are missing tests? has etc?

@hudochenkov

This comment has been minimized.

Copy link
Member

commented May 31, 2019

Looks like you need to run npm run prettier:fix.

@lkraav lkraav force-pushed the lkraav:master branch from 8fc2594 to 080a7eb May 31, 2019

@hudochenkov
Copy link
Member

left a comment

LGTM!

@hudochenkov hudochenkov merged commit cf8eff0 into stylelint:master Jun 1, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 96.37%
Details
@hudochenkov

This comment has been minimized.

Copy link
Member

commented Jun 1, 2019

Changelog:

  • Fixed: selector-pseudo-class-no-unknown false positives for defined (#4081).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.