-
Notifications
You must be signed in to change notification settings - Fork 14
Scope CSS + minor adjustments #5 #6
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
Conversation
* Some tools still use module instead of import * Add default as fallback
…ame) lovasoa#5 Some properties were not prefixed
This is better for consumers of this component because: * People won't expect having to set the variables to the 3 components of HSL * Consumers can use any colors space they wish * IDEs can provide tools such as color picker
Thanks! Just to be clear: does this break the official json builder application (the one you call the "demo app") ? If so, then I cannot merge this. |
No -- the screenshot I posted was just for illustration how it does not affect the surrounding page. I just added the But please try it out before merging in case I overlooked something ; ) |
Closes #5
As mentioned in #5, I tried including the component in our app and while not super-terrible, the "unscoped" CSS does change the layout of the app a little bit. So I think it's better for a component to have CSS that has less potential for conflicts.
What I did
jsonjoy
, CSS classjsonjoy
)postcss
, I instead added apostcss
step to adjust the generated CSS and add scopingtype="button"
in a few places where it was missing. In our app, all components must be inside<form>
and the missingtype="button"
resulted in the form getting submitted.module
anddefault
topackage.json
module
instead ofimport
, e.g.esbuild
default
as a fallback for compatibility0.1.0
since scoped CSS can (in principle) be a breaking changehsl(...)
in CSS variablesREADME.md
You can see this in the demo application, only the actual JSON schema editor component is styled. Once you add the CSS class
jsonjoy
to the containerdiv
of the demo app, all styles are applied again.What you should check