|
3 | 3 |
|
4 | 4 | .luna-data-grid {
|
5 | 5 | position: relative;
|
6 |
| - border: 1px solid theme.$color-border; |
| 6 | + border: 1px solid; |
7 | 7 | overflow: hidden;
|
8 | 8 | outline: none;
|
9 | 9 | @include mixin.component();
|
|
22 | 22 | th,
|
23 | 23 | td {
|
24 | 24 | padding: 1px 4px;
|
25 |
| - border-left: 1px solid theme.$color-border; |
| 25 | + border-left: 1px solid; |
26 | 26 | white-space: nowrap;
|
27 | 27 | text-overflow: ellipsis;
|
28 | 28 | overflow: hidden;
|
|
33 | 33 |
|
34 | 34 | th {
|
35 | 35 | font-weight: normal;
|
36 |
| - border-bottom: 1px solid theme.$color-border; |
| 36 | + border-bottom: 1px solid; |
37 | 37 | text-align: left;
|
38 |
| - background: theme.$color-fill-secondary; |
39 | 38 | position: relative;
|
40 | 39 | &.sortable {
|
41 | 40 | padding-right: #{theme.$padding-s-m}px;
|
42 |
| - &:hover, |
43 |
| - &:active { |
44 |
| - background: theme.$color-fill; |
45 |
| - } |
46 | 41 | }
|
47 | 42 | .icon-caret-down,
|
48 | 43 | .icon-caret-up {
|
|
63 | 58 | &:focus {
|
64 | 59 | .node.selectable.selected {
|
65 | 60 | color: #fff;
|
66 |
| - background: theme.$color-primary; |
67 |
| - } |
68 |
| - } |
69 |
| - |
70 |
| - &:focus.theme-dark { |
71 |
| - .node.selectable.selected { |
72 |
| - background: theme.$color-primary-dark; |
73 | 61 | }
|
74 | 62 | }
|
75 | 63 | }
|
|
85 | 73 |
|
86 | 74 | .data-container {
|
87 | 75 | overflow-y: auto;
|
88 |
| - .node.selected, |
89 |
| - .node.selectable:hover { |
90 |
| - background: #ddd; |
91 |
| - } |
92 |
| - tr:nth-child(even) { |
93 |
| - background: #f2f7fd; |
94 |
| - } |
95 | 76 | }
|
96 | 77 |
|
97 | 78 | .filler-row {
|
|
117 | 98 | }
|
118 | 99 | }
|
119 | 100 |
|
120 |
| -.theme-dark { |
121 |
| - border-color: theme.$color-border-dark; |
122 |
| - th, |
123 |
| - td { |
124 |
| - border-color: theme.$color-border-dark; |
125 |
| - } |
126 |
| - th { |
127 |
| - background: theme.$color-fill-secondary-dark; |
128 |
| - &.sortable { |
129 |
| - &:hover { |
130 |
| - background: theme.$color-fill-dark; |
| 101 | +@each $theme in ('light', 'dark') { |
| 102 | + .theme-#{$theme} { |
| 103 | + @include mixin.theme-rule(border-color, color-border, $theme); |
| 104 | + th, |
| 105 | + td { |
| 106 | + @include mixin.theme-rule(border-color, color-border, $theme); |
| 107 | + } |
| 108 | + th { |
| 109 | + @include mixin.theme-rule(background-color, color-fill-secondary, $theme); |
| 110 | + &.sortable { |
| 111 | + &:hover { |
| 112 | + @include mixin.theme-rule(background-color, color-fill, $theme); |
| 113 | + } |
131 | 114 | }
|
132 | 115 | }
|
133 |
| - } |
134 |
| - .data-container { |
135 |
| - .node.selected, |
136 |
| - .node.selectable:hover { |
137 |
| - background: #393939; |
| 116 | + .data-container { |
| 117 | + .node.selected, |
| 118 | + .node.selectable:hover { |
| 119 | + background-color: if($theme == 'light', #ddd, #393939); |
| 120 | + } |
| 121 | + tr:nth-child(even) { |
| 122 | + background-color: if($theme == 'light', #f2f7fd, #0b2544); |
| 123 | + } |
138 | 124 | }
|
139 |
| - tr:nth-child(even) { |
140 |
| - background: #0b2544; |
| 125 | + &:focus { |
| 126 | + .node.selectable.selected { |
| 127 | + @include mixin.theme-rule(background-color, color-primary, $theme); |
| 128 | + } |
141 | 129 | }
|
142 | 130 | }
|
143 | 131 | }
|
0 commit comments