-
Notifications
You must be signed in to change notification settings - Fork 145
Use shadow dom #1220
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
Use shadow dom #1220
Conversation
|
|
||
| const packageJson = require('../package.json'); | ||
| // get the specific version of patternfly as used by the react examples | ||
| const pfVersion = packageJson.dependencies['@patternfly/src-patternfly-next'].split('#v')[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about to break this with submodules. I don't mind fixing it, just tell me what exactly it's doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually i think i'll take another look at this. basically i need to load one set of patternfly css for the core examples, and one set for the react examples, since they may not be in sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We fixed this making the version of @patternfly/patternfly in _repos/react-core exactly the version in _repos/core.
| // patternfly-icons assumes classes are nested under html tag, doesn't work in shadow dom so strip them out | ||
| const strippedHtmlIconsStyles = patternFlyIcons.replace(/html\s/g, ''); | ||
| return ( | ||
| <ShadowDOM> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much simpler than I anticipated!
Use shadow-dom for the examples so they do not accidentally receive css overrides from the website styling