Skip to content
New issue

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

Why the checkbox and datepicker styles are incorrect? #45

Closed
pengxue-net opened this issue Jun 3, 2020 · 7 comments
Closed

Why the checkbox and datepicker styles are incorrect? #45

pengxue-net opened this issue Jun 3, 2020 · 7 comments

Comments

@pengxue-net
Copy link

pengxue-net commented Jun 3, 2020

Why does datepicker have borders?(为什么checkbox不显示√,datepicker有边框?)
{8378BE51-E245-41D1-8C3F-93BC5426BB10}_20200603142144
{F153DDB8-3E30-463B-87FB-F55A13A71D48}_20200603142202

mzohaibqc added a commit that referenced this issue Jun 6, 2020
mzohaibqc added a commit to mzohaibqc/antd-theme-webpack-plugin that referenced this issue Jun 6, 2020
@mzohaibqc
Copy link
Owner

@pengxue-net I've fixed the issue and published a new version of [email protected]

Kindly update the package and it will be fixed

@pengxue-net
Copy link
Author

pengxue-net commented Jun 8, 2020

@mzohaibqc
I updated to version 1.2.4. The problem was solved, but the theme of the button was invalid. Version 1.2.2 is correct. antd version 4.3.1
{1333D83E-282C-4BBA-8B10-89F54259527A}_20200608182155

@mzohaibqc
Copy link
Owner

What do you mean by The problem was solved, but the theme of the button was invalid.?
I tested and it's working fine.

@pengxue-net
Copy link
Author

pengxue-net commented Jun 9, 2020

@mzohaibqc
The date and checkbox problems have been solved, but my current button theme cannot be switched
(日期和checkBox问题已解决,但是在1.2.4中button主题没有切换,@btn-primary-bg变量已修改,在1.2.2中button主题切换是有效的,另外这个demo https://mzohaibqc.github.io/antd-theme-generator上面的能否也更新到1.2.4)

@mzohaibqc
Copy link
Owner

@pengxue-net I tested and it worked, it seems like your implementation issue. some custom style might be overriding your style

@pengxue-net
Copy link
Author

@mzohaibqc
我又重新测试了一遍,当调用
window.less.modifyVars({
'@primary-color': color,
'@btn-primary-bg': color
})
修改主题时,所有主题都能正确改变,但是这时候我F5刷新界面之后,button的主题并没有被覆盖,这种情况您测试到没有,在antd-theme-generator 1.2.4之前版本是不会出现这种情况,代码如下:

vars.less:
@import "~antd/lib/style/themes/default.less";
@primary-color: #2F54EB;
@link-color: #2F54EB;
@btn-primary-bg: #2F54EB;
:root {
--primaryColor: @primary-color;
}

color.js:
const path = require('path');
const { generateTheme } = require('antd-theme-generator');

const options = {
stylesDir: path.join(__dirname, './src/styles'),
antDir: path.join(__dirname, './node_modules/antd'),
varFile: path.join(__dirname, './src/styles/vars.less'),
mainLessFile: path.join(__dirname, './src/styles/main.less'),
themeVariables: [
'@primary-color',
'@btn-primary-bg',
'@secondary-color',
'@text-color',
'@text-color-secondary',
'@heading-color',
'@layout-body-background',
'@layout-header-background'
],
indexFileName: 'index.html',
outputFilePath: path.join(__dirname, './public/color.less'),
}

generateTheme(options).then(less => {
console.log('Theme generated successfully');
}).catch(error => { console.log('Error', error); });

@github-actions
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants