-
-
Notifications
You must be signed in to change notification settings - Fork 112
Consistent way to override CSS and styling #184
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
Comments
I'm thinking about this... some other components / ui libraries that I've used in the past allow for you to import something like a |
So there are a couple options I am thinking about. If the editor will be mostly used in a sandboxed chromium environment, then I think css variables would be a great way to allow for theming. For example:
and then the user could override the styles by including a new definition after they have included the components styles
and the The only issue with using css custom props is that they are not super supported: Another option would be to use something like this, which could also be used if we ever move to styled-components |
The editor will be mostly used in Plotly's Chart Studio. Next will be random installs and apps that depend on the open source lib. But working in a chrome embedded environment is of course a hard requirement. |
The only concerning item in that support |
Yeah we'd be able to support editor defaults in a way that would just fall back to standard sass variables, and for the embedded / os lib we can do a I'll have to do some testing. It should work for the meantime. @VeraZab and I were chatting and we think it would make the most sense for the long term goal to switch over to styled-components in a later phase of the editor. I think for this phase, I'll explore and try to implement the css custom props, and then after we ship that, we should be talking about if |
Okay sounds like a plan! |
We have style/variables/main.scss which exposes variables users can override to configure the style of the editor. However these styles are consistently applied within the editor. They are not really consistent themselves.
We need to push more variables into "themable" component scss and expose a more consistent style "API"
I'll have to discuss what is actually required for theming but I think we can go pretty far until I find that info out.
The text was updated successfully, but these errors were encountered: