Skip to content

Commit c6f1bff

Browse files
- update textarea fill default to Outline;
- update textarea border-color; - update input colors; - update input border radius;
1 parent a59324a commit c6f1bff

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

core/src/components/input/input.ionic.outline.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
}
129129

130130
:host(.input-fill-outline.input-shape-round) {
131-
--border-radius: #{$ion-border-radius-full};
131+
--border-radius: #{$ion-border-radius-400};
132132
}
133133

134134
:host(.input-fill-outline.input-shape-rectangular) {

core/src/components/input/input.ionic.scss

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
// --------------------------------------------------
77

88
:host {
9-
--color: #{globals.$ion-primitives-neutral-1000};
9+
--color: #{globals.$ion-primitives-neutral-1200};
1010
--border-width: #{globals.$ion-border-size-025};
11-
--border-color: #{globals.$ion-primitives-neutral-300};
12-
--highlight-color-valid: #{globals.$ion-semantics-success-base};
13-
--highlight-color-invalid: #{globals.$ion-semantics-danger-base};
14-
--placeholder-color: #{globals.$ion-primitives-neutral-800};
11+
--border-color: #{globals.$ion-primitives-neutral-500};
12+
--highlight-color-valid: #{globals.$ion-semantics-success-900};
13+
--highlight-color-invalid: #{globals.$ion-semantics-danger-800};
14+
--placeholder-color: #{globals.$ion-primitives-neutral-1200};
1515
--placeholder-opacity: 1;
1616
--text-color-invalid: #{globals.$ion-semantics-danger-800};
1717
--background: #{globals.$ion-primitives-base-white};
@@ -88,7 +88,7 @@
8888
width: globals.$ion-scale-400;
8989
height: globals.$ion-scale-400;
9090

91-
color: globals.$ion-primitives-neutral-500;
91+
color: globals.$ion-primitives-neutral-1000;
9292
}
9393

9494
.input-clear-icon:focus-visible {
@@ -167,7 +167,7 @@
167167

168168
@media (any-hover: hover) {
169169
:host(:hover) {
170-
--border-color: #{globals.$ion-primitives-neutral-600};
170+
--border-color: #{globals.$ion-semantics-primary-base};
171171
}
172172
}
173173

@@ -176,8 +176,9 @@
176176

177177
:host(.input-disabled) {
178178
// color for the text within the input
179-
--color: #{globals.$ion-primitives-neutral-400};
179+
--color: #{globals.$ion-primitives-neutral-500};
180180
--background: #{globals.$ion-primitives-neutral-100};
181+
--border-color: #{globals.$ion-primitives-neutral-300};
181182

182183
pointer-events: none;
183184
}

core/src/components/textarea/textarea.ionic.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// --------------------------------------------------
77

88
:host {
9+
--border-color: #{globals.$ion-primitives-neutral-500};
910
--color: #{globals.$ion-primitives-neutral-1200};
1011
--highlight-color-valid: #{globals.$ion-semantics-success-base};
1112
--highlight-color-invalid: #{globals.$ion-semantics-danger-base};

core/src/components/textarea/textarea.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,18 @@ export class Textarea implements ComponentInterface {
547547
return this.label !== undefined || this.labelSlot !== null;
548548
}
549549

550+
private getFill(): string | undefined {
551+
const theme = getIonTheme(this);
552+
const { fill } = this;
553+
554+
if (theme === 'ionic' && fill === undefined) {
555+
return 'outline';
556+
}
557+
558+
return fill;
559+
}
560+
561+
550562
private getShape(): string | undefined {
551563
const theme = getIonTheme(this);
552564
const { shape } = this;
@@ -666,6 +678,7 @@ export class Textarea implements ComponentInterface {
666678

667679
render() {
668680
const { inputId, disabled, fill, size, labelPlacement, el, hasFocus } = this;
681+
const fill = this.getFill();
669682
const theme = getIonTheme(this);
670683
const shape = this.getShape();
671684
const value = this.getValue();

0 commit comments

Comments
 (0)