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

220 lines
5.1 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 16:17:45 +08:00
@import '../../style/mixins/index';
@import '../../checkbox/style/mixin';
@import './mixin';
@import './directory';
2018-12-07 16:17:45 +08:00
@tree-prefix-cls: ~'@{ant-prefix}-tree';
@tree-node-prefix-cls: ~'@{tree-prefix-cls}-treenode';
@tree-motion: ~'@{ant-prefix}-motion-collapse';
2018-12-07 16:17:45 +08:00
.antCheckboxFn(@checkbox-prefix-cls: ~'@{ant-prefix}-tree-checkbox');
.antTreeFn(@tree-prefix-cls) {
.@{tree-prefix-cls} {
.reset-component;
2019-12-02 10:53:09 +08:00
background: @tree-bg;
border-radius: @border-radius-base;
transition: background-color 0.3s;
&-focused:not(:hover):not(&-active-focused) {
background: @primary-1;
}
2019-04-15 10:52:00 +08:00
// =================== Virtual List ===================
&-list-holder-inner {
align-items: flex-start;
}
&.@{tree-prefix-cls}-block-node {
.@{tree-prefix-cls}-list-holder-inner {
align-items: stretch;
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
flex: auto;
}
2016-01-07 19:05:55 +08:00
}
}
// ===================== TreeNode =====================
.@{tree-node-prefix-cls} {
display: flex;
align-items: flex-start;
padding: 0 0 (@padding-xs / 2) 0;
outline: none;
// Disabled
&-disabled {
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
color: @disabled-color;
cursor: not-allowed;
&:hover {
background: transparent;
}
}
2016-01-07 19:05:55 +08:00
}
&-active .@{tree-prefix-cls}-node-content-wrapper {
background: @tree-node-hover-bg;
2016-01-07 19:05:55 +08:00
}
}
// >>> Indent
&-indent {
align-self: stretch;
white-space: nowrap;
2019-10-16 10:51:18 +08:00
user-select: none;
&-unit {
display: inline-block;
width: @tree-title-height;
2016-01-07 19:05:55 +08:00
}
}
// >>> Switcher
& &-switcher {
.antTreeSwitcherIcon();
2019-10-16 10:51:18 +08:00
flex: none;
width: @tree-title-height;
height: @tree-title-height;
margin: 0;
line-height: @tree-title-height;
text-align: center;
cursor: pointer;
&-noop {
cursor: default;
}
&_close {
.@{tree-prefix-cls}-switcher-icon {
svg {
transform: rotate(-90deg);
}
}
}
}
// >>> Checkbox
& &-checkbox {
top: initial;
margin: ((@tree-title-height - @checkbox-size) / 2) 8px 0 0;
2015-08-03 16:07:21 +08:00
}
// >>> Title
& &-node-content-wrapper {
min-height: @tree-title-height;
2015-08-16 20:04:42 +08:00
margin: 0;
padding: 0 4px;
color: inherit;
line-height: @tree-title-height;
background: transparent;
2019-11-15 10:01:35 +08:00
border-radius: @border-radius-base;
cursor: pointer;
2018-12-07 16:17:45 +08:00
transition: all 0.3s;
2016-01-30 16:53:49 +08:00
&:hover {
background-color: @tree-node-hover-bg;
2016-01-30 16:53:49 +08:00
}
&.@{tree-prefix-cls}-node-selected {
background-color: @tree-node-selected-bg;
2016-01-30 16:53:49 +08:00
}
// Icon
.@{tree-prefix-cls}-iconEle {
display: inline-block;
width: @tree-title-height;
height: @tree-title-height;
line-height: @tree-title-height;
text-align: center;
vertical-align: top;
&:empty {
display: none;
2015-08-10 20:23:18 +08:00
}
}
2015-08-03 16:07:21 +08:00
}
// ===================== Loading ======================
.@{tree-node-prefix-cls}-loading {
// Icon
.@{tree-prefix-cls}-iconEle {
display: none;
}
}
// ==================== Draggable =====================
&-node-content-wrapper[draggable='true'] {
line-height: @tree-title-height - 4px;
border-top: 2px transparent solid;
border-bottom: 2px transparent solid;
user-select: none;
}
.@{tree-node-prefix-cls}.drag-over {
> [draggable] {
color: white;
background-color: @primary-color;
opacity: 0.8;
}
}
.@{tree-node-prefix-cls}.drag-over-gap-top {
> [draggable] {
border-top-color: @primary-color;
}
2015-08-03 16:07:21 +08:00
}
.@{tree-node-prefix-cls}.drag-over-gap-bottom {
> [draggable] {
border-bottom-color: @primary-color;
}
}
// ==================== Show Line =====================
&-show-line {
// ================ Indent lines ================
.@{tree-prefix-cls}-indent {
&-unit {
position: relative;
height: 100%;
&::before {
position: absolute;
top: calc(100% - 4px);
right: -@tree-title-height / 2;
bottom: -@tree-title-height - 4px;
border-right: 1px solid @border-color-base;
content: '';
2017-03-28 17:51:45 +08:00
}
&-end {
&::before {
display: none;
}
}
}
}
/* Motion should hide line of measure */
.@{tree-node-prefix-cls}-motion:not(.@{tree-motion}-leave):not(.@{tree-motion}-appear-active) {
.@{tree-prefix-cls}-indent-unit {
&::before {
display: none;
}
}
}
// ============== Cover Background ==============
.@{tree-prefix-cls}-switcher {
z-index: 1;
background: @component-background;
}
}
}
2015-08-10 20:23:18 +08:00
}
.antTreeFn(@tree-prefix-cls);
@import './rtl';