0

I made an input:

  <div class="button-row">
              <button md-icon-button><i class="material-icons">mode_edit</i></button>
              <button md-icon-button><i class="material-icons">delete_forever</i></button>
            </div>

Now it looks as plain button, without styles. How to style this? I tried to add styles:

// Import Angular Material
@import "~@angular/material/prebuilt-themes/pink-bluegrey.css";
4
  • are you using Angular CLI? Commented Aug 8, 2017 at 11:21
  • No, simple application Commented Aug 8, 2017 at 11:21
  • Have you included the css to your angular-cli.json? Have you installed the material package trough angular cli or manually? Commented Aug 8, 2017 at 11:22
  • @user8376580 The OP already stated that he doesn't use Angular CLI Commented Aug 8, 2017 at 16:54

2 Answers 2

1

If you are not using Angular CLI you can simply include prebuilt css in your index.html file

<link href="node_modules/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">

The path depends on your app setup.

Sign up to request clarification or add additional context in comments.

Comments

0

After importing the prebuilt stylesheet to your projecnt, you need to add color property in <md-button> which is either primary, accent or warn.

<div class="button-row">
  <button color="primary" md-icon-button><i class="material-icons">mode_edit</i></button>
  <button color="warn" md-icon-button><i class="material-icons">delete_forever</i></button>
</div>

demo

If import doesn't work, you can try adding this CDN in index.html:

<link href="https://unpkg.com/@angular/material/prebuilt-themes/pink-bluegrey.css" rel="stylesheet">

2 Comments

Problem is that it is work for remaining elements from material?
You mean the prebuilt theme is working for least elements? And what do you mean by least elements?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.