-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Addon-docs: CSS classes for escape-hatch theming wrapper/content #8061
Addon-docs: CSS classes for escape-hatch theming wrapper/content #8061
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-alazurenko-feature-addon-docs-do-5a1852.storybook.now.sh |
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.
Thanks @alazurenko, this is great!
One request is that the DocsWrapper
and DocsContent
components get their default styling from Emotion, so we don't need to add those styles to base-preview-head
. The classes simply allow users to override that styling. Maybe we can add an example of that to official-storybook
?
@shilman Here is an example: https://codepen.io/alazurenko/pen/yLBEyME When it comes to example, should it be in the form of documentation? What would be the most efficient way to show this feature? |
Thanks @alazurenko! We definitely should keep the styles in Emotion as @shilman said. The css classnames are an escape hatch for additional targeting. IIRC you can force override by adding more specificity in CSS like so: Or using |
@alazurenko Yeah adding it to official-storybook makes it an e2e test for the feature, and also a demo for people who want to use this feature. |
Hi @shilman , |
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.
LGTM! I hijacked your PR and added some stuff to it. Thanks for kicking this off!
Addon-docs: CSS classes for escape-hatch theming wrapper/content
Thanks! Will this be documented somewhere? |
#8051
What I did
Created CSS classes for DocsWrapper and DocsContent so it could be customised by end-user of addon-docs by adding specific rules.