Skip to content

refactor: use CSS Modules for toggle styles#5592

Merged
slorber merged 1 commit intomainfrom
lex111/toggle-styled
Sep 22, 2021
Merged

refactor: use CSS Modules for toggle styles#5592
slorber merged 1 commit intomainfrom
lex111/toggle-styled

Conversation

@lex111
Copy link
Contributor

@lex111 lex111 commented Sep 20, 2021

Breaking Changes:

  • Former react-toggle classes have been removed in favor of css module classes (with hash). This may break some custom CSS selectors you have if you customized the toggle with CSS classes.

Motivation

Resolves #5586

Although this would require changes to styles of sites with toggle customization, it is a better approach that is consistent with our other components.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Sep 20, 2021
@lex111 lex111 requested a review from slorber as a code owner September 20, 2021 06:09
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 20, 2021
@netlify
Copy link

netlify bot commented Sep 20, 2021

✔️ [V2]

🔨 Explore the source changes: f2679e0

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/614825af7d914400077d29dc

😎 Browse the preview: https://deploy-preview-5592--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 80
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5592--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: -98 B (0%)

Total Size: 826 kB

Filename Size Change
website/build/assets/css/styles.********.css 94 kB -38 B (0%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 36.7 kB 0 B
website/build/assets/js/main.********.js 414 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 67 kB -8 B (0%)
website/build/blog/index.html 38.1 kB -8 B (0%)
website/build/docs/index.html 44.5 kB -10 B (0%)
website/build/docs/installation/index.html 52.8 kB -10 B (0%)
website/build/index.html 30.8 kB -8 B (0%)
website/build/tests/docs/index.html 25.4 kB -8 B (0%)
website/build/tests/docs/standalone/index.html 23 kB -8 B (0%)

compressed-size-action

@slorber slorber added the pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. label Sep 22, 2021
@slorber
Copy link
Collaborator

slorber commented Sep 22, 2021

Thanks, LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. pr: polish This PR adds a very minor behavior improvement that users will enjoy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom styles applying to react-toggle classes interfere with other uses

3 participants