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

Better scope sample page component styles #16185

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

kylegach
Copy link
Contributor

What I did

  • Prepend each selector in the page.css template file with "section ", to scope the styles to the component
    • You can see how the unscoped styles were affecting Docs-page elements in the Before/After
    • I scoped the styles in a way that didn't require changes to the Page component templates themselves; scoping with a class name would be better practice, though

Before

DocsH2_before

After

DocsH2_after

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

- Was affecting non-component styles when rendered in Docs tab
@nx-cloud
Copy link

nx-cloud bot commented Sep 28, 2021

Nx Cloud Report

CI ran the following commands for commit 3f15cd2. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kylegach kylegach merged commit 8371878 into next Sep 30, 2021
@kylegach kylegach deleted the sb-init-page-styles branch September 30, 2021 17:45
@shilman shilman added this to the 6.4 PRs milestone Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants