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 specificity to root selector to avoid conflicts in Calypsoified wp-admin. #1549

Merged
merged 2 commits into from Dec 6, 2018

Conversation

jeffstieler
Copy link
Contributor

This PR seeks to fix style conflicts when running within a "Calypsoified" /wp-admin. See: p58i-7nL-p2 (#comment-40377)

To test:

  • npm run dist
  • Clear local style cache
  • Verify that all WCS screens and components have the correct styling (be sure to test hover, click, tooltips, etc)

@@ -33,6 +33,7 @@
@import 'components/screen-reader-text/style';
@import 'components/segmented-control/style';
@import 'components/spinner/style';
@import 'components/token-field/style';
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be needed, the stylesheet for token-field is already included as "modular CSS" (see here).

Copy link
Contributor

Choose a reason for hiding this comment

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

If specificity is a problem, you should add the .wp-core-ui.wp-admin prefix to here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 9d1f95d. Thank you!

@@ -1,6 +1,6 @@
@import 'shared/utils';

.wcc-root {
Copy link
Contributor

@DanReyLop DanReyLop Dec 5, 2018

Choose a reason for hiding this comment

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

Sorry I missed this. This solution would break horribly in Store-in-dotcom, because Calypso doesn't add the wp-admin wp-core-ui classes to the </body>, so no CSS would be applied.

Edit: Nevermind, I still have vacation brain, this won't be loaded in Calypso at all. Disregard.

@RadoslavGeorgiev RadoslavGeorgiev mentioned this pull request Dec 5, 2018
6 tasks
Copy link
Contributor

@DanReyLop DanReyLop left a comment

Choose a reason for hiding this comment

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

Works as expected. :shipit:

@RadoslavGeorgiev RadoslavGeorgiev merged commit 069b8a3 into master Dec 6, 2018
@RadoslavGeorgiev RadoslavGeorgiev deleted the fix/ecomm-plan-style-conflicts branch December 6, 2018 12:51
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.

None yet

3 participants