Skip to content

Commit dde7931

Browse files
authored
DataGrid/TreeList: Split basic cell styles (#32694)
Co-authored-by: Alyar <>
1 parent 48d055c commit dde7931

File tree

29 files changed

+2906
-1779
lines changed

29 files changed

+2906
-1779
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 & 160 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,
@@ -116,22 +123,16 @@ $datagrid-text-stub-background-image-path: null !default;
116123
}
117124

118125
.dx-datagrid-headers {
119-
.dx-header-row > td,
120126
.dx-header-filter {
121127
outline: none;
122128
}
123129

124130
&.dx-state-focused .dx-header-row {
125-
td:focus,
126131
td .dx-header-filter:focus {
127132
outline: 2px solid;
128133
outline-color: $datagrid-focused-border-color;
129134
outline-offset: 2px;
130135
}
131-
132-
td:focus {
133-
outline-offset: -2px;
134-
}
135136
}
136137
}
137138

@@ -160,27 +161,6 @@ $datagrid-text-stub-background-image-path: null !default;
160161
}
161162
}
162163

163-
.dx-datagrid-rowsview .dx-data-row,
164-
.dx-datagrid-rowsview .dx-freespace-row,
165-
.dx-datagrid-rowsview .dx-virtual-row,
166-
.dx-datagrid-rowsview .dx-header-row,
167-
.dx-datagrid-headers .dx-row {
168-
td.dx-pointer-events-none {
169-
border-left: 2px solid;
170-
border-left-color: $datagrid-border-color;
171-
border-right: 2px solid;
172-
border-right-color: $datagrid-border-color;
173-
174-
&.dx-first-cell {
175-
border-left: none;
176-
}
177-
178-
&.dx-last-cell {
179-
border-right: none;
180-
}
181-
}
182-
}
183-
184164
.dx-datagrid-rowsview.dx-state-focused .dx-data-row {
185165
& > td.dx-command-edit > a.dx-link:focus {
186166
outline: 2px solid;
@@ -200,10 +180,6 @@ $datagrid-text-stub-background-image-path: null !default;
200180
}
201181

202182
.dx-virtual-row > td {
203-
&:not(.dx-datagrid-sticky-column, .dx-datagrid-sticky-column-left, .dx-datagrid-sticky-column-right) {
204-
position: relative;
205-
}
206-
207183
&:not(.dx-datagrid-group-space)::before {
208184
display: block;
209185
height: 100%;
@@ -220,17 +196,9 @@ $datagrid-text-stub-background-image-path: null !default;
220196

221197
.dx-datagrid-total-footer {
222198
.dx-row.dx-footer-row {
223-
td.dx-command-expand {
224-
&.dx-datagrid-sticky-column, &.dx-datagrid-sticky-column-left, &.dx-datagrid-sticky-column-right {
225-
background-color: $datagrid-base-background-color;
226-
}
227-
}
228-
229199
.dx-datagrid-sticky-column,
230200
.dx-datagrid-sticky-column-left,
231201
.dx-datagrid-sticky-column-right {
232-
padding-inline: 0;
233-
234202
.dx-datagrid-summary-item {
235203
padding-inline: $datagrid-cell-padding;
236204
}
@@ -243,11 +211,6 @@ $datagrid-text-stub-background-image-path: null !default;
243211
}
244212

245213
.dx-error-row {
246-
td {
247-
color: $datagrid-row-error-color;
248-
padding: 0;
249-
}
250-
251214
.dx-error-message {
252215
@include dx-datagrid-error-message();
253216
}
@@ -259,45 +222,15 @@ $datagrid-text-stub-background-image-path: null !default;
259222
}
260223
}
261224

262-
.dx-column-lines > td {
263-
&:first-child {
264-
border-left: none;
265-
}
266-
267-
&:last-child {
268-
border-right: none;
269-
}
270-
}
271-
272225
.dx-command-drag .dx-datagrid-drag-icon {
273226
@include dx-icon(dragvertical);
274227
}
275228

276229
.dx-datagrid-sticky-columns {
277-
.dx-column-lines > td {
278-
border-right: none;
279-
}
280-
281-
.dx-datagrid-content .dx-datagrid-table .dx-row {
282-
&.dx-column-lines > td.dx-datagrid-first-header,
283-
.dx-datagrid-column-no-border {
284-
border-left: none;
285-
}
286-
}
287-
288230
.dx-datagrid-content.dx-sortable {
289231
overflow: visible;
290232
}
291233
}
292-
293-
.dx-datagrid-sticky-column, .dx-datagrid-sticky-column-left, .dx-datagrid-sticky-column-right {
294-
background-color: $datagrid-base-background-color;
295-
}
296-
}
297-
298-
.dx-header-multi-row.dx-datagrid-sticky-columns .dx-column-lines > td:first-child {
299-
border-left: $datagrid-border;
300-
border-left-color: $datagrid-border-color;
301234
}
302235

303236
.dx-datagrid-filter-panel {
@@ -347,27 +280,6 @@ $datagrid-text-stub-background-image-path: null !default;
347280

348281
.dx-rtl {
349282
.dx-datagrid {
350-
.dx-datagrid-rowsview .dx-data-row,
351-
.dx-datagrid-rowsview .dx-freespace-row,
352-
.dx-datagrid-rowsview .dx-virtual-row,
353-
.dx-datagrid-rowsview .dx-header-row,
354-
.dx-datagrid-headers .dx-row {
355-
td.dx-pointer-events-none {
356-
border-left: 2px solid;
357-
border-left-color: $datagrid-border-color;
358-
border-right: 2px solid;
359-
border-right-color: $datagrid-border-color;
360-
361-
&.dx-first-cell {
362-
border-right: none;
363-
}
364-
365-
&.dx-last-cell {
366-
border-left: none;
367-
}
368-
}
369-
}
370-
371283
.dx-datagrid-rowsview {
372284
.dx-virtual-row > td {
373285
&::before {
@@ -379,55 +291,6 @@ $datagrid-text-stub-background-image-path: null !default;
379291
}
380292
}
381293
}
382-
383-
.dx-column-lines > td {
384-
&:first-child {
385-
border-right: none;
386-
border-left: $datagrid-border;
387-
border-left-color: $datagrid-border-color;
388-
}
389-
390-
&:last-child {
391-
border-left: none;
392-
}
393-
}
394-
395-
.dx-datagrid-sticky-columns {
396-
.dx-column-lines {
397-
& > td {
398-
border-left: none;
399-
}
400-
401-
&:not(.dx-datagrid-group-footer) > td {
402-
border-right: $datagrid-border;
403-
border-right-color: $datagrid-border-color;
404-
405-
&:first-child {
406-
border-right: none;
407-
}
408-
}
409-
}
410-
411-
.dx-datagrid-content .dx-datagrid-table .dx-row {
412-
&.dx-column-lines > td.dx-datagrid-first-header,
413-
.dx-datagrid-column-no-border {
414-
border-right: none;
415-
416-
&.dx-datagrid-sticky-column-border-left {
417-
border-left: 2px solid;
418-
border-left-color: $datagrid-border-color;
419-
}
420-
}
421-
}
422-
}
423-
}
424-
425-
.dx-header-multi-row.dx-datagrid-sticky-columns .dx-datagrid-table {
426-
.dx-column-lines > td:first-child {
427-
border-left: none;
428-
border-right: $datagrid-border;
429-
border-right-color: $datagrid-border-color;
430-
}
431294
}
432295

433296
.dx-datagrid-form-buttons-container {
@@ -440,22 +303,6 @@ $datagrid-text-stub-background-image-path: null !default;
440303
}
441304
}
442305

443-
.dx-datagrid, .dx-rtl .dx-datagrid {
444-
.dx-datagrid-sticky-columns .dx-datagrid-table {
445-
.dx-row {
446-
td.dx-datagrid-sticky-column-border-right {
447-
border-right: 2px solid;
448-
border-right-color: $datagrid-border-color;
449-
}
450-
451-
td.dx-datagrid-sticky-column-border-left {
452-
border-left: 2px solid;
453-
border-left-color: $datagrid-border-color;
454-
}
455-
}
456-
}
457-
}
458-
459306
.dx-datagrid-cell-updated-animation {
460307
animation: dx-datagrid-highlight-change 1s;
461308
}

0 commit comments

Comments
 (0)