@ionic/core
Version:
Base components for Ionic
407 lines (380 loc) • 11.7 kB
CSS
/**
* Convert a font size to a dynamic font size.
* Fonts that participate in Dynamic Type should use
* dynamic font sizes.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param unit (optional) - The unit to convert to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* a maximum font size.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* a minimum font size.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* maximum and minimum font sizes.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* A heuristic that applies CSS to tablet
* viewports.
*
* Usage:
* @include tablet-viewport() {
* :host {
* background-color: green;
* }
* }
*/
/**
* A heuristic that applies CSS to mobile
* viewports (i.e. phones, not tablets).
*
* Usage:
* @include mobile-viewport() {
* :host {
* background-color: blue;
* }
* }
*/
:host {
/**
* @prop --background: Background of the item divider
*
* @prop --color: Color of the item divider
*
* @prop --padding-top: Top padding of the item divider
* @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the item divider
* @prop --padding-bottom: Bottom padding of the item divider
* @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the item divider
*
* @prop --inner-padding-top: Top inner padding of the item divider
* @prop --inner-padding-end: End inner padding of the item divider
* @prop --inner-padding-bottom: Bottom inner padding of the item divider
* @prop --inner-padding-start: Start inner padding of the item divider
*/
--padding-top: 0px;
--padding-end: 0px;
--padding-bottom: 0px;
--padding-start: 0px;
--inner-padding-top: 0px;
--inner-padding-end: 0px;
--inner-padding-bottom: 0px;
--inner-padding-start: 0px;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
padding-top: var(--padding-top);
padding-bottom: var(--padding-bottom);
/* stylelint-disable */
padding-right: var(--padding-end);
padding-left: calc(var(--padding-start) + var(--ion-safe-area-left, 0px));
/* stylelint-enable */
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
background: var(--background);
color: var(--color);
font-family: var(--ion-font-family, inherit);
overflow: hidden;
z-index: 100;
box-sizing: border-box;
}
:host-context([dir=rtl]) {
padding-right: calc(var(--padding-start) + var(--ion-safe-area-right, 0px));
padding-left: var(--padding-end);
}
@supports selector(:dir(rtl)) {
:host(:dir(rtl)) {
padding-right: calc(var(--padding-start) + var(--ion-safe-area-right, 0px));
padding-left: var(--padding-end);
}
}
:host(.ion-color) {
background: var(--ion-color-base);
color: var(--ion-color-contrast);
}
:host(.item-divider-sticky) {
position: sticky;
top: 0;
}
.item-divider-inner {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
padding-top: var(--inner-padding-top);
padding-bottom: var(--inner-padding-bottom);
/* stylelint-disable */
padding-right: calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));
padding-left: var(--inner-padding-start);
/* stylelint-enable */
display: flex;
flex: 1;
flex-direction: inherit;
align-items: inherit;
align-self: stretch;
min-height: inherit;
border: 0;
overflow: hidden;
}
:host-context([dir=rtl]) .item-divider-inner {
padding-right: var(--inner-padding-start);
padding-left: calc(var(--ion-safe-area-left, 0px) + var(--inner-padding-end));
}
[dir=rtl] .item-divider-inner {
padding-right: var(--inner-padding-start);
padding-left: calc(var(--ion-safe-area-left, 0px) + var(--inner-padding-end));
}
@supports selector(:dir(rtl)) {
.item-divider-inner:dir(rtl) {
padding-right: var(--inner-padding-start);
padding-left: calc(var(--ion-safe-area-left, 0px) + var(--inner-padding-end));
}
}
.item-divider-wrapper {
display: flex;
flex: 1;
flex-direction: inherit;
align-items: inherit;
align-self: stretch;
text-overflow: ellipsis;
overflow: hidden;
}
/**
* Convert a font size to a dynamic font size.
* Fonts that participate in Dynamic Type should use
* dynamic font sizes.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param unit (optional) - The unit to convert to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* a maximum font size.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* a minimum font size.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* maximum and minimum font sizes.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* A heuristic that applies CSS to tablet
* viewports.
*
* Usage:
* @include tablet-viewport() {
* :host {
* background-color: green;
* }
* }
*/
/**
* A heuristic that applies CSS to mobile
* viewports (i.e. phones, not tablets).
*
* Usage:
* @include mobile-viewport() {
* :host {
* background-color: blue;
* }
* }
*/
/**
* Convert a font size to a dynamic font size.
* Fonts that participate in Dynamic Type should use
* dynamic font sizes.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param unit (optional) - The unit to convert to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* a maximum font size.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* a minimum font size.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* Convert a font size to a dynamic font size but impose
* maximum and minimum font sizes.
* @param size - The initial font size including the unit (i.e. px or pt)
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
* convert to a unit other than $baselineUnit.
*/
/**
* A heuristic that applies CSS to tablet
* viewports.
*
* Usage:
* @include tablet-viewport() {
* :host {
* background-color: green;
* }
* }
*/
/**
* A heuristic that applies CSS to mobile
* viewports (i.e. phones, not tablets).
*
* Usage:
* @include mobile-viewport() {
* :host {
* background-color: blue;
* }
* }
*/
:host {
--background: var(--ion-background-color, #fff);
--color: var(--ion-color-step-400, var(--ion-text-color-step-600, #999999));
--padding-start: 16px;
--inner-padding-end: 16px;
min-height: 30px;
border-bottom: 1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));
font-size: 0.875rem;
}
::slotted([slot=start]) {
-webkit-margin-end: 16px;
margin-inline-end: 16px;
}
::slotted([slot=end]) {
-webkit-margin-start: 16px;
margin-inline-start: 16px;
}
::slotted(ion-label) {
margin-left: 0;
margin-right: 0;
margin-top: 13px;
margin-bottom: 10px;
}
::slotted(ion-icon) {
color: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54);
font-size: 1.7142857143em;
}
:host(.ion-color) ::slotted(ion-icon) {
color: var(--ion-color-contrast);
}
::slotted(ion-icon[slot]) {
margin-top: 12px;
margin-bottom: 12px;
}
::slotted(ion-icon[slot=start]) {
-webkit-margin-end: 32px;
margin-inline-end: 32px;
}
::slotted(ion-icon[slot=end]) {
-webkit-margin-start: 16px;
margin-inline-start: 16px;
}
::slotted(ion-note) {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
align-self: flex-start;
font-size: 0.6875rem;
}
::slotted(ion-note[slot]) {
padding-left: 0;
padding-right: 0;
padding-top: 18px;
padding-bottom: 10px;
}
::slotted(ion-avatar) {
width: 40px;
height: 40px;
}
::slotted(ion-thumbnail) {
--size: 56px;
}
::slotted(ion-avatar),
::slotted(ion-thumbnail) {
margin-top: 8px;
margin-bottom: 8px;
}
::slotted(ion-avatar[slot=start]),
::slotted(ion-thumbnail[slot=start]) {
-webkit-margin-end: 16px;
margin-inline-end: 16px;
}
::slotted(ion-avatar[slot=end]),
::slotted(ion-thumbnail[slot=end]) {
-webkit-margin-start: 16px;
margin-inline-start: 16px;
}
::slotted(h1) {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 2px;
}
::slotted(h2) {
margin-left: 0;
margin-right: 0;
margin-top: 2px;
margin-bottom: 2px;
}
::slotted(h3, h4, h5, h6) {
margin-left: 0;
margin-right: 0;
margin-top: 2px;
margin-bottom: 2px;
}
::slotted(p) {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 2px;
color: var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));
font-size: 0.875rem;
line-height: normal;
text-overflow: inherit;
overflow: inherit;
}