We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
传统的预编译器无外乎都按照@import后的先后顺序,主要原因在于这些家伙将@import的文件按顺序导入合并为一个文件,这和css顺序规范一致,但缺陷有二:
无拆分目前通过变通方法做到文件关系对应; 第二个则十分不妥,文件拆分的本意是模块化区分,文件之间相互解耦独立,目前做法既不符合模块化的概念又耦合,如果是写commonjs时我将所有变量作为一个模块申明然后放在头部首先导入,让其它模块引用不知作何感想。
之前more的设计是层级式变量,即变量申明后作用域为本文件以及子文件,而父文件无访问权限。避免冲突。 同时,增加配置项,想要全局方位可以config。这样一个项目的全局变量、所有项目的全局变量全可以一次性配置。
如今config增强了,可以用传入一个css文件作为config。层级式变量是否要保留或是其它还没想好。又或是有更好的设计?
The text was updated successfully, but these errors were encountered:
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables mozilla草案,和@import一样顺序优先
Sorry, something went wrong.
9fbc866
暂时放弃拆分文件后保持页面作用域,单css引用可以通过ref判断从属关系,但也增加使用复杂度。 难点在于页面中引入多个css时很难将这几个css关联起来共享作用域。 提供拆分的同时parseFile第2个参数变成combo,使用传统合并方式解析。
No branches or pull requests
传统的预编译器无外乎都按照@import后的先后顺序,主要原因在于这些家伙将@import的文件按顺序导入合并为一个文件,这和css顺序规范一致,但缺陷有二:
无拆分目前通过变通方法做到文件关系对应;
第二个则十分不妥,文件拆分的本意是模块化区分,文件之间相互解耦独立,目前做法既不符合模块化的概念又耦合,如果是写commonjs时我将所有变量作为一个模块申明然后放在头部首先导入,让其它模块引用不知作何感想。
之前more的设计是层级式变量,即变量申明后作用域为本文件以及子文件,而父文件无访问权限。避免冲突。
同时,增加配置项,想要全局方位可以config。这样一个项目的全局变量、所有项目的全局变量全可以一次性配置。
如今config增强了,可以用传入一个css文件作为config。层级式变量是否要保留或是其它还没想好。又或是有更好的设计?
The text was updated successfully, but these errors were encountered: