material icon indicating copy to clipboard operation
material copied to clipboard

Unable to override $toolbar-order-md (Changing the order of buttons in toolbar)

Open terrence0488 opened this issue 9 years ago • 0 comments

In my app, I would like to have the buttons in toolbar to have same sequence in iOS and Android. I found out that the style variable that dictate the sequence in android is $toolbar-order-md

So, I go ahead and override this variable in my /src/theme/variable.scss i add the following code into my variable.scss:

// App Material Design Variables // -------------------------------------------------- // Material Design only Sass variables can go here $toolbar-order-md: ( back-button: 0, menu-toggle-start: 1, buttons-left: 2, buttons-start: 3, content: 4, buttons-end: 5, buttons-right: 6, menu-toggle-end: 7, );

Note that I have change the sequence of button-start and content. But the result when run in android is still the same as if nothing changed.

My Ionic info:

Your system information:

Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 Ionic App Scripts Version: 1.0.0 ios-deploy version: 1.9.1 ios-sim version: 5.0.13 OS: macOS Sierra Node Version: v6.9.1 Xcode version: Xcode 8.2.1 Build version 8C1002

Is this a bug or am I doing it wrong?

----UPDATE---- So, shortly after i posted this question. I found out that you can only override the sass variable that can be found here https://ionicframework.com/docs/v2/theming/overriding-ionic-variables/.

However, I think the question shall remain. I hope that someone will show how can a developer override some of this platform specific default styles.

terrence0488 avatar Feb 04 '17 01:02 terrence0488