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

Using $mdThemingProvider to register styles #607

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

vwillyams
Copy link

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
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
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
Copy link

pkcat commented Aug 9, 2017

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

@vwillyams
Copy link
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
Copy link

pkcat commented Aug 10, 2017

@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
Author

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

@pkcat
Copy link

pkcat commented Aug 11, 2017

@vwillyams thanks it works perfectly now

@alexwohlbruck
Copy link

Merge?

@valepu
Copy link

valepu commented Aug 11, 2018

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