Confusion about style systems #73
-
First congratulations to beta stage. (Though I think it's a little quick) I should start this dicussion days ago, but I was busy in the past days. I've been very confused about VuePressV2 style system. I see you want to decouple style system out of A plugin can provide Global UIs like But things are different in V2 now
The above is my worries about the new style design, And I am not catching up with any solutions solving it. And I am looking forward to your ideas towards them. I think some improvements should be made on the style system. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
We need to get more feedback from community, so staying in alpha stage and waiting for a perfect release is not a good idea. I personally took "vite support" as the milestone of beta, so I think it's time to go ahead. As you mentioned, css variables are not supported in media query, so we have to keep using pre-processor. However, I don't think the breakpoint variables is an important feature. Maybe we could remove them and use pure css solution like vitepress. As for the color adjustments, you can provide more variables for them. I found many theme authors are using less or scss to build styles, in such cases, the stylus dependencies and the palette system is just useless. A cross-theme UI plugin is just not a real thing. Every theme has its own styles, a plugin cannot compatible with all of the styles, even with those global palette variables. You have proposed so many points, I might not answer all of them one by one. I was just sharing some thoughts. |
Beta Was this translation helpful? Give feedback.
-
In short, the new style system is good when UI is all in themes, while plugins can not access pattele and hard to provide a convenient style customization. I think we'd better provide a better way for plugins to provide style customization support. |
Beta Was this translation helpful? Give feedback.
-
If anyone have similar thoughs and confusion, you may use Also, you are free to config both sass variables and css variables. |
Beta Was this translation helpful? Give feedback.
If anyone have similar thoughs and confusion, you may use
vuepress-plugin-sass-palette
, as it's designed to share styles across different "sets" of themes and plugins, supporting both sharing in a set and not conflict with other sets.Also, you are free to config both sass variables and css variables.