-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
css conflicts in Variation
s (0.2.0)
#17
Comments
Variations
(0.2.0)
Variations
(0.2.0)Variation
s (0.2.0)
Hi Glenn, It seems to be a bug indeed! I'm using a prefixed version of Tailwind (with the I think I will have to explore the iframe way, thanks for the insight. For now (as the code base is still early and evolving fast), the best help you can provide me with is thorough and detailed feedback! Please go on :) |
I'm starting a new branch today, experimenting with iframes. |
Hey @glennr 👋 I'd love to have your opinion on this: |
Hi @cblavier I like the Regarding this statement in your branch:
Yes and no. If, like me, your components also rely on styling from Tailwind preflights, then you're gonna have problems. Am I missing something? I'm not sure how to work around problem #2 here. I glanced at the TW docs to see if there was an alternative way to configure my component fonts such that my Tailwind preflight config wouldn't conflict with |
(Btw the |
It is available on my branch now: stories rendering is almost fine, but the playground iframe rendering is not fully working yet.
I'm using a custom Tailwind preflight, that will only preflight elements with |
I grabbed c4600a5 I see your sandboxing (.lsb-sandbox) starting to improve things: But our preflighted font class remains overridden I took a crack at the iframe option, but its falling over on the Story Stacktrace:
|
oops - missed that :-) |
Unfortunately, I think that when providing your components styles to the storybook, you'll have to apply some styles on I will make the documentation more explicit.
Sorry about that, it's a bug! |
@cblavier I think the key step was the
|
Hi!
LSB version: 0.2.0
I've noticed the LSB styles are fighting with app styles imported via
css_path
It appears LSB combines its own, and
my_app
's css together in the document<head>
. This may cause components rendered inside%Variation
elements to inherit styling from LSB, and not the app.In my specific case, the use of a LSB text classes on
<body>
(lsb-font-inter lsb-text-base
etc) are overriding my Tailwind base styles, which are added to<html>
in preflight in my css bundle.What are your plans here? I see that Storybook renders each Story in its own iframe.
Anything we can help with?
The text was updated successfully, but these errors were encountered: