Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
dcdfe79
Expose the disabled state on the widget root and stop a11y checks pas…
EugeniyKiyashko Sep 1, 2026
c12b3a8
fluent-next: paint disabled states from the disabled roles
EugeniyKiyashko Sep 1, 2026
5045164
fluent-next: cancel the disabled dim on the DataGrid root
EugeniyKiyashko Sep 1, 2026
88091b5
fluent-next: record why the DataGrid root needs :has() and that both …
EugeniyKiyashko Sep 1, 2026
8260dc6
fluent-next: gate the disabled policy so opting out of the dim requir…
EugeniyKiyashko Sep 1, 2026
4e20c25
Declare the cardView drag-source a11y tests as skipped instead of fai…
EugeniyKiyashko Sep 1, 2026
e1020b0
Exclude the portalled filter menu from the landmark rule
EugeniyKiyashko Sep 1, 2026
0c431f1
Fix the contrast defects the restored a11y checks uncovered in the da…
EugeniyKiyashko Sep 1, 2026
bbdc559
fluent-next: stop three names claiming a disabled state they do not p…
EugeniyKiyashko Sep 1, 2026
4e895b4
Stop dimming the cardView drag source, and split read-only from disabled
EugeniyKiyashko Sep 1, 2026
c13db8a
Keep the ThemeBuilder variables while un-dimming the cardView drag so…
EugeniyKiyashko Sep 1, 2026
2759c98
Give a disabled Toolbar a disabled appearance in every theme
EugeniyKiyashko Sep 1, 2026
6d51b27
Make the Chat disabled opacity a theme value instead of a literal in …
EugeniyKiyashko Sep 1, 2026
2a0e03e
fluent-next: let the AI chat regenerate button follow the theme's dis…
EugeniyKiyashko Sep 1, 2026
bd97d64
Split read-only from disabled in CheckBox and RadioButton, and gate t…
EugeniyKiyashko Sep 1, 2026
f6a9e16
Ratchet the components that have no disabled rule of their own
EugeniyKiyashko Sep 1, 2026
5a8acda
Cancel the sortable dim where it is applied, not on the child
EugeniyKiyashko Sep 1, 2026
36018d8
fluent-next: drop the blanket disabled dim
EugeniyKiyashko Sep 1, 2026
b68242c
Bring the disabled-states record in line with the code
EugeniyKiyashko Sep 1, 2026
13ad68c
Remove the opacity resets the dim left behind
EugeniyKiyashko Sep 1, 2026
83b5ee6
Let fluent-next opt out of the base dim resets it no longer needs
EugeniyKiyashko Sep 1, 2026
dba9774
Stop the comparison page counting unjudgeable cases as missing states
EugeniyKiyashko Sep 1, 2026
53bdbf6
Give the remaining markup blocks and the splitter a disabled state
EugeniyKiyashko Sep 1, 2026
e46ad70
Let the comparison page open portalled components in every column
EugeniyKiyashko Sep 1, 2026
75f0d0d
Paint the disabled states that were still dimmed, and the ones on the…
EugeniyKiyashko Sep 1, 2026
20f6396
Drop the dim column from the comparison page
EugeniyKiyashko Sep 1, 2026
822e3ac
Re-shoot the etalons the disabled and focus work changed
EugeniyKiyashko Sep 1, 2026
9931596
Paint the switch handle and the TreeView expander from the roles that…
EugeniyKiyashko Sep 1, 2026
69e57cb
Stop dimming the dragged grid column, and inventory the rest of the h…
EugeniyKiyashko Sep 1, 2026
50d5a22
Fix the comparison page clipping its own content and racing the theme
EugeniyKiyashko Sep 1, 2026
db36eb5
Cover every disabled configuration the theme actually distinguishes
EugeniyKiyashko Sep 1, 2026
2de3d23
Put messages in the chat case so its disabled state can be judged
EugeniyKiyashko Sep 1, 2026
fd7ef1b
Stop dimming the chat, and take the answer from the package instead o…
EugeniyKiyashko Sep 1, 2026
7184ec3
Validate every disabled answer the package gives, and close the three…
EugeniyKiyashko Sep 1, 2026
ebc7089
Adopt the package's disabled roles wherever the theme had chosen a di…
EugeniyKiyashko Sep 1, 2026
a137324
Fix five places the dim removal left unpainted, and one broken galler…
EugeniyKiyashko Sep 1, 2026
bf786c9
Paint the TreeList expander, and put the build date on the comparison…
EugeniyKiyashko Sep 1, 2026
06fbd27
Grey what a disabled calendar and a disabled tab strip had kept at fu…
EugeniyKiyashko Sep 1, 2026
04acfa1
Gate the defect shape the whole series shared, and close what it found
EugeniyKiyashko Sep 1, 2026
d6cadbf
Close the two remaining dims, and the background defects the colour g…
EugeniyKiyashko Sep 1, 2026
48d956f
Let a button follow a disabled container, and keep the calendar's sel…
EugeniyKiyashko Sep 2, 2026
8772862
Grey the label a tab actually shows
EugeniyKiyashko Sep 2, 2026
0ba984c
Fix the gallery roles, and cover item.disabled on every collection wi…
EugeniyKiyashko Sep 2, 2026
b38b37e
Fix the gallery roles, and cover item.disabled on every collection wi…
EugeniyKiyashko Sep 2, 2026
f985382
Answer the tabs asymmetry, and give the FAB, scheduler time and file …
EugeniyKiyashko Sep 2, 2026
d3b199c
Disable the editors nested in a container, and restore the states the…
EugeniyKiyashko Sep 2, 2026
036cb10
Stop a disabled field shouting an error, and write up the review
EugeniyKiyashko Sep 2, 2026
c06f5ca
Grey the stepper ring, keep the spinner spinning, and cover the step …
EugeniyKiyashko Sep 2, 2026
fd92d8b
Commit the two files the gate needs, which CI was failing without
EugeniyKiyashko Sep 2, 2026
3400ed9
Stop a disabled invalid field showing a red caption, and add the revi…
EugeniyKiyashko Sep 2, 2026
964ca15
Keep the review notes and the playground pages out of the PR
EugeniyKiyashko Sep 2, 2026
47b4869
Grey the selected page of a disabled pager
EugeniyKiyashko Sep 2, 2026
01c5380
Re-shoot the etalons the disabled work moved
EugeniyKiyashko Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions apps/demos/testing/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,16 @@ const getIgnoredRules = (testName) => {

if ((isMaterial() || isFluent())
&& [
// False positive: contrast rules do not apply to disabled tags
'Accordion-Overview',
'TagBox-Overview',
// Cause not reproduced: the demo has no disabled element, so the original
// "disabled tags" reason does not apply to it. Needs a measurement in CI.
'TreeList-StatePersistence',
// Not a false positive, and not the demo's colour: it paints the falling quote with the
// theme's own --dx-color-danger. In the dark palette that role is #e4554f, which is
// 4.92:1 on an alternating row (#161616) but 4.22:1 on a normal one (#242424), so roughly
// half the rows fail and which ones is decided by the live data. The role is the one the
// package itself assigns to error text (text-input.color.invalid.content.rest) and the one
// Blazor uses, so the fix belongs to the palette rather than to this demo.
'DataGrid-SignalRService',
// False positive: contrast rules do not apply to custom orange color
'CardView-FieldTemplate',
// False positive: contrast rules do not apply to read-only editors on the custom option panel background
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 8 additions & 21 deletions e2e/testcafe-devextreme/helpers/accessibility/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ElementContext } from 'axe-core';
import type { WidgetName } from 'devextreme-testcafe-models/types';
import { createWidget } from '../createWidget';
import { getThemeName } from '../themeUtils';
import { a11yCheck, A11yCheckOptions } from './utils';
import { a11yCheck, isA11yCheckApplicable, A11yCheckOptions } from './utils';
import { generateOptionMatrix, Options } from '../generateOptionMatrix';

export interface Configuration<TComponentOptions = unknown> {
Expand Down Expand Up @@ -32,8 +32,6 @@ const getOptionConfigurations = <TComponentOptions = unknown>(
return generateOptionMatrix(options);
};

const componentsWithDisabledColorContrastIssues: WidgetName[] = ['dxTagBox', 'dxFileUploader', 'dxDateRangeBox'];

export const testAccessibility = <TComponentOptions = unknown>(
configuration: Configuration<TComponentOptions>,
): void => {
Expand All @@ -47,25 +45,14 @@ export const testAccessibility = <TComponentOptions = unknown>(

const optionConfigurations = getOptionConfigurations(options);

optionConfigurations.forEach((optionConfiguration, index) => {
test(`${component}: test with axe #${index}`, async (t) => {
const currentA11yCheckConfig = { ...a11yCheckConfig } as A11yCheckOptions;
const isComponentDisabled = (optionConfiguration as Record<string, unknown>).disabled;
const shouldIgnoreColorContrast = componentsWithDisabledColorContrastIssues
.includes(component) && isComponentDisabled;

if (shouldIgnoreColorContrast) {
if (currentA11yCheckConfig.runOnly === 'color-contrast') {
return;
}
// A theme that runs color-contrast only has nothing left to check once the rule is off.
// Declaring the skip here keeps it visible in the report; bailing out of the test body
// used to report it as passed.
const declareTest = isA11yCheckApplicable(a11yCheckConfig) ? test : test.skip;

currentA11yCheckConfig.rules = {
...currentA11yCheckConfig.rules,
'color-contrast': { enabled: false },
};
}

await a11yCheck(t, currentA11yCheckConfig, selector, optionConfiguration);
optionConfigurations.forEach((optionConfiguration, index) => {
declareTest(`${component}: test with axe #${index}`, async (t) => {
await a11yCheck(t, a11yCheckConfig, selector, optionConfiguration);
}).before(async (t) => {
await createWidget(
component,
Expand Down
14 changes: 12 additions & 2 deletions e2e/testcafe-devextreme/helpers/accessibility/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const isColorContrastChecked = (options: A11yCheckOptions): boolean => {
return options.runOnly === undefined || options.runOnly === COLOR_CONTRAST_RULE;
};

// Whether the given configuration leaves anything for the current theme to check. Call sites
// use it to declare a test with `test.skip`, so a check that cannot run is visible as skipped
// instead of counted as passed.
export const isA11yCheckApplicable = (options: A11yCheckOptions = defaultOptions): boolean => getThemeName() !== 'fluent-next' || isColorContrastChecked(options);

const createFullReport = (results, configuration) => {
let report = createReport(results.violations);

Expand All @@ -41,9 +46,14 @@ Promise<void> => {
// so only color-contrast is re-checked for it — regardless of the caller's config.
const isColorContrastOnly = getThemeName() === 'fluent-next';

// Nothing is left to check: the caller excluded the only rule this theme runs.
// Returning here used to report the test as passed with no assertion at all. A check that
// cannot run has to be declared as skipped where the test is declared, not swallowed here.
if (isColorContrastOnly && !isColorContrastChecked(options)) {
return;
throw new Error(
'a11yCheck was called on fluent-next with a configuration that excludes color-contrast, '
+ 'the only rule this theme runs. Nothing would be checked. Either declare the test with '
+ 'isA11yCheckApplicable() so it is skipped explicitly, or leave color-contrast enabled.',
);
}

const effectiveOptions: A11yCheckOptions = isColorContrastOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ test('headerPanel dragging column when it has sorting and headerFilter', async (

await triggerDragStart(columnElement);

const a11yCheckConfig = {
// False positive: contrast rules do not apply to disabled elements
rules: { 'color-contrast': { enabled: false } },
};
await a11yCheck(t, a11yCheckConfig, CARD_VIEW_SELECTOR);
await a11yCheck(t, {}, CARD_VIEW_SELECTOR);
}).before(async () => createWidget('dxCardView', {
allowColumnReordering: true,
columnChooser: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const DRAG_MOVE_Y_COEFFICIENT = 1;

const a11yCheckConfig = {
rules: {
// False positive: contrast rules do not apply to disabled elements
'color-contrast': { enabled: false },
// NOTE: Draggable template is outside the role="main" landmark
region: { enabled: false },
},
Expand Down
28 changes: 8 additions & 20 deletions e2e/testcafe-devextreme/tests/accessibility/dataGrid/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,12 @@ test('Filter row - filter menu', async (t) => {

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
rules: {
'aria-command-name': { enabled: true },
// The filter menu is rendered into body, outside the role="main" landmark, so its
// scrollable content trips the best-practice `region` rule the way every portalled
// overlay does here (see cardView/sortable.ts and the overlay checks in pivotGrid.ts).
region: { enabled: false },
},
});
}).before(async () => createWidget('dxDataGrid', {
Expand Down Expand Up @@ -298,10 +301,7 @@ test('Filter panel - popup with filter builder', async (t) => {
.expect(filterPanel.isOpened)
.ok();

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
});
await a11yCheck(t, a11yCheckConfig);
}).before(async () => createWidget('dxDataGrid', {
dataSource: getData(10, 5),
keyExpr: 'field_0',
Expand Down Expand Up @@ -347,10 +347,7 @@ test('Search panel - highlight', async (t) => {
.expect(dataGrid.isReady())
.ok();

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
}, DATA_GRID_SELECTOR);
await a11yCheck(t, a11yCheckConfig, DATA_GRID_SELECTOR);
}).before(async () => createWidget('dxDataGrid', {
dataSource: getData(10, 5),
keyExpr: 'field_0',
Expand Down Expand Up @@ -517,7 +514,6 @@ test('Column chooser with the \'select\' mode', async (t) => {

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
rules: {
'scrollable-region-focusable': { enabled: false },
},
Expand Down Expand Up @@ -563,7 +559,6 @@ test('Empty column chooser', async (t) => {

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
rules: {
'aria-required-children': { enabled: false },
},
Expand Down Expand Up @@ -657,10 +652,7 @@ test('Row editing mode - confirm delete message', async (t) => {
.expect(isDialogOpened)
.ok();

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
});
await a11yCheck(t, a11yCheckConfig);
}).before(async () => createWidget('dxDataGrid', {
dataSource: getData(10, 5),
keyExpr: 'field_0',
Expand Down Expand Up @@ -967,10 +959,7 @@ test('Export', async (t) => {
.expect(exportButton.isOpened)
.ok();

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
});
await a11yCheck(t, a11yCheckConfig);
}).before(async () => createWidget('dxDataGrid', {
dataSource: getData(10, 5),
keyExpr: 'field_0',
Expand Down Expand Up @@ -998,7 +987,6 @@ test('Context menu', async (t) => {

await a11yCheck(t, {
...a11yCheckConfig,
runOnly: '',
rules: {
region: { enabled: false },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ $pagination-info-paddings: 9px;
box-sizing: content-box;

&.dx-button-disable {
opacity: $pagination-nav-disabled-opacity;
/* false opts out of the dim; `null` would be overwritten by the `!default` above and
silently restore it */
@if $pagination-nav-disabled-opacity {
opacity: $pagination-nav-disabled-opacity;
}

cursor: inherit;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ $sortable-side-offset: 6px;
min-width: fit-content;
padding: 0 $cardview-header-item__right-padding 0 $cardview-header-item__left-padding;

/* dxSortable dims a drag source to 0.5 on this element, and opacity on a child cannot undo a
parent's group opacity - the header item's own opt-out was inert and its text measured 3.33
against its own background. The component marks the source with colour instead, so the dim is
cancelled here, where it is applied. */
&.dx-sortable-source {
opacity: 1;
}

&:first-child {
padding: 0 $cardview-header-item__right-padding 0 $cardview-header-item__left-padding;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,33 @@
outline-offset: -2px;
}

&.dx-sortable-source {
/* The element being dragged is ordinary, active content, not a disabled one: the parameters are
named after the state they mark, and the colours a theme feeds them have to keep the content
readable - Blazor marks a drag source and leaves the content alone
(ds-themes/components/tabs/layout.scss).

Both selectors are needed: dxSortable puts dx-sortable-source on the item's container here, and
matching only the item left the component's own opt-out from the generic .dx-sortable-source dim
(0.5) inert - the header text measured 3.33 against its own background. */
&.dx-sortable-source,
.dx-sortable-source > & {
opacity: 1.0;
background-color: $cardview-header-panel__item--disabled-bg-color;
border-color: $cardview-header-panel__item--disabled-border-color;
color: $cardview-header-panel__item--disabled-text-color;
font-weight: $cardview-header-panel__item--disabled-text-weight;
background-color: $cardview-header-panel__item--drag-source-bg-color;
border-color: $cardview-header-panel__item--drag-source-border-color;
color: $cardview-header-panel__item--drag-source-text-color;
font-weight: $cardview-header-panel__item--drag-source-text-weight;

.dx-icon {
color: $cardview-header-panel__item--disabled__icon-color;
color: $cardview-header-panel__item--drag-source__icon-color;
}

.dx-header-filter-icon--selected {
color: $cardview-header-panel__item--disabled__header-filter-icon--selected-color;
color: $cardview-header-panel__item--drag-source__header-filter-icon--selected-color;
}

.dx-cardview-header-item-sorting-order {
color: $cardview-header-panel__item--disabled__sort-index-text-color;
font-weight: $cardview-header-panel__item--disabled__sort-index-text-weight;
color: $cardview-header-panel__item--drag-source__sort-index-text-color;
font-weight: $cardview-header-panel__item--drag-source__sort-index-text-weight;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ $cardview-header-panel__item--hovered__header-filter-icon--selected-color: null
$cardview-header-panel__item--hovered__sort-index-text-color: null !default;
$cardview-header-panel__item--hovered__sort-index-text-weight: null !default;

$cardview-header-panel__item--disabled-bg-color: null !default;
$cardview-header-panel__item--disabled-border-color: null !default;
$cardview-header-panel__item--disabled-text-color: null !default;
$cardview-header-panel__item--disabled-text-weight: null !default;
$cardview-header-panel__item--disabled__icon-color: null !default;
$cardview-header-panel__item--disabled__header-filter-icon--selected-color: null !default;
$cardview-header-panel__item--disabled__sort-index-text-color: null !default;
$cardview-header-panel__item--disabled__sort-index-text-weight: null !default;
$cardview-header-panel__item--drag-source-bg-color: null !default;
$cardview-header-panel__item--drag-source-border-color: null !default;
$cardview-header-panel__item--drag-source-text-color: null !default;
$cardview-header-panel__item--drag-source-text-weight: null !default;
$cardview-header-panel__item--drag-source__icon-color: null !default;
$cardview-header-panel__item--drag-source__header-filter-icon--selected-color: null !default;
$cardview-header-panel__item--drag-source__sort-index-text-color: null !default;
$cardview-header-panel__item--drag-source__sort-index-text-weight: null !default;

$cardview-header-panel__item--dragged-bg-color: null !default;
$cardview-header-panel__item--dragged-border-color: null !default;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
$chat-disabled-opacity: 0.5 !default;
$chat-file-name-font-weight: 600 !default;
$chat-editing-preview-caption-font-weight: 500 !default;

@use "../mixins" as *;
@use "layout/chat" as *;
@use "layout/chat" as * with (
$disabled-opacity: $chat-disabled-opacity,
);
@use "layout/chat-avatar" as *;
@use "layout/chat-fileview" as * with (
$file-name-font-weight: $chat-file-name-font-weight,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$disabled-opacity: 0.5 !default;

.dx-chat {
display: flex;
flex-direction: column;
Expand All @@ -8,7 +10,11 @@
overflow-y: auto;

&.dx-state-disabled {
opacity: 0.5;
/* false opts out of the dim; `null` would be overwritten by the `!default` in the parent
module and silently restore it */
@if $disabled-opacity {
opacity: $disabled-opacity;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ $datagrid-common-form-buttons-border-radius: null !default;
$datagrid-common-form-buttons-margin-left: null !default;
$datagrid-common-form-buttons-margin-right: null !default;

@include grid-base(datagrid);
$datagrid-draggable-column-opacity: 0.5 !default;

@include grid-base(datagrid, $datagrid-draggable-column-opacity);

.dx-datagrid {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ $datagrid-common-form-buttons-border-radius: 3px !default;
$datagrid-common-form-buttons-margin-left: 10px !default;
$datagrid-common-form-buttons-margin-right: 6px !default;

$datagrid-draggable-column-opacity: 0.5 !default;

@use "./common" with (
$datagrid-draggable-column-opacity: $datagrid-draggable-column-opacity,
$datagrid-common-group-min-width: $datagrid-common-group-min-width,
$datagrid-common-addrow-margin-right: $datagrid-common-addrow-margin-right,
$datagrid-common-addrow-margin-left: $datagrid-common-addrow-margin-left,
Expand Down
12 changes: 9 additions & 3 deletions packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
clip-path: polygon(0 0);
}

@mixin grid-base($widget-name) {
@mixin grid-base($widget-name, $draggable-column-opacity: 0.5) {
@include grid-base-cell($widget-name);

.dx-#{$widget-name}-checkbox-size {
Expand Down Expand Up @@ -177,7 +177,9 @@
}

&.dx-#{$widget-name}-draggable-column {
opacity: 0.5;
@if $draggable-column-opacity {
opacity: $draggable-column-opacity;
}
}
}
}
Expand Down Expand Up @@ -255,7 +257,11 @@
}

.dx-#{$widget-name}-draggable-column {
opacity: 0.5;
/* false opts out of the dim; a theme that marks the dragged column with colour instead does
not want its header text halved */
@if $draggable-column-opacity {
opacity: $draggable-column-opacity;
}
}

.dx-data-row.dx-state-hover {
Expand Down
Loading
Loading