Comments (10)
同样的疑问 有新版本了吗
from umi-plugin-antd-theme.
同样问题:
在项目中@import '~antd/es/style/themes/default.less';
设置color: @primary-color;
切换主题后,@primayr-color不变
from umi-plugin-antd-theme.
我忽略了一下 global.less ,不知道为什么
from umi-plugin-antd-theme.
@chenshuai2144 能不能抽时间看一下~~~
from umi-plugin-antd-theme.
@Nokecy 先不要在 global.less 里面用规避一下
from umi-plugin-antd-theme.
from umi-plugin-antd-theme.
我的理解是,@primary-color是定制antd组件主题用的,自己写的代码(覆盖antd组件与页面样式)要用css3 var处理,不知道理解是否正确?
from umi-plugin-antd-theme.
作者抽取样式的时候需要给每个css_module的类名重命名,如果不规避 global.less 的话,global.less里的类名会被多加一些前缀,导致样式不生效。
所以 global.less 里的样式是一定会规避的。
在多主题时,global.less里不能添加颜色变量,因为global.less根本不会被编译。
from umi-plugin-antd-theme.
同样的疑问 有新版本了吗
from umi-plugin-antd-theme.
global.less 这个文件被忽略了,要搞就需要不忽略 global.less,有点麻烦
from umi-plugin-antd-theme.
Related Issues (20)
- 这是什么问题? api.addMiddewares is not a function HOT 1
- Dark 主题不能正确应用到 ProTable 组件上 HOT 2
- umi3版本下,开发时每次修改代码都会导致theme build,效率低下 HOT 9
- umi@3 版本下生成的.plugin-theme/theme下的css文件全部为空 HOT 6
- plugin里添加umi-plugin-antd-theme后报错 HOT 2
- [email protected],根据官方文档添加,报错了 HOT 2
- 配置文件改为 json 格式后,无法配置 filterFileLess HOT 1
- 使用umi-plugin-antd-theme后,我组件中的那些样式就无法引用了 HOT 3
- 插件生成css中的路径问题 HOT 3
- 非根目录部署,切换主题CSS依然是根目录链接,404 HOT 2
- [BUG]只安装生产依赖,打包后报错 HOT 1
- build theme error @ant-prefix is undefined HOT 2
- How can I hide the url settings? HOT 1
- How can I avoid this error 'ERR_INVALID_ARG_TYPE'? HOT 2
- 想问下 umi 开发插件有相关文档教程吗
- 打包出来的主题对引用的图片路径不正确 HOT 2
- Set default language english !
- 在antd pro v5版本安装插件后报错
- less building error: SyntaxError: (postcss) CssSyntaxError Unknown word (14662:1) HOT 8
- antd升级到4.17.0之后的版本打包报错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umi-plugin-antd-theme.