Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Using $mdThemingProvider to register styles#607

Open
vwillyams wants to merge 16 commits into
daniel-nagy:masterfrom
vwillyams:mdThemingProvider
Open

Using $mdThemingProvider to register styles#607
vwillyams wants to merge 16 commits into
daniel-nagy:masterfrom
vwillyams:mdThemingProvider

Conversation

@vwillyams

Copy link
Copy Markdown

Removes hardcoded styling and allows users to define their own angular-material styling using $mdThemingProvider like they do for the rest of angular-material components.

(Note that I also dropped some coloring from md-toolbar because it was jarring and inconsistent with the rest of angular-material styling, otherwise all styles should be virtually identical using the angular-material default theme)

@vwillyams

Copy link
Copy Markdown
Author

I noticed that this previously didn't resolve #422 so I went back and resolved all the issues there, along with a few bonus fixes and a new button added to the template for testing

@vwillyams

Copy link
Copy Markdown
Author

FYI: example functionality in https://codepen.io/vwillyams/pen/KvdYjZ (using very ugly theme as the alternate, to show off how it works)

@pkcat

pkcat commented Aug 9, 2017

Copy link
Copy Markdown

Works in pages but font color not changing in a md-dialog after switching to dark theme

@vwillyams

Copy link
Copy Markdown
Author

@pkcat please provide a replication, I was unable to replicate this - see https://codepen.io/vwillyams/pen/Nvjyrz for a quickly hacked together example of this working

@pkcat

pkcat commented Aug 10, 2017

Copy link
Copy Markdown

@vwillyams seems the cause is that I'm using angular material version 1.1.4, I have theme saved in $rootScope (eg. $rootScope.theme = 'alternate') and put md-theme="{{$root.theme}}" inside md-dialog tag then the theme is applied to all components in the dialog except font color..

@vwillyams

Copy link
Copy Markdown
Author

@pkcat this scenario is now fixed (was bypassing the normal theme inheritance)

@pkcat

pkcat commented Aug 11, 2017

Copy link
Copy Markdown

@vwillyams thanks it works perfectly now

@alexwohlbruck

Copy link
Copy Markdown

Merge?

@valepu

valepu commented Aug 11, 2018

Copy link
Copy Markdown

Any chance on this to be merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants