diff --git a/angular/BREAKING.md b/angular/BREAKING.md index b1e3609b81..bfa4f3f91a 100644 --- a/angular/BREAKING.md +++ b/angular/BREAKING.md @@ -954,7 +954,7 @@ presentPopover(ev: any) { async presentPopover(ev: any) { const popover = await this.popoverController.create({ component: PopoverComponent, - ev: event, + event: event, translucent: true }); return await popover.present(); diff --git a/core/src/components/back-button/back-button.scss b/core/src/components/back-button/back-button.scss index 0385f47aab..508ef870a2 100644 --- a/core/src/components/back-button/back-button.scss +++ b/core/src/components/back-button/back-button.scss @@ -8,6 +8,14 @@ color: #{current-color(base)}; pointer-events: all; + + text-align: center; + text-decoration: none; + text-overflow: ellipsis; + text-transform: none; + + white-space: nowrap; + font-kerning: none; } :host-context(.can-go-back > ion-header), @@ -16,6 +24,7 @@ } .back-button-native { + @include text-inherit(); @include font-smoothing(); display: block; @@ -27,21 +36,11 @@ outline: none; - color: inherit; - line-height: 1; - text-align: center; - text-decoration: none; - text-overflow: ellipsis; - text-transform: none; - - white-space: nowrap; - cursor: pointer; user-select: none; z-index: 0; - font-kerning: none; appearance: none; } diff --git a/core/src/components/button/button.scss b/core/src/components/button/button.scss index 7db3b85ff1..17fa564901 100644 --- a/core/src/components/button/button.scss +++ b/core/src/components/button/button.scss @@ -21,6 +21,8 @@ user-select: none; vertical-align: top; // the better option for most scenarios vertical-align: -webkit-baseline-middle; // the best for those that support it + + font-kerning: none; } :host([disabled]) { @@ -123,7 +125,6 @@ transition: var(--transition); - border-width: var(--border-width); border-style: var(--border-style); border-color: var(--border-color); @@ -139,11 +140,9 @@ cursor: pointer; opacity: var(--opacity); overflow: var(--overflow); - vertical-align: top; // the better option for most scenarios - vertical-align: -webkit-baseline-middle; // the best for those that support it + z-index: 0; box-sizing: border-box; - font-kerning: none; appearance: none; } diff --git a/core/src/components/fab-button/fab-button.scss b/core/src/components/fab-button/fab-button.scss index 9b2adb8eac..e15b14ea02 100755 --- a/core/src/components/fab-button/fab-button.scss +++ b/core/src/components/fab-button/fab-button.scss @@ -18,6 +18,13 @@ color: #{current-color(contrast)}; font-size: 14px; + + text-align: center; + text-overflow: ellipsis; + text-transform: none; + + white-space: nowrap; + font-kerning: none; } @@ -26,6 +33,7 @@ } .fab-button-native { + @include text-inherit(); @include border-radius(50%); @include margin(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); @@ -45,25 +53,14 @@ background: var(--background); background-clip: padding-box; - color: inherit; - - font-size: inherit; - font-weight: inherit; line-height: var(--size); - text-align: center; - text-overflow: ellipsis; - text-transform: none; - - white-space: nowrap; - box-shadow: var(--box-shadow); contain: strict; cursor: pointer; overflow: hidden; z-index: 0; - font-kerning: none; appearance: none; } @@ -86,8 +83,6 @@ flex-flow: row nowrap; flex-shrink: 0; align-items: center; - align-items: center; - justify-content: center; justify-content: center; height: 100%; diff --git a/core/src/components/menu-button/menu-button.scss b/core/src/components/menu-button/menu-button.scss index 4ce6b215f0..73def78f17 100644 --- a/core/src/components/menu-button/menu-button.scss +++ b/core/src/components/menu-button/menu-button.scss @@ -7,9 +7,18 @@ pointer-events: all; color: #{current-color(base)}; + + text-align: center; + text-decoration: none; + text-overflow: ellipsis; + text-transform: none; + + white-space: nowrap; + font-kerning: none; } button { + @include text-inherit(); @include margin(0); @include padding(0); @include font-smoothing(); @@ -30,21 +39,12 @@ button { outline: none; background: transparent; - color: inherit; line-height: 1; - text-align: center; - text-decoration: none; - text-overflow: ellipsis; - text-transform: none; - - white-space: nowrap; - cursor: pointer; user-select: none; z-index: 0; - font-kerning: none; appearance: none; } diff --git a/core/src/components/segment-button/segment-button.scss b/core/src/components/segment-button/segment-button.scss index 9f8a3f2126..ae603c7f63 100644 --- a/core/src/components/segment-button/segment-button.scss +++ b/core/src/components/segment-button/segment-button.scss @@ -11,6 +11,12 @@ --icon-size: 1em; flex: 1; + + text-decoration: none; + text-overflow: ellipsis; + + white-space: nowrap; + font-kerning: none; } :host(:first-of-type) .segment-button-native { @@ -30,6 +36,7 @@ } .segment-button-native { + @include text-inherit(); @include margin(var(--margin-top), var(--margin-end), var(--margin-bottom), var(--margin-start)); @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); @@ -46,22 +53,10 @@ border-color: var(--border-color); background: var(--background); - color: inherit; - - font-size: inherit; - font-weight: inherit; - - text-align: center; - text-decoration: none; - text-overflow: ellipsis; - text-transform: inherit; - - white-space: nowrap; contain: content; cursor: pointer; overflow: hidden; - font-kerning: none; &:active, &:focus { diff --git a/core/src/components/textarea/textarea.scss b/core/src/components/textarea/textarea.scss index baaf5535d5..a333ac9e31 100644 --- a/core/src/components/textarea/textarea.scss +++ b/core/src/components/textarea/textarea.scss @@ -36,13 +36,14 @@ box-sizing: border-box; background: var(--background); + color: var(--color); } :host(.ion-color) { background: initial; } -:host(.ion-color) .native-textarea { +:host(.ion-color) { color: current-color(base); } @@ -73,7 +74,6 @@ outline: none; background: transparent; - color: var(--color); box-sizing: border-box; resize: none; diff --git a/core/src/components/toast/toast.ios.scss b/core/src/components/toast/toast.ios.scss index a78add9ef0..66b1115da6 100644 --- a/core/src/components/toast/toast.ios.scss +++ b/core/src/components/toast/toast.ios.scss @@ -10,6 +10,7 @@ --color: #{$toast-ios-title-color}; font-family: $toast-ios-font-family; + font-size: $toast-ios-title-font-size; } .toast-ios .toast-wrapper { @@ -48,10 +49,6 @@ .toast-ios .toast-message { @include padding($toast-ios-title-padding-top, $toast-ios-title-padding-end, $toast-ios-title-padding-bottom, $toast-ios-title-padding-start); - - color: var(--color); - - font-size: $toast-ios-title-font-size; } .toast-ios .toast-button { diff --git a/core/src/components/toast/toast.md.scss b/core/src/components/toast/toast.md.scss index 563d176f48..07216ed512 100644 --- a/core/src/components/toast/toast.md.scss +++ b/core/src/components/toast/toast.md.scss @@ -6,9 +6,10 @@ .toast-md { --background: #{$toast-md-background}; - --color: #{toast-md-title-color}; + --color: #{$toast-md-title-color}; font-family: $toast-md-font-family; + font-size: $toast-md-title-font-size; } .toast-md .toast-wrapper { @@ -42,8 +43,4 @@ .toast-md .toast-message { @include padding($toast-md-title-padding-top, $toast-md-title-padding-end, $toast-md-title-padding-bottom, $toast-md-title-padding-start); - - color: var(--color); - - font-size: $toast-md-title-font-size; } diff --git a/core/src/components/toast/toast.scss b/core/src/components/toast/toast.scss index 7dc5f05db0..bb4dc7e1f2 100644 --- a/core/src/components/toast/toast.scss +++ b/core/src/components/toast/toast.scss @@ -18,6 +18,8 @@ ion-toast { width: $toast-width; height: $toast-width; + color: var(--color); + contain: strict; z-index: $z-index-overlay; pointer-events: none; diff --git a/core/src/themes/ionic.mixins.scss b/core/src/themes/ionic.mixins.scss index 7564570396..6277aa039e 100644 --- a/core/src/themes/ionic.mixins.scss +++ b/core/src/themes/ionic.mixins.scss @@ -361,22 +361,6 @@ } } -// Sets correct text align with support for old browsers -// @param {string} $direction - text direction -// @param {string} $decorator - !important -// ---------------------------------------------------------- -@mixin text-align($direction, $decorator: null) { - @if $direction == start { - text-align: left; - text-align: start $decorator; - } @else if $direction == end { - text-align: right; - text-align: end $decorator; - } @else { - text-align: $direction $decorator; - } -} - // Add direction for all directions // @param {string} $dir - Direction on LTR @mixin direction($dir) {