mirror of
https://github.com/ant-design/ant-design.git
synced 2025-07-24 15:38:45 +08:00
feat: @theme dark, default
This commit is contained in:
parent
689d9b7ada
commit
327011da77
@ -32,16 +32,30 @@
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
|
||||
);
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) `
|
||||
);
|
||||
}
|
||||
& when (@theme = default) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) `
|
||||
);
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
|
||||
);
|
||||
}
|
||||
& when (@theme = default) {
|
||||
.button-color(
|
||||
@color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) `
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
.button-disabled();
|
||||
@ -52,17 +66,33 @@
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 5) `; @background; ~`colorPalette('@{btn-primary-bg}', 5)
|
||||
`
|
||||
);
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 7) `; @background; ~`colorPalette('@{btn-primary-bg}', 7)
|
||||
`
|
||||
);
|
||||
}
|
||||
& when (@theme = default) {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 5) `; @background; ~`colorPalette('@{btn-primary-bg}', 5)
|
||||
`
|
||||
);
|
||||
}
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 7) `; @background; ~`colorPalette('@{btn-primary-bg}', 7)
|
||||
`
|
||||
);
|
||||
& when (@theme = default) {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 7) `; @background; ~`colorPalette('@{btn-primary-bg}', 7)
|
||||
`
|
||||
);
|
||||
}
|
||||
& when (@theme = dark) {
|
||||
.button-color(
|
||||
~`colorPalette('@{btn-primary-bg}', 5) `; @background; ~`colorPalette('@{btn-primary-bg}', 5)
|
||||
`
|
||||
);
|
||||
}
|
||||
}
|
||||
.button-disabled();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
@import './default.less';
|
||||
|
||||
@theme: dark;
|
||||
// color palettes
|
||||
@blue-1: mix(color(~`colorPalette('@{blue-base}', 8) `), @component-background, 15%);
|
||||
@blue-2: mix(color(~`colorPalette('@{blue-base}', 7) `), @component-background, 30%);
|
||||
|
@ -1,6 +1,9 @@
|
||||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
||||
@import '../color/colors';
|
||||
|
||||
// theme
|
||||
@theme: default;
|
||||
|
||||
// The prefix to use on all css classes from ant.
|
||||
@ant-prefix: ant;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user