Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize & change color #1

Open
KingKnecht opened this issue Jun 20, 2018 · 1 comment
Open

Resize & change color #1

KingKnecht opened this issue Jun 20, 2018 · 1 comment

Comments

@KingKnecht
Copy link

Hi,
how would I resize or change color of an icon?

Thx,
Sven

@therufa
Copy link
Owner

therufa commented Jun 21, 2018

hi @KingKnecht,
all the icons have 2 classes by default which are placed directly to the svg tag. so basically you can style them using simple css. To change the color for all the icons you could set the fill option on the .mdi-vue class to the color you desire for size just set width and hight. you can also play around with the view-box prop of the component.

eg:

<template>
  <div>
    <mdi-coin-icon class="my-icon" />
  </div>
</template>

<script>
 import 'mdi-vue/CoinIcon'
</script>

<style>
.my-icon {
  fill: yellow;
  width: 50px;
  height: 50px;
}
</style>

To style all the icons you need to place styles into a globally available stylesheet, but it works all the same in the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants