bharath muppa
bharath muppa

Reputation: 1079

angular material2 advance usage

I have been googling and trying to find Is there a way/document in angular material 2 ways to set

  1. Background color of div
  2. color of div
  3. padding, margin
  4. different layouts planned (even in Q4 I didn't see any)

and advance stuff ?

Upvotes: 0

Views: 83

Answers (1)

Will Howell
Will Howell

Reputation: 3715

Angular Material isn't a CSS framework like Materialize, Semantic UI, Bulma, etc. It is a collection of Angular components that are very prescriptive about how they look in order to match the Material Design spec. Because of this, it is also not well suited for "skins" like some other Angular frameworks.

At the moment, theming is limited to setting the primary, accent, and warning colors. You can read more about that on the docs website. If you're interested in really overriding a lot of default styles, you should take a look at the document I mentioned in the comments, as it describes how to make sure your overrides will succeed.

Finally, if you're interested in understanding which classes and styles are applied to different components, you can look at the source or poke through the DOM with the inspector while debugging. Note that each component has two (maybe more) stylesheets. One is for positioning, and the other is for colors and typography. The latter will all be compiled into a "theme file" while the former will compile individually and load whenever the component loads at run-time.

Upvotes: 1

Related Questions