Skip to content

Commit 3c943b8

Browse files
authored
DataGrid/TreeList: Split basic cell styles (#32788)
1 parent 1426987 commit 3c943b8

File tree

29 files changed

+2907
-1698
lines changed

29 files changed

+2907
-1698
lines changed

packages/devextreme-scss/scss/widgets/base/dataGrid/_common.scss

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
white-space: normal;
1313
}
1414

15-
.dx-hidden.dx-group-cell {
16-
display: table-cell !important; // stylelint-disable-line declaration-no-important
17-
font-size: 0 !important; // stylelint-disable-line declaration-no-important
18-
}
19-
2015
@mixin dx-group-panel-item() {
2116
display: inline-block;
2217
min-width: 30px;
@@ -49,28 +44,10 @@
4944
}
5045

5146
.dx-datagrid-rowsview {
52-
.dx-row.dx-group-row {
53-
td {
54-
border-top: 1px solid;
55-
border-bottom: 1px solid;
56-
}
57-
}
58-
59-
.dx-row.dx-group-row:first-child {
60-
td {
61-
border-top: none;
62-
}
63-
}
64-
6547
.dx-group-row {
6648
&:focus {
6749
outline: 0;
6850
}
69-
70-
&.dx-row > td {
71-
border-left-color: transparent;
72-
border-right-color: transparent;
73-
}
7451
}
7552

7653
.dx-adaptive-detail-row {
@@ -98,13 +75,6 @@
9875
@include flip-horizontally();
9976
}
10077

101-
.dx-datagrid-content .dx-datagrid-table {
102-
.dx-group-row.dx-row.dx-column-lines > td {
103-
border-left: none;
104-
border-right: none;
105-
}
106-
}
107-
10878
.dx-datagrid-group-panel {
10979
.dx-group-panel-item,
11080
.dx-block-separator {

packages/devextreme-scss/scss/widgets/base/dataGrid/_index.scss

Lines changed: 7 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ $datagrid-text-stub-background-image-path: null !default;
1616
@use "../icon_fonts" as *;
1717
@use "./common";
1818
@use "./variables" as *;
19+
@use 'layout/cell' with (
20+
$datagrid-border: $datagrid-border,
21+
$datagrid-border-color: $datagrid-border-color,
22+
$datagrid-base-background-color: $datagrid-base-background-color,
23+
$datagrid-row-error-color: $datagrid-row-error-color,
24+
$datagrid-focused-border-color: $datagrid-focused-border-color,
25+
);
1926

2027
.dx-datagrid-borders {
2128
> .dx-datagrid-headers,
@@ -108,21 +115,15 @@ $datagrid-text-stub-background-image-path: null !default;
108115
}
109116

110117
.dx-datagrid-headers {
111-
.dx-header-row > td,
112118
.dx-header-filter {
113119
outline: none;
114120
}
115121

116122
&.dx-state-focused .dx-header-row {
117-
td:focus,
118123
td .dx-header-filter:focus {
119124
outline: 2px solid $datagrid-focused-border-color;
120125
outline-offset: 2px;
121126
}
122-
123-
td:focus {
124-
outline-offset: -2px;
125-
}
126127
}
127128
}
128129

@@ -151,25 +152,6 @@ $datagrid-text-stub-background-image-path: null !default;
151152
}
152153
}
153154

154-
.dx-datagrid-rowsview .dx-data-row,
155-
.dx-datagrid-rowsview .dx-freespace-row,
156-
.dx-datagrid-rowsview .dx-virtual-row,
157-
.dx-datagrid-rowsview .dx-header-row,
158-
.dx-datagrid-headers .dx-row {
159-
td.dx-pointer-events-none {
160-
border-left: 2px solid $datagrid-border-color;
161-
border-right: 2px solid $datagrid-border-color;
162-
163-
&.dx-first-cell {
164-
border-left: none;
165-
}
166-
167-
&.dx-last-cell {
168-
border-right: none;
169-
}
170-
}
171-
}
172-
173155
.dx-datagrid-rowsview.dx-state-focused .dx-data-row {
174156
& > td.dx-command-edit > a.dx-link:focus {
175157
outline: 2px solid $datagrid-focused-border-color;
@@ -188,10 +170,6 @@ $datagrid-text-stub-background-image-path: null !default;
188170
}
189171

190172
.dx-virtual-row > td {
191-
&:not(.dx-datagrid-sticky-column, .dx-datagrid-sticky-column-left, .dx-datagrid-sticky-column-right) {
192-
position: relative;
193-
}
194-
195173
&:not(.dx-datagrid-group-space)::before {
196174
display: block;
197175
height: 100%;
@@ -208,17 +186,9 @@ $datagrid-text-stub-background-image-path: null !default;
208186

209187
.dx-datagrid-total-footer {
210188
.dx-row.dx-footer-row {
211-
td.dx-command-expand {
212-
&.dx-datagrid-sticky-column, &.dx-datagrid-sticky-column-left, &.dx-datagrid-sticky-column-right {
213-
background-color: $datagrid-base-background-color;
214-
}
215-
}
216-
217189
.dx-datagrid-sticky-column,
218190
.dx-datagrid-sticky-column-left,
219191
.dx-datagrid-sticky-column-right {
220-
padding-inline: 0;
221-
222192
.dx-datagrid-summary-item {
223193
padding-inline: $datagrid-cell-padding;
224194
}
@@ -231,11 +201,6 @@ $datagrid-text-stub-background-image-path: null !default;
231201
}
232202

233203
.dx-error-row {
234-
td {
235-
color: $datagrid-row-error-color;
236-
padding: 0;
237-
}
238-
239204
.dx-error-message {
240205
@include dx-datagrid-error-message();
241206
}
@@ -247,44 +212,15 @@ $datagrid-text-stub-background-image-path: null !default;
247212
}
248213
}
249214

250-
.dx-column-lines > td {
251-
&:first-child {
252-
border-left: none;
253-
}
254-
255-
&:last-child {
256-
border-right: none;
257-
}
258-
}
259-
260215
.dx-command-drag .dx-datagrid-drag-icon {
261216
@include dx-icon(dragvertical);
262217
}
263218

264219
.dx-datagrid-sticky-columns {
265-
.dx-column-lines > td {
266-
border-right: none;
267-
}
268-
269-
.dx-datagrid-content .dx-datagrid-table .dx-row {
270-
&.dx-column-lines > td.dx-datagrid-first-header,
271-
.dx-datagrid-column-no-border {
272-
border-left: none;
273-
}
274-
}
275-
276220
.dx-datagrid-content.dx-sortable {
277221
overflow: visible;
278222
}
279223
}
280-
281-
.dx-datagrid-sticky-column, .dx-datagrid-sticky-column-left, .dx-datagrid-sticky-column-right {
282-
background-color: $datagrid-base-background-color;
283-
}
284-
}
285-
286-
.dx-header-multi-row.dx-datagrid-sticky-columns .dx-column-lines > td:first-child {
287-
border-left: $datagrid-border;
288224
}
289225

290226
.dx-datagrid-filter-panel {
@@ -332,25 +268,6 @@ $datagrid-text-stub-background-image-path: null !default;
332268

333269
.dx-rtl {
334270
.dx-datagrid {
335-
.dx-datagrid-rowsview .dx-data-row,
336-
.dx-datagrid-rowsview .dx-freespace-row,
337-
.dx-datagrid-rowsview .dx-virtual-row,
338-
.dx-datagrid-rowsview .dx-header-row,
339-
.dx-datagrid-headers .dx-row {
340-
td.dx-pointer-events-none {
341-
border-left: 2px solid $datagrid-border-color;
342-
border-right: 2px solid $datagrid-border-color;
343-
344-
&.dx-first-cell {
345-
border-right: none;
346-
}
347-
348-
&.dx-last-cell {
349-
border-left: none;
350-
}
351-
}
352-
}
353-
354271
.dx-datagrid-rowsview {
355272
.dx-virtual-row > td {
356273
&::before {
@@ -362,51 +279,6 @@ $datagrid-text-stub-background-image-path: null !default;
362279
}
363280
}
364281
}
365-
366-
.dx-column-lines > td {
367-
&:first-child {
368-
border-right: none;
369-
border-left: $datagrid-border;
370-
}
371-
372-
&:last-child {
373-
border-left: none;
374-
}
375-
}
376-
377-
.dx-datagrid-sticky-columns {
378-
.dx-column-lines {
379-
& > td {
380-
border-left: none;
381-
}
382-
383-
&:not(.dx-datagrid-group-footer) > td {
384-
border-right: $datagrid-border;
385-
386-
&:first-child {
387-
border-right: none;
388-
}
389-
}
390-
}
391-
392-
.dx-datagrid-content .dx-datagrid-table .dx-row {
393-
&.dx-column-lines > td.dx-datagrid-first-header,
394-
.dx-datagrid-column-no-border {
395-
border-right: none;
396-
397-
&.dx-datagrid-sticky-column-border-left {
398-
border-left: 2px solid $datagrid-border-color;
399-
}
400-
}
401-
}
402-
}
403-
}
404-
405-
.dx-header-multi-row.dx-datagrid-sticky-columns .dx-datagrid-table {
406-
.dx-column-lines > td:first-child {
407-
border-left: none;
408-
border-right: $datagrid-border;
409-
}
410282
}
411283

412284
.dx-datagrid-form-buttons-container {
@@ -419,20 +291,6 @@ $datagrid-text-stub-background-image-path: null !default;
419291
}
420292
}
421293

422-
.dx-datagrid, .dx-rtl .dx-datagrid {
423-
.dx-datagrid-sticky-columns .dx-datagrid-table {
424-
.dx-row {
425-
td.dx-datagrid-sticky-column-border-right {
426-
border-right: 2px solid $datagrid-border-color;
427-
}
428-
429-
td.dx-datagrid-sticky-column-border-left {
430-
border-left: 2px solid $datagrid-border-color;
431-
}
432-
}
433-
}
434-
}
435-
436294
.dx-datagrid-cell-updated-animation {
437295
animation: dx-datagrid-highlight-change 1s;
438296
}

0 commit comments

Comments
 (0)