mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(inputs): better customization for placeholder color
This commit is contained in:
@ -9,7 +9,6 @@
|
||||
--padding-end: #{$textarea-ios-padding-end};
|
||||
--padding-bottom: #{$textarea-ios-padding-bottom};
|
||||
--padding-start: #{$textarea-ios-padding-start};
|
||||
--placeholder-color: #{$textarea-ios-placeholder-color};
|
||||
|
||||
font-family: $textarea-ios-font-family;
|
||||
font-size: $textarea-ios-font-size;
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
--padding-end: #{$textarea-md-padding-end};
|
||||
--padding-bottom: #{$textarea-md-padding-bottom};
|
||||
--padding-start: #{$textarea-md-padding-start};
|
||||
--placeholder-color: #{$textarea-md-placeholder-color};
|
||||
|
||||
font-family: $textarea-md-font-family;
|
||||
font-size: $textarea-md-font-size;
|
||||
|
||||
@ -4,6 +4,9 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
--placeholder-color: currentColor;
|
||||
--placeholder-weight: inherit;
|
||||
--placeholder-opacity: .5;
|
||||
--padding-top: 0;
|
||||
--padding-end: 0;
|
||||
--padding-bottom: 0;
|
||||
@ -37,7 +40,6 @@
|
||||
.native-textarea {
|
||||
@include text-inherit();
|
||||
@include border-radius(var(--border-radius));
|
||||
@include placeholder(var(--placeholder-color));
|
||||
@include margin(0);
|
||||
@include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));
|
||||
|
||||
@ -55,6 +57,15 @@
|
||||
box-sizing: border-box;
|
||||
resize: none;
|
||||
appearance: none;
|
||||
|
||||
&::placeholder {
|
||||
color: var(--placeholder-color);
|
||||
|
||||
font-family: inherit;
|
||||
font-weight: var(--placeholder-weight);
|
||||
|
||||
opacity: var(--placeholder-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
.native-textarea[disabled] {
|
||||
|
||||
Reference in New Issue
Block a user