Skip to content

Commit cc65ac2

Browse files
committed
fix(text-area): polyfill warn state styles
Fixes #1136
1 parent b54876b commit cc65ac2

File tree

13 files changed

+58
-6
lines changed

13 files changed

+58
-6
lines changed

css/_text-area-warn.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// This file backports textarea warning styles from carbon-components v11+
2+
// to ensure compatibility with carbon-components v10.58.12.
3+
// The warning state feature provides consistency with other input components.
4+
5+
//
6+
// Copyright IBM Corp. 2016, 2023
7+
//
8+
// This source code is licensed under the Apache-2.0 license found in the
9+
// LICENSE file in the root directory of this source tree.
10+
//
11+
12+
@import 'carbon-components/scss/globals/scss/vars';
13+
@import 'carbon-components/scss/globals/scss/helper-mixins';
14+
@import 'carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
15+
16+
/// Textarea warning styles
17+
/// @access private
18+
/// @group text-area
19+
@mixin text-area-warn {
20+
//----------------------------------------------
21+
// Warning state
22+
// ---------------------------------------------
23+
.#{$prefix}--text-area--warning {
24+
padding-right: $carbon--spacing-08;
25+
}
26+
27+
.#{$prefix}--text-area__invalid-icon.#{$prefix}--text-area__invalid-icon--warning {
28+
fill: $support-warning;
29+
}
30+
31+
.#{$prefix}--text-area__invalid-icon.#{$prefix}--text-area__invalid-icon--warning path[fill] {
32+
fill: $inverse-01;
33+
opacity: 1;
34+
}
35+
36+
.#{$prefix}--text-area__wrapper[data-warn]~.#{$prefix}--form-requirement {
37+
display: block;
38+
overflow: visible;
39+
max-height: rem(200px);
40+
font-weight: 400;
41+
}
42+
}
43+
44+
@include exports('text-area-warn') {
45+
@include text-area-warn;
46+
}

css/all.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/all.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ $css--plex: true;
2424
@import "carbon-components/src/components/notification/toast-notification";
2525
@import "./popover";
2626
@import "./checkbox-readonly";
27+
@import "./text-area-warn";
2728

2829
// The default theme is "white" (White)
2930
:root {

css/g10.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g10.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $css--plex: true;
2323
@import "carbon-components/src/components/notification/toast-notification";
2424
@import "./popover";
2525
@import "./checkbox-readonly";
26+
@import "./text-area-warn";
2627

2728
@import "carbon-components/scss/globals/scss/_css--reset";
2829
@import "carbon-components/scss/globals/scss/_css--font-face";

css/g100.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g100.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $css--plex: true;
2323
@import "carbon-components/src/components/notification/toast-notification";
2424
@import "./popover";
2525
@import "./checkbox-readonly";
26+
@import "./text-area-warn";
2627

2728
@import "carbon-components/scss/globals/scss/_css--reset";
2829
@import "carbon-components/scss/globals/scss/_css--font-face";

css/g80.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g80.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $css--plex: true;
2323
@import "carbon-components/src/components/notification/toast-notification";
2424
@import "./popover";
2525
@import "./checkbox-readonly";
26+
@import "./text-area-warn";
2627

2728
@import "carbon-components/scss/globals/scss/_css--reset";
2829
@import "carbon-components/scss/globals/scss/_css--font-face";

css/g90.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)