-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
For CSS, create files for (1) base structure, (2) kindergartenprof theme #388
Comments
Part 1. - Refactor CSS structure
Part 2. - Integrate JavaScript with CSS to set default theme to kindergartenprofessionalSo, as we discussed on Slack. We have two options: CSS Preprocessors (SCSS variables) or Native CSS (CSS Custom Properties Variables). If you don't know exactly what's the difference, this articles explain it well How it would work if we use... 1. CSS Preprocessors (SCSS variables)
2. Native CSS - CSS Variables
If they do it soon enough it would be awesome, because we would only need to to add a class to the I believe we could wait a little longer before forking Bulma. The later we fork it, the stable it will be. Meanwhile we keep improving GI App with theming in mind. |
This looks complicated as hell. Another problem is: say we have 10 themes, doing it this way would mean clients would have to load and process all of that CSS. Plus, it's not clear to me how CSS variables fit into the theme stuff anyway. There needs to be one javascript variable that gets toggled. That should be a variable called "theme", and it should refer to the filename of the css theme that's being used. So let's go with the multiple theme file approach.
|
What don't you understand exactly?
That's the beauty about CSS variables. The same css file will serve all themes! JS only needs to toggle a parent classname that triggers different CSS variables values. No need for extra CSS network. request. |
Nevermind, I think I see how it would work.
OK, it's not a big deal, if you want to do it this way, let's do it this way. If we encounter performance issues or any other issues with this approach, we can always adjust later as need be. 👍 |
@taoeffect @sandrina-p is this issue still relevant? |
Probably not... I think the #665 can supersede this. |
Problem
The current CSS Style Guide does not speak in terms of themes, but it needs to.
Also, our current CSS setup does not respect the existence of necessary theming support.
Solution
Part 1. - Refactor CSS structure
The current CSS structure of the project needs to be refactored to do two things:
kindergartenprofessional
theme (make sure to not name it "default-theme.scss", but name it something likekindergartenprofessional.scss
; the "default" will be set via a JavaScript variable/setting)Part 2. - Integrate JavaScript with CSS to set default theme to kindergartenprofessional
Basically what the subtitle of this section says.
There needs to be JavaScript code that sets the default theme and is responsible for switching themes.
Part 3. - Update Style Guide documentation to explain how to update and add new themes
The Style Guide currently ignores themes completely, but theming should probably be what everything in the style guide revolves around, because theming is what determines the location of files, their names, and how changes to the CSS is done.
The text was updated successfully, but these errors were encountered: