Replies: 5 comments 2 replies
-
This sounds awesome! I think we will have to update a lot of CSS-Vars but it would be worth it. I also considered your approach in the beta release #403 We should then remove the Color Palette from the core-css completely and only use primary and secondary colors for a smaller size-overhead. What are your thoughts? |
Beta Was this translation helpful? Give feedback.
-
One question, when you say "we will have to update a lot of CSS-Vars" what are you referring to? using directly --md-.... vars in the framework? If it is that, I think that it could be an important breaking change for people that has defined it's own style using that variables. We can just keep this indirection level and just define the vars with the M3 list of values, like: |
Beta Was this translation helpful? Give feedback.
-
I have set a branch "m3-styles" with a proof of 2 styles (one in each commit) and The pending work is finish the assignation of the correct styles in _theme_variables.scss. Now there is a block for the dark theme, but when all variables are assigned that will not be necessary, as the theme change will come from theme.dark.module.scss and theme.light.module.scss variable re-assignation. All the new added files are copied directly from the ones generated by M3 theme builder (just changing the extension). The only one that changes for each new style is "tokens.module". |
Beta Was this translation helpful? Give feedback.
-
I have been checking this library: material-foundation/ material-color-utilities. I have implemented that in my materialize-docs-vite (I tried to implement that in current materialize project, but it was not so clear how to import the package in a plain js project). Important: this material-foundation/ material-color-utilities has not being added as a requirement of materializecss components, is just used in website. In fact we could use this to generate (from materializecss website) a _theme_variables.scss file with theme colors from user selection and avoid to use tokens.module.scss, theme.light.module.scss, theme.dark.module.scss and colors.module.scss. So the proposal will be:
What do you think? @wuda-io did you had time to check y materialize-docs-vite project? how do you see it? |
Beta Was this translation helpful? Give feedback.
-
@danice Hi, just wandering. While you’re working on the new website, is it possible to retain versions of the docs site like others? I wonder if we can’t do using any library, we could just save the static versions of it in a folders? I kinda feeling weird when we are saving different versions of the library’s docs in a different domain. |
Beta Was this translation helpful? Give feedback.
-
The m3 theme builder website allows you to choose a color and generates a list of variables to create a dark / light styles following its m3 color recommendations.
The web looks gorgeous, but it's really very limited, as you can only choose 1 color to generate all the stuff (well, that's the idea, someone at google had something like a mystic-color-revelation, that allows to know how all colours of your site should look like from a given one!)
My first direct idea is to generate a materializecss "meta style" that just uses this variables coming form theme-builder.
It will look like this (left side are materializecss variables, right side are the ones generated by the site. Constants are because it's not finished, all should be vars):
We aware that each of this variables, like --md-sys-color-surface in fact have 2 values as they are defined depending on the selected theme:
A simple starting point will be to simple include besides the existing light/dark themes this other theme with some m3 example generated values, but the user would be able to generate new files from m3 web and replace the values with he/she favourite colours.
A more autonomous way of getting the same thing will be to allow the user to define the 1 primary colour ($hue) or the primary, secondary and tertiary and generate the same --md-sys variables following the m3 styles rules, someway similar as explained here:
My final idea would be that the materialize web site offers a color picker and changes all its look using themes derived from the selected color (a light and a dark theme, that could also be independently toggled by the user).
This would convert the materialize web page to something similar to the m3 theme builder... ready to use!.
Beta Was this translation helpful? Give feedback.
All reactions