DataGrid/TreeList: Split basic cell styles#32694
DataGrid/TreeList: Split basic cell styles#32694Alyar666 wants to merge 1 commit intoDevExpress:26_1from
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the base Grid (DataGrid/TreeList) SCSS by extracting “basic cell styles” from gridBase/_index.scss into a new gridBase/layout/cell.scss mixin, then including that mixin from grid-base($widget-name).
Changes:
- Added
grid-base-cell($widget-name)mixin inlayout/cell.scssand moved core cell-related rules into it. - Updated
gridBase/_index.scssto@usethe new layout module and@include grid-base-cell($widget-name). - Removed large inlined cell-style blocks from
gridBase/_index.scssand adjusted a few selectors accordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
packages/devextreme-scss/scss/widgets/base/gridBase/layout/cell.scss |
New extracted mixin with core cell styles (positioning, overflow, sizing, borders, padding, etc.). |
packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss |
Imports and includes the new mixin; deletes/rewires the previously inlined rules. |
Comments suppressed due to low confidence (1)
packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss:75
grid-base-cellalready defines the “last-row-border” behavior for cells (layout/cell.scsssets… > td { border-bottom-width: 0; }). Keeping this additional rule here is redundant, and as written it targets.dx-data-rowrather than thetds (which is typically where the border is applied). Consider removing this block from_index.scssand keeping the single> tdrule inlayout/cell.scss.
| $grid-cell-padding: 7px; | ||
| $grid-total-footer-paddings: 7px; | ||
| $grid-command-select-column-width: 70px; | ||
| $grid-command-edit-column-width: 100px; | ||
| $grid-command-edit-column-with-icons-width: 80px; | ||
| $grid-command-expand-column-width: 30px; | ||
| $grid-command-adaptive-column-width: 36px; |
There was a problem hiding this comment.
grid-base-cell re-declares the same sizing/padding variables that are already defined in grid-base($widget-name) ($grid-cell-padding, $grid-command-…, etc.). This duplication makes future edits error-prone and prevents grid-base from being the single source of truth. Consider removing these redefinitions and relying on the caller scope variables, or pass them as explicit mixin parameters if isolation is desired.
| $grid-cell-padding: 7px; | |
| $grid-total-footer-paddings: 7px; | |
| $grid-command-select-column-width: 70px; | |
| $grid-command-edit-column-width: 100px; | |
| $grid-command-edit-column-with-icons-width: 80px; | |
| $grid-command-expand-column-width: 30px; | |
| $grid-command-adaptive-column-width: 36px; |
No description provided.