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

[Bug Report] Icons in buttons are too large #11294

Closed
ysb opened this issue May 1, 2020 · 4 comments · Fixed by #13120, gigili/good-food-tracker-web#98, elirehema/nbs-web#87, elirehema/authx#10 or accentor/web#457
Assignees
Labels
C: VBtn C: VIcon CSS specificity Different CSS on dev and production has workaround T: bug Functionality that does not work as intended/expected
Milestone

Comments

@ysb
Copy link

ysb commented May 1, 2020

Environment

Vuetify Version: 2.2.26
Vue Version: 2.6.11
Browsers: Chrome 80.0.3987.132
OS: Mac OS 10.15.4

Steps to reproduce

  • Add a v-btn component.
  • Add an some text and icon inside it mdi-cloud-upload

Expected Behavior

  • Font size should be 18px.

Actual Behavior

  • Still 24px, 18px is being overrided. You can see in screenshot below.

Reproduction Link

https://github.com/mpaksoy/vuetify-build-test

Other comments

Vue cli version: 4.3.1

I use vuetify for a big project. But some styles are breaking when I build project. There is no other library then vue, vuex, vuerouter and vuetify in project.
I created a fresh project and tested on it, same problem again. You can check it on GitHub link. I shared screenshots as well.

I’ve solved the problem on main project by creating an overrides.scss file and adding !important to all lines, but this is not an elegant way.

https://snipboard.io/bh4kxt.jpg
https://snipboard.io/r9MRlI.jpg

Thanks.

@ghost ghost added the S: triage label May 1, 2020
@jacekkarczmarczyk jacekkarczmarczyk added the CSS specificity Different CSS on dev and production label May 3, 2020
@YipingRuan
Copy link
Contributor

Similar to #8067 ?

@KaelWD KaelWD changed the title [Bug Report] CSS order problem after build [Bug Report] Icons in buttons are too large Jun 19, 2020
@KaelWD KaelWD added C: VBtn C: VIcon T: bug Functionality that does not work as intended/expected and removed S: triage labels Jun 19, 2020
@KaelWD
Copy link
Member

KaelWD commented Jun 19, 2020

3d9dc50

@jbergfi
Copy link

jbergfi commented Aug 27, 2020

I've just struck into the same issue when trying to place icons to left or right in buttons. On the demo site it looks ok, it's probably depending on how you've installed Vuetify (using vuetify loader/A-la-carte or not?) since the order of styles in the style sheet are different there compared to my project. I also created a codepen from the vuetify template that displays the issue: https://codepen.io/jbergfi/pen/PoNmbmV

My workaround is to specify size="18" on the v-icon

@KaelWD
Copy link
Member

KaelWD commented Feb 17, 2021

In v3 I've made icons default to 18px, scaling with the button's font-size:

image

This only applies to the default size, if you do <v-icon size="large"> it'll use the non-scaled large size instead.

KaelWD added a commit that referenced this issue Feb 17, 2021
fixes #11294

Co-authored-by: John Leider <john.j.leider@gmail.com>
Co-authored-by: nekosaur <albert@kaaman.nu>
@KaelWD KaelWD closed this as completed Feb 18, 2021
This was referenced Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment