-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Erindcl
committed
Jul 29, 2020
1 parent
1a8e403
commit a885312
Showing
8 changed files
with
110 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
order: 6 | ||
title: | ||
zh-CN: 浅色背景(仅暗黑主题下使用) | ||
--- | ||
|
||
## zh-CN | ||
|
||
浅色背景上,显示深色控件 | ||
|
||
仅暗黑主题下使用,默认主题下使用无效 | ||
|
||
- 为组件或其父组件添加类名`dt-form-light-bg` | ||
|
||
```jsx | ||
import { Input } from 'antd'; | ||
|
||
ReactDOM.render( | ||
<div className="demo-input-light dt-form-light-bg"> | ||
<Input placeholder="shadow input" /> | ||
<Input disabled placeholder="disable shadow input" /> | ||
</div>, | ||
mountNode | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@import '../const.less'; | ||
|
||
// input | ||
.ant-input { | ||
border-radius: 4px; | ||
&:focus { | ||
border-color: @primaryColor; | ||
} | ||
} | ||
.ant-input-disabled { | ||
border-color: #272A40; | ||
} | ||
.ant-input[disabled]:hover { | ||
border-color: #272A40; | ||
} | ||
.ant-input-lg { | ||
font-size: 12px; | ||
} | ||
.ant-input-search-icon, .ant-input-password-icon { | ||
color: @white6; | ||
&:hover { | ||
color: @whiteBF; | ||
} | ||
} | ||
|
||
// 浅色背景中 显示深色控件 | ||
.dt-form-light-bg { | ||
// input | ||
.ant-input, &.ant-input { | ||
border-color: @blue3; | ||
background-color: #11111C; | ||
&:focus, &:hover { | ||
border-color: @primaryColor; | ||
} | ||
} | ||
.ant-input[disabled], &.ant-input[disabled] { | ||
background-color: #161723; | ||
&:hover { | ||
border-color: @blue3; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters