ant-design/components/button/style/index.less

209 lines
4.2 KiB
Plaintext
Raw Normal View History

meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
@import '../../style/themes/index';
2018-12-07 20:02:01 +08:00
@import '../../style/mixins/index';
@import './mixin';
2018-12-07 20:02:01 +08:00
@btn-prefix-cls: ~'@{ant-prefix}-btn';
2015-06-09 15:21:44 +08:00
// for compatible
2017-08-04 17:58:32 +08:00
@btn-ghost-color: @text-color;
@btn-ghost-bg: transparent;
@btn-ghost-border: @border-color-base;
2015-06-09 15:21:44 +08:00
// Button styles
// -----------------------------
2015-08-20 16:55:42 +08:00
.@{btn-prefix-cls} {
line-height: @line-height-base;
2015-06-09 15:21:44 +08:00
.btn;
2015-06-11 17:16:32 +08:00
.btn-default;
2015-06-09 15:21:44 +08:00
// Make sure that the target of Button's click event always be `button`
// Ref: https://github.com/ant-design/ant-design/issues/7034
> i,
> span {
display: inline-block;
transition: margin-left 0.3s @ease-in-out;
2019-07-15 15:32:08 +08:00
pointer-events: none;
}
2015-06-09 15:21:44 +08:00
&-primary {
.btn-primary;
2015-06-12 19:41:30 +08:00
2015-08-20 16:55:42 +08:00
.@{btn-prefix-cls}-group &:not(:first-child):not(:last-child) {
2015-07-09 10:56:28 +08:00
border-right-color: @btn-group-border;
border-left-color: @btn-group-border;
&:disabled {
border-color: @btn-default-border;
}
2015-06-09 15:21:44 +08:00
}
2015-08-20 16:55:42 +08:00
.@{btn-prefix-cls}-group &:first-child {
2015-06-09 15:21:44 +08:00
&:not(:last-child) {
2015-07-09 10:56:28 +08:00
border-right-color: @btn-group-border;
&[disabled] {
border-right-color: @btn-default-border;
}
2015-06-09 15:21:44 +08:00
}
}
.@{btn-prefix-cls}-group &:last-child:not(:first-child),
.@{btn-prefix-cls}-group & + & {
2015-07-09 10:56:28 +08:00
border-left-color: @btn-group-border;
&[disabled] {
border-left-color: @btn-default-border;
}
2015-07-08 16:21:04 +08:00
}
2015-06-09 15:21:44 +08:00
}
&-ghost {
.btn-ghost;
}
2015-11-30 18:26:44 +08:00
&-dashed {
.btn-dashed;
}
&-danger {
.btn-danger;
}
meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
&-link {
.btn-link;
}
&-round {
.btn-round(@btn-prefix-cls);
}
2015-11-26 19:32:55 +08:00
&-circle,
&-circle-outline {
2015-08-20 16:55:42 +08:00
.btn-circle(@btn-prefix-cls);
2015-06-09 15:21:44 +08:00
}
&::before {
position: absolute;
top: -1px;
right: -1px;
bottom: -1px;
left: -1px;
z-index: 1;
display: none;
background: @component-background;
border-radius: inherit;
opacity: 0.35;
2018-12-07 20:02:01 +08:00
transition: opacity 0.2s;
content: '';
2019-04-15 22:44:51 +08:00
pointer-events: none;
}
2017-04-15 14:57:05 +08:00
.@{iconfont-css-prefix} {
2018-12-07 20:02:01 +08:00
transition: margin-left 0.3s @ease-in-out;
2018-12-26 18:48:47 +08:00
// Follow icon blur under windows. Change the render.
// https://github.com/ant-design/ant-design/issues/13924
&.@{iconfont-css-prefix}-plus,
&.@{iconfont-css-prefix}-minus {
> svg {
shape-rendering: optimizeSpeed;
}
}
2017-04-15 14:57:05 +08:00
}
&&-loading {
position: relative;
pointer-events: none;
}
&&-loading::before {
display: block;
}
&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
2015-12-28 13:49:58 +08:00
padding-left: 29px;
.@{iconfont-css-prefix}:not(:last-child) {
2016-04-12 12:17:03 +08:00
margin-left: -14px;
2015-12-28 13:49:58 +08:00
}
2015-07-29 22:23:55 +08:00
}
&-sm&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
2015-12-28 13:49:58 +08:00
padding-left: 24px;
.@{iconfont-css-prefix} {
2016-04-12 12:17:03 +08:00
margin-left: -17px;
2015-07-29 22:23:55 +08:00
}
}
2015-06-09 15:21:44 +08:00
&-group {
2015-08-20 16:55:42 +08:00
.btn-group(@btn-prefix-cls);
2015-06-09 15:21:44 +08:00
}
2015-09-27 16:30:35 +08:00
&:not(&-circle):not(&-circle-outline)&-icon-only {
2017-11-27 14:41:17 +08:00
padding-right: 8px;
padding-left: 8px;
}
2017-03-05 20:12:36 +08:00
// http://stackoverflow.com/a/21281554/3040605
&:focus > span,
&:active > span {
position: relative;
}
2015-09-27 16:30:35 +08:00
// To ensure that a space will be placed between character and `Icon`.
2015-11-26 19:32:55 +08:00
> .@{iconfont-css-prefix} + span,
> span + .@{iconfont-css-prefix} {
2017-10-17 11:40:37 +08:00
margin-left: 8px;
2015-09-27 16:30:35 +08:00
}
&-background-ghost {
color: @component-background;
2017-08-04 17:58:32 +08:00
background: transparent !important;
border-color: @component-background;
}
&-background-ghost&-primary {
.button-variant-ghost(@btn-primary-bg);
2017-03-18 16:33:55 +08:00
}
&-background-ghost&-danger {
.button-variant-ghost(@btn-danger-border);
}
meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
&-background-ghost&-link {
.button-variant-ghost(@link-color; transparent);
color: @component-background;
}
&-two-chinese-chars::first-letter {
2018-12-07 20:02:01 +08:00
letter-spacing: 0.34em;
}
&-two-chinese-chars > *:not(.@{iconfont-css-prefix}) {
2018-12-07 20:02:01 +08:00
margin-right: -0.34em;
letter-spacing: 0.34em;
}
&-block {
width: 100%;
}
2018-09-10 11:22:26 +08:00
// https://github.com/ant-design/ant-design/issues/12681
&:empty {
vertical-align: top;
}
}
a.@{btn-prefix-cls} {
line-height: @btn-height-base - 2px;
// Fixing https://github.com/ant-design/ant-design/issues/12978
// It is a render problem of chrome, which is only happened in the codesandbox demo
// 0.1px for padding-top solution works and I don't why
padding-top: 0.1px;
&-lg {
line-height: @btn-height-lg - 2px;
}
&-sm {
line-height: @btn-height-sm - 2px;
}
}