@ionic/core
Version:
Base components for Ionic
147 lines (134 loc) • 4.25 kB
CSS
:host {
/**
* @prop --background: Background of the input
* @prop --color: Color of the input text
* @prop --padding-top: Top padding of the input
* @prop --padding-end: End padding of the input
* @prop --padding-bottom: Bottom padding of the input
* @prop --padding-start: Start padding of the input
* @prop --placeholder-color: Color of the input placeholder text
* @prop --placeholder-font-style: Font style of the input placeholder text
* @prop --placeholder-font-weight: Font weight of the input placeholder text
* @prop --placeholder-opacity: Opacity of the input placeholder text
*/
--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;
--background: transparent;
--color: initial;
display: flex;
position: relative;
flex: 1;
align-items: center;
width: 100%;
/* stylelint-disable-next-line all */
padding: 0 ;
background: var(--background);
color: var(--color);
font-family: var(--ion-font-family, inherit);
z-index: 2; }
:host-context(ion-item:not(.item-label)) {
--padding-start: 0; }
:host(.ion-color) {
color: var(--ion-color-base); }
.native-input {
border-radius: var(--border-radius);
padding-left: var(--padding-start);
padding-right: var(--padding-end);
padding-top: var(--padding-top);
padding-bottom: var(--padding-bottom);
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;
display: inline-block;
flex: 1;
width: 100%;
max-width: 100%;
height: 100%;
border: 0;
outline: none;
background: transparent;
box-sizing: border-box;
appearance: none; }
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
.native-input {
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-input::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-input:-webkit-autofill {
background-color: transparent; }
.native-input:invalid {
box-shadow: none; }
.native-input::-ms-clear {
display: none; }
.native-input[disabled] {
opacity: .4; }
.cloned-input {
left: 0;
top: 0;
position: absolute;
pointer-events: none; }
:host-context([dir=rtl]) .cloned-input {
right: 0; }
.input-clear-icon {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
padding-bottom: 0;
background-position: center;
border: 0;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
visibility: hidden;
appearance: none; }
:host(.has-focus.has-value) .input-clear-icon {
visibility: visible; }
:host(.has-focus) {
pointer-events: none; }
:host(.has-focus) input,
:host(.has-focus) a,
:host(.has-focus) button {
pointer-events: auto; }
: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; }
.input-clear-icon {
background-image: url("data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><path%20fill='var(--ion-color-step-600,%20%23666666)'%20d='M403.1,108.9c-81.2-81.2-212.9-81.2-294.2,0s-81.2,212.9,0,294.2c81.2,81.2,212.9,81.2,294.2,0S484.3,190.1,403.1,108.9z%20M352,340.2L340.2,352l-84.4-84.2l-84,83.8L160,339.8l84-83.8l-84-83.8l11.8-11.8l84,83.8l84.4-84.2l11.8,11.8L267.6,256L352,340.2z'/></svg>");
width: 30px;
height: 30px;
background-size: 18px; }