diff --git a/core/src/components/back-button/back-button.scss b/core/src/components/back-button/back-button.scss index 419bc162c6..8dcdce2334 100644 --- a/core/src/components/back-button/back-button.scss +++ b/core/src/components/back-button/back-button.scss @@ -19,7 +19,7 @@ position: relative; z-index: 0; - display: flex; + display: inline-flex; flex-flow: row nowrap; flex-shrink: 0; diff --git a/core/src/components/button/button.tsx b/core/src/components/button/button.tsx index 9f7f1c9f7d..25bcd9f912 100644 --- a/core/src/components/button/button.tsx +++ b/core/src/components/button/button.tsx @@ -154,7 +154,7 @@ export class Button { - + { this.mode === 'md' && } diff --git a/core/src/components/menu-button/menu-button.ios.scss b/core/src/components/menu-button/menu-button.ios.scss index e69de29bb2..1766f89205 100644 --- a/core/src/components/menu-button/menu-button.ios.scss +++ b/core/src/components/menu-button/menu-button.ios.scss @@ -0,0 +1,39 @@ +@import "./menu-button"; +@import "./menu-button.ios.vars"; + +// iOS Menu Button +// -------------------------------------------------- + +.menu-button-ios .menu-button-inner { + @include padding(0); + @include margin(2px, 0, 0, 0); + + z-index: $menu-button-ios-button-z-index; + overflow: visible; + + min-height: 32px; + + border: 0; + font-size: 17px; + line-height: 1; + + color: $menu-button-ios-color; + background-color: transparent; + + transform: translateZ(0); + + &.activated { + opacity: .4; + } +} + +.menu-button-ios ion-icon { + @include padding(0); + @include margin(0, -3px, 0, 0); + + display: inherit; + + font-size: 1.75em; + + pointer-events: none; +} diff --git a/core/src/components/menu-button/menu-button.ios.vars.scss b/core/src/components/menu-button/menu-button.ios.vars.scss new file mode 100644 index 0000000000..d157a36c13 --- /dev/null +++ b/core/src/components/menu-button/menu-button.ios.vars.scss @@ -0,0 +1,10 @@ +@import "../../themes/ionic.globals.ios"; + +// iOS Menu Button +// -------------------------------------------------- + +/// @prop - Z index of the Menu button +$menu-button-ios-button-z-index: $z-index-toolbar-buttons !default; + +/// @prop - Text color of the Menu button +$menu-button-ios-color: ion-color($colors-ios, primary, base, ios) !default; diff --git a/core/src/components/menu-button/menu-button.md.scss b/core/src/components/menu-button/menu-button.md.scss index e69de29bb2..7b04d2d504 100644 --- a/core/src/components/menu-button/menu-button.md.scss +++ b/core/src/components/menu-button/menu-button.md.scss @@ -0,0 +1,38 @@ +@import "./menu-button"; +@import "./menu-button.md.vars"; + +// MD Menu Button +// -------------------------------------------------- + +.menu-button-md .menu-button-inner { + @include margin(2px, 6px, 0, 0); + @include padding(0, 5px); + + min-width: 44px; + height: 32px; + border: 0; + font-size: 14px; + font-weight: 500; + text-transform: uppercase; + + color: $menu-button-md-color; + background-color: transparent; + + box-shadow: none; + + &.activated { + opacity: 0.4; + } +} + +.menu-button-md ion-icon { + @include padding-horizontal(null, 0.3em); + @include margin(0); + @include padding(0, 6px); + @include text-align(start); + + font-size: 24px; + font-weight: normal; + line-height: 0.67; + pointer-events: none; +} diff --git a/core/src/components/menu-button/menu-button.md.vars.scss b/core/src/components/menu-button/menu-button.md.vars.scss new file mode 100644 index 0000000000..0a9c34ae89 --- /dev/null +++ b/core/src/components/menu-button/menu-button.md.vars.scss @@ -0,0 +1,7 @@ +@import "../../themes/ionic.globals.md"; + +// Material Design Menu Button +// -------------------------------------------------- + +/// @prop - Text color of the Menu button +$menu-button-md-color: $toolbar-md-text-color !default; diff --git a/core/src/components/menu-button/menu-button.scss b/core/src/components/menu-button/menu-button.scss new file mode 100644 index 0000000000..c8f7c99931 --- /dev/null +++ b/core/src/components/menu-button/menu-button.scss @@ -0,0 +1,36 @@ +@import "../../themes/ionic.globals"; + +// Menu Button +// -------------------------------------------------- + +.menu-button button { + @include font-smoothing(); + @include text-align(center); + @include appearance(none); + + position: relative; + z-index: 0; + display: inline-flex; + flex-flow: row nowrap; + flex-shrink: 0; + align-items: center; + justify-content: center; + border: 0; + outline: none; + + line-height: 1; + + text-decoration: none; + text-overflow: ellipsis; + text-transform: none; + + white-space: nowrap; + cursor: pointer; + vertical-align: top; // the better option for most scenarios + vertical-align: -webkit-baseline-middle; // the best for those that support it + + transition: background-color, opacity 100ms linear; + + font-kerning: none; + user-select: none; +}