UNPKG

@ionic/core

Version:
279 lines (266 loc) • 8.48 kB
/** * 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; * } * } */ /** * 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 { display: flex; align-items: center; transform: translateZ(0); z-index: 99; } ::slotted(*) ion-button { --padding-top: 0; --padding-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; } ::slotted(*) ion-button { --padding-top: 3px; --padding-bottom: 3px; --padding-start: 5px; --padding-end: 5px; -webkit-margin-start: 2px; margin-inline-start: 2px; -webkit-margin-end: 2px; margin-inline-end: 2px; min-height: 32px; } ::slotted(*) .button-has-icon-only { --padding-top: 0; --padding-bottom: 0; } ::slotted(*) ion-button:not(.button-round) { --border-radius: 4px; } :host-context(.ion-color)::slotted(*) .button { --color: initial; --border-color: initial; --background-focused: var(--ion-color-contrast); } :host-context(.ion-color)::slotted(*) .button-solid { --background: var(--ion-color-contrast); --background-focused: #000; --background-focused-opacity: .12; --background-activated: #000; --background-activated-opacity: .12; --background-hover: var(--ion-color-base); --background-hover-opacity: 0.45; --color: var(--ion-color-base); --color-focused: var(--ion-color-base); } :host-context(.ion-color)::slotted(*) .button-clear { --color-activated: var(--ion-color-contrast); --color-focused: var(--ion-color-contrast); } :host-context(.ion-color)::slotted(*) .button-outline { --color-activated: var(--ion-color-base); --color-focused: var(--ion-color-contrast); --background-activated: var(--ion-color-contrast); } ::slotted(*) .button-clear, ::slotted(*) .button-outline { --background-activated: transparent; --background-focused: currentColor; --background-hover: transparent; } ::slotted(*) .button-solid:not(.ion-color) { --background-focused: #000; --background-focused-opacity: .12; --background-activated: #000; --background-activated-opacity: .12; } ::slotted(*) ion-icon[slot=start] { margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; -webkit-margin-end: 0.3em; margin-inline-end: 0.3em; font-size: 1.41em; line-height: 0.67; } ::slotted(*) ion-icon[slot=end] { margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; -webkit-margin-start: 0.4em; margin-inline-start: 0.4em; font-size: 1.41em; line-height: 0.67; } ::slotted(*) ion-icon[slot=icon-only] { padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; font-size: 1.65em; line-height: 0.67; }