Skip to content

Commit 827ff1b

Browse files
Chat: provide the capability to override the text color in messagebubble on the left side in Themebuilder (#28406)
1 parent 424b31a commit 827ff1b

File tree

7 files changed

+38
-7
lines changed

7 files changed

+38
-7
lines changed

packages/devextreme-scss/scss/widgets/base/chat/layout/chat-messagebubble/_mixins.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@mixin chat-messagebubble(
22
$padding,
33
$border-radius,
4+
$color-secondary,
45
$background-color-secondary,
56
$color-primary,
67
$background-color-primary,
@@ -17,6 +18,7 @@
1718

1819
.dx-chat-messagegroup-alignment-start {
1920
.dx-chat-messagebubble {
21+
color: $color-secondary;
2022
background-color: $background-color-secondary;
2123

2224
&:first-child {

packages/devextreme-scss/scss/widgets/fluent/chat/_colors.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $chat-avatar-color: $base-text-color !default;
3030
$chat-avatar-background-color: $base-active-bg !default;
3131

3232
/**
33-
* $name 40. Bubble text color
33+
* $name 40. Bubble text color (your messages)
3434
* $type color
3535
*/
3636
$chat-bubble-color-primary: $base-text-color !default;
@@ -42,7 +42,13 @@ $chat-bubble-color-primary: $base-text-color !default;
4242
$chat-bubble-background-color-primary: null !default;
4343

4444
/**
45-
* $name 42. Bubble background color (other messages)
45+
* $name 42. Bubble text color (other messages)
46+
* $type color
47+
*/
48+
$chat-bubble-color-secondary: $base-text-color !default;
49+
50+
/**
51+
* $name 43. Bubble background color (other messages)
4652
* $type color
4753
*/
4854
$chat-bubble-background-color-secondary: $base-border-color !default;

packages/devextreme-scss/scss/widgets/fluent/chat/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
@include chat-messagebubble(
3636
$chat-bubble-padding,
3737
$chat-bubble-border-radius,
38+
$chat-bubble-color-secondary,
3839
$chat-bubble-background-color-secondary,
3940
$chat-bubble-color-primary,
4041
$chat-bubble-background-color-primary,

packages/devextreme-scss/scss/widgets/generic/chat/_colors.scss

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $chat-avatar-color: null !default;
3030
$chat-avatar-background-color: $base-border-color !default;
3131

3232
/**
33-
* $name 40. Bubble text color
33+
* $name 40. Bubble text color (your messages)
3434
* $type color
3535
*/
3636
$chat-bubble-color-primary: null !default;
@@ -42,7 +42,13 @@ $chat-bubble-color-primary: null !default;
4242
$chat-bubble-background-color-primary: null !default;
4343

4444
/**
45-
* $name 42. Bubble background color (other messages)
45+
* $name 42. Bubble text color (other messages)
46+
* $type color
47+
*/
48+
$chat-bubble-color-secondary: null !default;
49+
50+
/**
51+
* $name 43. Bubble background color (other messages)
4652
* $type color
4753
*/
4854
$chat-bubble-background-color-secondary: null !default;
@@ -95,7 +101,6 @@ $chat-alertlist-color: $base-invalid-color !default;
95101
*/
96102
$chat-typingindicator-circle-bg-color-center: null !default;
97103

98-
99104
/**
100105
* $name 83. Typing indicator outer circles color
101106
* $type color
@@ -105,6 +110,7 @@ $chat-typingindicator-circle-bg-color: null !default;
105110
@if $color == "light" {
106111
$chat-avatar-color: $base-text-color !default;
107112
$chat-bubble-color-primary: $base-text-color !default;
113+
$chat-bubble-color-secondary: $base-text-color !default;
108114
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
109115
$chat-bubble-background-color-secondary: darken($base-element-bg, 4%) !default;
110116
$chat-information-color: darken($base-bg, 41.57) !default;
@@ -122,6 +128,7 @@ $chat-typingindicator-circle-bg-color: null !default;
122128
@if $color == "dark" {
123129
$chat-avatar-color: $base-text-color !default;
124130
$chat-bubble-color-primary: $base-text-color !default;
131+
$chat-bubble-color-secondary: $base-text-color !default;
125132
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
126133
$chat-bubble-background-color-secondary: lighten($base-element-bg, 4%) !default;
127134
$chat-information-color: lighten($base-bg, 32.55) !default;
@@ -139,6 +146,7 @@ $chat-typingindicator-circle-bg-color: null !default;
139146
@if $color == "carmine" {
140147
$chat-avatar-color: $base-text-color !default;
141148
$chat-bubble-color-primary: $base-text-color !default;
149+
$chat-bubble-color-secondary: $base-text-color !default;
142150
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
143151
$chat-bubble-background-color-secondary: darken($base-element-bg, 4%) !default;
144152
$chat-information-color: darken($base-bg, 41.57) !default;
@@ -156,6 +164,7 @@ $chat-typingindicator-circle-bg-color: null !default;
156164
@if $color == "contrast" {
157165
$chat-avatar-color: $base-inverted-text-color !default;
158166
$chat-bubble-color-primary: $base-inverted-text-color !default;
167+
$chat-bubble-color-secondary: $base-inverted-text-color !default;
159168
$chat-bubble-background-color-primary: $base-inverted-bg !default;
160169
$chat-bubble-background-color-secondary: $base-hover-color !default;
161170
$chat-information-color: $base-text-color !default;
@@ -173,6 +182,7 @@ $chat-typingindicator-circle-bg-color: null !default;
173182
@if $color == "darkmoon" {
174183
$chat-avatar-color: $base-text-color !default;
175184
$chat-bubble-color-primary: $base-text-color !default;
185+
$chat-bubble-color-secondary: $base-text-color !default;
176186
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
177187
$chat-bubble-background-color-secondary: lighten($base-element-bg, 4%) !default;
178188
$chat-information-color: lighten($base-bg, 32.55) !default;
@@ -190,6 +200,7 @@ $chat-typingindicator-circle-bg-color: null !default;
190200
@if $color == "darkviolet" {
191201
$chat-avatar-color: $base-text-color !default;
192202
$chat-bubble-color-primary: $base-text-color !default;
203+
$chat-bubble-color-secondary: $base-text-color !default;
193204
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
194205
$chat-bubble-background-color-secondary: lighten($base-element-bg, 4%) !default;
195206
$chat-information-color: lighten($base-bg, 32.55) !default;
@@ -206,6 +217,8 @@ $chat-typingindicator-circle-bg-color: null !default;
206217

207218
@if $color == "greenmist" {
208219
$chat-avatar-color: $base-text-color !default;
220+
$chat-bubble-color-primary: $base-text-color !default;
221+
$chat-bubble-color-secondary: $base-text-color !default;
209222
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
210223
$chat-bubble-background-color-secondary: darken($base-element-bg, 4%) !default;
211224
$chat-information-color: darken($base-bg, 41.57) !default;
@@ -223,6 +236,7 @@ $chat-typingindicator-circle-bg-color: null !default;
223236
@if $color == "softblue" {
224237
$chat-avatar-color: $base-text-color !default;
225238
$chat-bubble-color-primary: $base-text-color !default;
239+
$chat-bubble-color-secondary: $base-text-color !default;
226240
$chat-bubble-background-color-primary: color.change(darken($base-accent, 5%), $alpha: 0.1) !default;
227241
$chat-bubble-background-color-secondary: darken($base-element-bg, 4%) !default;
228242
$chat-information-color: darken($base-bg, 41.57) !default;

packages/devextreme-scss/scss/widgets/generic/chat/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
@include chat-messagebubble(
3838
$chat-bubble-padding,
3939
$chat-bubble-border-radius,
40+
$chat-bubble-color-secondary,
4041
$chat-bubble-background-color-secondary,
4142
$chat-bubble-color-primary,
4243
$chat-bubble-background-color-primary,

packages/devextreme-scss/scss/widgets/material/chat/_colors.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $chat-avatar-color: $base-text-color !default;
2929
$chat-avatar-background-color: $base-border-color !default;
3030

3131
/**
32-
* $name 40. Bubble text color
32+
* $name 40. Bubble text color (your messages)
3333
* $type color
3434
*/
3535
$chat-bubble-color-primary: $base-text-color !default;
@@ -41,7 +41,13 @@ $chat-bubble-color-primary: $base-text-color !default;
4141
$chat-bubble-background-color-primary: null !default;
4242

4343
/**
44-
* $name 42. Bubble background color (other messages)
44+
* $name 42. Bubble text color (other messages)
45+
* $type color
46+
*/
47+
$chat-bubble-color-secondary: $base-text-color !default;
48+
49+
/**
50+
* $name 43. Bubble background color (other messages)
4551
* $type color
4652
*/
4753
$chat-bubble-background-color-secondary: rgba($base-inverted-bg, 0.08) !default;

packages/devextreme-scss/scss/widgets/material/chat/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@include chat-messagebubble(
3737
$chat-bubble-padding,
3838
$chat-bubble-border-radius,
39+
$chat-bubble-color-secondary,
3940
$chat-bubble-background-color-secondary,
4041
$chat-bubble-color-primary,
4142
$chat-bubble-background-color-primary,

0 commit comments

Comments
 (0)