GithubHelp home page GithubHelp logo

Comments (10)

holiday12138 avatar holiday12138 commented on September 4, 2024

同样的疑问 有新版本了吗

from umi-plugin-antd-theme.

zp2359 avatar zp2359 commented on September 4, 2024

同样问题:
在项目中@import '~antd/es/style/themes/default.less';
设置color: @primary-color

切换主题后,@primayr-color不变

from umi-plugin-antd-theme.

chenshuai2144 avatar chenshuai2144 commented on September 4, 2024

我忽略了一下 global.less ,不知道为什么

from umi-plugin-antd-theme.

Nokecy avatar Nokecy commented on September 4, 2024

@chenshuai2144 能不能抽时间看一下~~~

from umi-plugin-antd-theme.

chenshuai2144 avatar chenshuai2144 commented on September 4, 2024

@Nokecy 先不要在 global.less 里面用规避一下

from umi-plugin-antd-theme.

zp2359 avatar zp2359 commented on September 4, 2024

在一个普通的页面,这样写的,也无法改变颜色:
image

from umi-plugin-antd-theme.

zp2359 avatar zp2359 commented on September 4, 2024

我的理解是,@primary-color是定制antd组件主题用的,自己写的代码(覆盖antd组件与页面样式)要用css3 var处理,不知道理解是否正确?

from umi-plugin-antd-theme.

lifeneedspassion avatar lifeneedspassion commented on September 4, 2024

作者抽取样式的时候需要给每个css_module的类名重命名,如果不规避 global.less 的话,global.less里的类名会被多加一些前缀,导致样式不生效。
所以 global.less 里的样式是一定会规避的。
在多主题时,global.less里不能添加颜色变量,因为global.less根本不会被编译。

from umi-plugin-antd-theme.

hemiao51 avatar hemiao51 commented on September 4, 2024

同样的疑问 有新版本了吗

from umi-plugin-antd-theme.

chenshuai2144 avatar chenshuai2144 commented on September 4, 2024

global.less 这个文件被忽略了,要搞就需要不忽略 global.less,有点麻烦

from umi-plugin-antd-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.