Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThemeBuilder - Text Color parameter is not applied to Outlined and Text buttons (T1212078) #28636

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 39 additions & 3 deletions packages/devextreme-scss/scss/widgets/fluent/button/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $button-normal-selected-bg: $base-selected-bg !default;
$button-normal-bg-inverted: null !default;

/**
* $name 10. Text color
* $name 10. Text color (contained)
* $type color
*/
$button-default-color: null !default;
Expand Down Expand Up @@ -94,13 +94,21 @@ $button-default-active-bg: null !default;
*/
$button-default-selected-bg: null !default;

/**
* $name 11. Text color (outlined)
* $type color
*/
$button-default-outlined-color: $base-accent !default;
$button-default-outlined-border-color: $base-accent !default;
$button-default-outlined-hover-bg: null !default;
$button-default-outlined-focused-bg: null !default;
$button-default-outlined-active-bg: null !default;
$button-default-outlined-selected-bg: null !default;

/**
* $name 11. Text color (text)
* $type color
*/
$button-default-text-color: $base-accent !default;

/**
Expand Down Expand Up @@ -337,13 +345,41 @@ $button-normal-text-focused-bg: $button-normal-hover-bg !default;
$button-normal-text-active-bg: $button-normal-active-bg !default;
$button-normal-text-selected-bg: $button-normal-selected-bg !default;

/**
* $name 12. Hover state text color (outlined)
* $type color
*/
$button-default-outlined-color-hover: $button-accent-foreground-color !default;

/**
* $name 13. Active state text color (outlined)
* $type color
*/
$button-default-outlined-color-active: $button-accent-foreground-color !default;

/**
* $name 21. Selected state text color (outlined)
* $type color
*/
$button-default-outlined-selected-color: $button-accent-foreground-color !default;

$button-default-text-color-hover: $button-default-outlined-color-hover !default;
/**
* $name 12. Hover state text color (text)
* $type color
*/
$button-default-text-color-hover: $button-accent-foreground-color !default;

/**
* $name 13. Active state text color (text)
* $type color
*/
$button-default-text-color-active: $button-default-outlined-color-active !default;
$button-default-text-selected-color: $button-default-outlined-selected-color !default;

/**
* $name 21. Selected state text color (text)
* $type color
*/
$button-default-text-selected-color: $button-accent-foreground-color !default;

$button-default-text-hover-bg: $button-default-outlined-hover-bg !default;
$button-default-text-focused-bg: $button-default-outlined-focused-bg !default;
Expand Down
11 changes: 10 additions & 1 deletion packages/devextreme-scss/scss/widgets/fluent/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@
}
}

@mixin dx-button-flat-color-styling($button-color, $button-color-hover, $button-color-active, $hover-bg, $focused-bg, $active-bg, $selected-bg: $active-bg, $selected-color: $button-color) {
@mixin dx-button-flat-color-styling(
$button-color,
$button-color-hover,
$button-color-active,
$hover-bg,
$focused-bg,
$active-bg,
$selected-bg: $active-bg,
$selected-color: $button-color
) {
@include dx-button-styling-variant(
transparent,
$button-color,
Expand Down
78 changes: 53 additions & 25 deletions packages/devextreme-scss/scss/widgets/generic/button/_colors.scss

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
@include dx-button-styling-variant(
transparent,
$button-default-border-color,
$button-default-border-color,
$button-default-outlined-color,
$button-default-outlined-bg-hover,
$button-default-outlined-bg-focused,
$button-default-outlined-bg-active,
Expand Down Expand Up @@ -227,7 +227,7 @@
@include dx-button-styling-variant(
transparent,
transparent,
$button-default-border-color,
$button-default-text-color,
$button-default-text-bg-hover,
$button-default-text-bg-focused,
$button-default-text-bg-active,
Expand Down
26 changes: 24 additions & 2 deletions packages/devextreme-scss/scss/widgets/material/button/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $button-normal-bg-inverted: null !default;
$button-default-color: $base-inverted-text-color !default;

/**
* $name 20. Selected state text color
* $name 20. Selected state text color (contained)
* $type color
*/
$button-default-selected-color: $base-inverted-text-color !default;
Expand Down Expand Up @@ -99,12 +99,35 @@ $button-default-outlined-hover-bg: color.change($button-default-bg, $alpha: 0.08
$button-default-outlined-focused-bg: color.change($button-default-bg, $alpha: 0.08) !default;
$button-default-outlined-active-bg: color.change($button-default-bg, $alpha: 0.36) !default;
$button-default-outlined-selected-bg: color.change($button-default-bg, $alpha: 0.36) !default;

/**
* $name 11. Text color (outlined)
* $type color
*/
$button-default-outlined-color: $button-default-bg !default;
$button-default-outlined-border-color: $button-default-bg !default;

/**
* $name 21. Selected state text color (outlined)
* $type color
*/
$button-default-outlined-selected-color: $button-default-bg !default;

$button-default-text-hover-bg: color.change($button-default-bg, $alpha: 0.08) !default;
$button-default-text-focused-bg: color.change($button-default-bg, $alpha: 0.08) !default;
$button-default-text-active-bg: color.change($button-default-bg, $alpha: 0.36) !default;
$button-default-text-selected-bg: color.change($button-default-bg, $alpha: 0.36) !default;

/**
* $name 11. Text color (text)
* $type color
*/
$button-default-text-color: $button-default-bg !default;

/**
* $name 21. Selected state text color (text)
* $type color
*/
$button-default-text-selected-color: $button-default-bg !default;

/**
Expand Down Expand Up @@ -271,4 +294,3 @@ $button-normal-text-hover-bg: color.change($button-normal-bg-inverted, $alpha: 0
$button-normal-text-focused-bg: color.change($button-normal-bg-inverted, $alpha: 0.08) !default;
$button-normal-text-active-bg: color.change($button-normal-bg-inverted, $alpha: 0.3) !default;
$button-normal-text-selected-bg: color.change($button-normal-bg-inverted, $alpha: 0.18) !default;

Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@

&.dx-button-default {
@include dx-button-flat-color-styling(
$button-default-bg,
$button-default-text-color,
$button-default-text-hover-bg,
$button-default-text-focused-bg,
$button-default-text-active-bg,
Expand Down Expand Up @@ -184,8 +184,8 @@

&.dx-button-default {
@include dx-button-outlined-color-styling(
$button-default-bg,
$button-default-bg,
$button-default-outlined-color,
$button-default-outlined-border-color,
$button-default-outlined-hover-bg,
$button-default-outlined-focused-bg,
$button-default-outlined-active-bg,
Expand Down
19 changes: 17 additions & 2 deletions packages/devextreme-scss/scss/widgets/material/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,14 @@
}
}

@mixin dx-button-flat-color-styling($button-color, $hover-bg, $focused-bg, $active-bg, $selected-bg: $active-bg, $selected-color: $button-color) {
@mixin dx-button-flat-color-styling(
$button-color,
$hover-bg,
$focused-bg,
$active-bg,
$selected-bg: $active-bg,
$selected-color: $button-color
) {
@include dx-button-styling-variant(
transparent,
$button-color,
Expand All @@ -143,7 +150,15 @@
);
}

@mixin dx-button-outlined-color-styling($button-color, $border-color, $hover-bg, $focused-bg, $active-bg, $selected-bg, $selected-color) {
@mixin dx-button-outlined-color-styling(
$button-color,
$border-color,
$hover-bg,
$focused-bg,
$active-bg,
$selected-bg,
$selected-color
) {
border-width: 1px;
border-style: solid;
border-color: $border-color;
Expand Down
Loading