@ionic/core
Version:
Base components for Ionic
109 lines (100 loc) • 3.02 kB
CSS
:host {
/**
* @prop --background: Background of the textarea
* @prop --border-radius: Border radius of the textarea
* @prop --color: Color of the text
* @prop --placeholder-color: Color of the placeholder text
* @prop --placeholder-font-style: Style of the placeholder text
* @prop --placeholder-font-weight: Weight of the placeholder text
* @prop --placeholder-opacity: Opacity of the placeholder text
* @prop --padding-top: Top padding of the textarea
* @prop --padding-end: End padding of the textarea
* @prop --padding-bottom: Bottom padding of the textarea
* @prop --padding-start: Start padding of the textarea
*/
--background: initial;
--color: initial;
--placeholder-color: initial;
--placeholder-font-style: initial;
--placeholder-font-weight: initial;
--placeholder-opacity: .5;
--padding-top: 0;
--padding-end: 0;
--padding-bottom: 0;
--padding-start: 0;
--border-radius: 0;
display: block;
position: relative;
flex: 1;
width: 100%;
box-sizing: border-box;
background: var(--background);
color: var(--color);
font-family: var(--ion-font-family, inherit);
z-index: 2; }
:host(.ion-color) {
background: initial; }
:host(.ion-color) {
color: var(--ion-color-base); }
:host-context(ion-item) {
position: static; }
:host-context(ion-item:not(.item-label)) {
--padding-start: 0; }
.native-textarea {
font-family: inherit;
font-size: inherit;
font-style: inherit;
font-weight: inherit;
letter-spacing: inherit;
text-decoration: inherit;
text-overflow: inherit;
text-transform: inherit;
text-align: inherit;
white-space: inherit;
color: inherit;
border-radius: var(--border-radius);
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
padding-left: var(--padding-start);
padding-right: var(--padding-end);
padding-top: var(--padding-top);
padding-bottom: var(--padding-bottom);
display: block;
width: 100%;
height: 100%;
border: 0;
outline: none;
background: transparent;
box-sizing: border-box;
resize: none;
appearance: none;
white-space: pre-wrap; }
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
.native-textarea {
padding-left: unset;
padding-right: unset;
-webkit-padding-start: var(--padding-start);
padding-inline-start: var(--padding-start);
-webkit-padding-end: var(--padding-end);
padding-inline-end: var(--padding-end); } }
.native-textarea::placeholder {
color: var(--placeholder-color);
font-family: inherit;
font-style: var(--placeholder-font-style);
font-weight: var(--placeholder-font-weight);
opacity: var(--placeholder-opacity); }
.native-textarea[disabled] {
opacity: .4; }
:host {
--padding-top: 10px;
--padding-end: 8px;
--padding-bottom: 10px;
--padding-start: 0;
font-size: inherit; }
:host-context(.item-label-stacked),
:host-context(.item-label-floating) {
--padding-top: 8px;
--padding-bottom: 8px;
--padding-start: 0px; }