@ionic/core
Version:
Base components for Ionic
119 lines (100 loc) • 2.5 kB
CSS
:host-context(.item) {
/**
* @prop --color: Color of the label
*/
--color: initial;
display: block;
color: var(--color);
font-family: var(--ion-font-family, inherit);
font-size: inherit;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box; }
:host(.ion-color) {
color: var(--ion-color-base); }
:host([text-wrap]) {
white-space: normal; }
:host-context(.item-interactive-disabled) {
cursor: default;
opacity: .3;
pointer-events: none; }
:host-context(.item-input) {
flex: initial;
max-width: 200px;
pointer-events: none; }
:host(.label-fixed) {
flex: 0 0 100px;
width: 100px;
min-width: 100px;
max-width: 200px; }
:host(.label-stacked),
:host(.label-floating) {
margin-bottom: 0;
align-self: stretch;
width: auto;
max-width: 100%; }
:host-context(.item-has-focus).label-floating,
:host-context(.item-has-placeholder).label-floating,
:host-context(.item-has-value).label-floating {
transform: translate3d(0, 0, 0) scale(0.8); }
:host(.label-no-animate.label-floating) {
transition: none; }
:host([text-wrap]) {
line-height: 1.5; }
:host(.label-stacked) {
font-size: 12.8px; }
:host(.label-floating) {
transform: translate3d(0, 27px, 0);
transform-origin: left top;
transition: transform 150ms ease-in-out; }
:host([dir=rtl].label-floating) {
transform-origin: right top; }
:host(.label-stacked),
:host(.label-floating) {
margin-left: 0;
margin-bottom: 0; }
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
:host(.label-stacked),
:host(.label-floating) {
margin-left: unset;
-webkit-margin-start: 0;
margin-inline-start: 0; } }
::slotted(*) h1 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 2px;
font-size: 24px;
font-weight: normal; }
::slotted(*) h2 {
margin-left: 0;
margin-right: 0;
margin-top: 2px;
margin-bottom: 2px;
font-size: 16px;
font-weight: normal; }
::slotted(*) h3,
::slotted(*) h4,
::slotted(*) h5,
::slotted(*) h6 {
margin-left: 0;
margin-right: 0;
margin-top: 2px;
margin-bottom: 2px;
font-size: 14px;
font-weight: normal;
line-height: normal; }
::slotted(*) p {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 2px;
font-size: 14px;
line-height: 20px;
text-overflow: inherit;
overflow: inherit; }
::slotted(p) {
color: var(--ion-color-step-600, #666666); }
:host-context(.ion-color)::slotted(p) {
color: inherit; }