md-data-table icon indicating copy to clipboard operation
md-data-table copied to clipboard

Using $mdThemingProvider to register styles

Open vwillyams opened this issue 6 years ago • 9 comments

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 avatar Jul 25 '17 20:07 vwillyams

I noticed that this previously didn't resolve https://github.com/daniel-nagy/md-data-table/issues/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 avatar Jul 28 '17 20:07 vwillyams

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

vwillyams avatar Jul 28 '17 20:07 vwillyams

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

pkcat avatar Aug 09 '17 05:08 pkcat

@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

vwillyams avatar Aug 09 '17 15:08 vwillyams

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

pkcat avatar Aug 10 '17 02:08 pkcat

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

vwillyams avatar Aug 10 '17 16:08 vwillyams

@vwillyams thanks it works perfectly now

pkcat avatar Aug 11 '17 01:08 pkcat

Merge?

alexwohlbruck avatar Aug 29 '17 00:08 alexwohlbruck

Any chance on this to be merged?

valepu avatar Aug 11 '18 10:08 valepu