Skip to content

DataGrid/TreeList: Split basic cell styles#32694

Open
Alyar666 wants to merge 1 commit intoDevExpress:26_1from
Alyar666:datagrid_scss_refactoring_26_1
Open

DataGrid/TreeList: Split basic cell styles#32694
Alyar666 wants to merge 1 commit intoDevExpress:26_1from
Alyar666:datagrid_scss_refactoring_26_1

Conversation

@Alyar666
Copy link
Contributor

No description provided.

@Alyar666 Alyar666 self-assigned this Feb 25, 2026
@Alyar666 Alyar666 requested a review from a team as a code owner February 25, 2026 17:04
Copilot AI review requested due to automatic review settings February 25, 2026 17:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in layout/cell.scss and moved core cell-related rules into it.
  • Updated gridBase/_index.scss to @use the new layout module and @include grid-base-cell($widget-name).
  • Removed large inlined cell-style blocks from gridBase/_index.scss and 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-cell already defines the “last-row-border” behavior for cells (layout/cell.scss sets … > td { border-bottom-width: 0; }). Keeping this additional rule here is redundant, and as written it targets .dx-data-row rather than the tds (which is typically where the border is applied). Consider removing this block from _index.scss and keeping the single > td rule in layout/cell.scss.

Comment on lines +4 to +10
$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;
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
$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;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants