Skip to content

Commit 31d2a10

Browse files
authored
Merge pull request #609 from BY00565233/SURF-1884
Table: convert Light DOM LESS to SCSS
2 parents a96d567 + 43918dd commit 31d2a10

File tree

3 files changed

+26
-28
lines changed

3 files changed

+26
-28
lines changed

src/less/components.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
@import 'components/popover/index';
3737
@import 'components/radio/index';
3838
@import 'components/search/index';
39-
@import 'components/table/index';
4039
@import 'components/tabset/index';
4140
@import 'components/text-input/index';
4241
@import 'components/textarea/index';

src/scss/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
@import "reveal/index";
1616
@import "selector-strip/index";
1717
@import "toast/index";
18+
@import "table/index";
1819
@import "tooltip/index";
1920
@import "typography/index";

src/less/components/table/index.less renamed to src/scss/components/table/_index.scss

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import (reference) "vars";
1+
@import "vars";
22

33
// Table style resets
44
.hxTable {
@@ -48,30 +48,28 @@
4848
}
4949

5050
// ===== States =====
51-
@state-selected-bg: @cyan-50;
51+
$state-selected-bg: $cyan-50;
5252

5353
// ===== Tables =====
54-
@table-border-color: @gray-300;
55-
56-
/* ========== Tables ========== */
57-
58-
/*
59-
---------
60-
| thead |
61-
+
62-
---------
63-
| tbody |
64-
---------
65-
+
66-
| tfoot |
67-
---------
68-
*/
54+
$table-border-color: $gray-300;
55+
56+
// ========== Tables ==========
57+
58+
/// ---------
59+
/// | thead |
60+
/// +
61+
/// ---------
62+
/// | tbody |
63+
/// ---------
64+
/// +
65+
/// | tfoot |
66+
/// ---------
6967

7068
.hxTable {
7169
margin: 1.5rem 0;
7270

7371
caption {
74-
color: @gray-800;
72+
color: $gray-800;
7573
font-size: 0.875rem;
7674
font-weight: 300;
7775
}
@@ -95,13 +93,13 @@
9593
}//thead
9694

9795
tbody {
98-
border-color: @table-border-color transparent;
96+
border-color: $table-border-color transparent;
9997
border-style: solid;
10098
border-width: 1px;
10199

102100
tr {
103101
+ tr {
104-
border-top: 1px solid @table-border-color;
102+
border-top: 1px solid $table-border-color;
105103
}
106104

107105
th,
@@ -113,7 +111,7 @@
113111
&.hxSelected {
114112
td,
115113
th {
116-
background-color: @state-selected-bg;
114+
background-color: $state-selected-bg;
117115
}
118116
}
119117
}
@@ -137,15 +135,15 @@
137135
td,
138136
th {
139137
&.hxControl {
140-
color: @gray-700;
138+
color: $gray-700;
141139
width: 1rem;
142140
}
143141
}
144142

145143
// VARIANTS
146144
&.hxBound {
147145
tbody {
148-
border-color: @table-border-color;
146+
border-color: $table-border-color;
149147
}
150148
}//.hxBound
151149

@@ -155,7 +153,7 @@
155153
&:hover {
156154
td,
157155
th {
158-
background-color: @gray-50;
156+
background-color: $gray-50;
159157
}
160158
}
161159
}
@@ -181,16 +179,16 @@
181179

182180
// Use .hxTable.hxBound instead
183181
.hxTable--bordered {
184-
&:extend(.hxTable.hxBound all);
182+
@extend .hxTable.hxBound;
185183
}
186184

187185
// Use .hxTable.hxHoverable instead
188186
.hxTable--hover {
189-
&:extend(.hxTable.hxHoverable all);
187+
@extend .hxTable.hxHoverable;
190188
}
191189

192190
// Use (th,td).hxControl instead
193191
.hxTable__control-col {
194-
color: @gray-700;
192+
color: $gray-700;
195193
width: 1rem;
196194
}

0 commit comments

Comments
 (0)