/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/components/badge/badge.scss
54 строки
1 KB
Brandy Carney
docs(components): document what start and end mean for CSS variables (#18538)
21 июн 2019, 22:11
Не верифицирован
21 июн 2019, 22:11
73599c2
Код
Авторство
О чём код?
@import "./badge.vars"; // Badge // -------------------------------------------------- :host { /** * @prop --background: Background of the badge * @prop --color: Text color of the badge * * @prop --padding-top: Top padding of the badge * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the badge * @prop --padding-bottom: Bottom padding of the badge * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge */ --background: #{ion-color(primary, base)}; --color: #{ion-color(primary, contrast)}; --padding-top: #{$badge-padding-top}; --padding-end: #{$badge-padding-end}; --padding-bottom: #{$badge-padding-bottom}; --padding-start: #{$badge-padding-start}; @include font-smoothing(); @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); display: inline-block; min-width: $badge-min-width; background: var(--background); color: var(--color); font-family: $font-family-base; font-size: $badge-font-size; font-weight: $badge-font-weight; line-height: 1; text-align: center; white-space: nowrap; contain: content; vertical-align: baseline; } :host(.ion-color) { background: #{current-color(base)}; color: #{current-color(contrast)}; } :host(:empty) { display: none; }