UNPKG

2.29 kBSCSSView Raw
1//
2// Copyright IBM Corp. 2016, 2018
3//
4// This source code is licensed under the Apache-2.0 license found in the
5// LICENSE file in the root directory of this source tree.
6//
7
8@import '../../globals/scss/helper-mixins';
9@import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
10@import '../../globals/scss/vars';
11
12@include exports('data-table-v2-expandable') {
13 tr.#{$prefix}--expandable-row-v2 {
14 // hide on init
15 &.#{$prefix}--expandable-row--hidden-v2 {
16 display: none;
17 }
18
19 > td:first-of-type {
20 position: relative;
21
22 &:before {
23 content: '';
24 position: absolute;
25 top: 0;
26 left: 0;
27 height: 100%;
28 width: 2px;
29 background-color: $brand-01;
30 }
31 }
32
33 + tr[data-child-row] {
34 td {
35 border-top: 0;
36 padding-bottom: $spacing-xs;
37 }
38 }
39
40 &:hover {
41 > td {
42 background-color: $hover-row;
43 }
44
45 > td:first-of-type {
46 border-left: 1px solid transparent;
47 }
48
49 > td:last-of-type {
50 border-right: 1px solid $brand-01;
51 }
52
53 &[data-parent-row] > td {
54 border-bottom: 0;
55 }
56
57 + tr[data-child-row] {
58 > td {
59 background-color: $hover-row;
60 border-bottom: 1px solid $brand-01;
61 border-right: 1px solid $brand-01;
62 }
63 }
64 }
65 }
66
67 tr.#{$prefix}--expandable-row--hover-v2 {
68 > td {
69 background-color: $hover-row;
70 border-top: 1px solid $brand-01;
71 }
72
73 > td:last-of-type {
74 border-right: 1px solid $brand-01;
75 }
76 }
77
78 .#{$prefix}--table-expand-v2 {
79 width: 2.5rem;
80 }
81
82 .#{$prefix}--table-expand-v2[data-previous-value='collapsed'] .#{$prefix}--table-expand-v2__svg {
83 transform: rotate(90deg);
84 transition: transform 200ms $carbon--standard-easing;
85 }
86
87 .#{$prefix}--table-expand-v2__button {
88 @include button-reset(false);
89
90 &:focus {
91 outline: 1px solid transparent;
92
93 svg {
94 box-shadow: inset 0px 0px 0px 1px $brand-01;
95 }
96 }
97 }
98
99 .#{$prefix}--table-expand-v2__svg {
100 fill: $ui-05;
101 transform: rotate(0deg);
102 transition: transform 200ms $carbon--standard-easing;
103 height: 16px;
104 width: auto;
105 max-width: 16px;
106 padding: $spacing-3xs;
107 }
108}