vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report] Button with outline breaks text vertical centering

Open samuelcolburn opened this issue 8 years ago • 6 comments

Versions and Environment

Vuetify: 1.0.4 Vue: 2.5.13 Browsers: Chrome 64.0.3282.186, Mozilla Firefox OS: Windows 10

Steps to reproduce

  1. Make a v-btn
  2. Give props == outline, small

Expected Behavior

Text is centered vertically within the button

Actual Behavior

Text is actually a few px lower than center.

Reproduction Link

https://codepen.io/smcolburn/pen/jZdXgG

Other comments

I played with it a fair bit and for whatever reason I can't seem to get it to center properly, adjusting the height or font-size still leaves it a few pixels off though it does improve things slightly.

samuelcolburn avatar Mar 01 '18 13:03 samuelcolburn

This is due to height inherit on .btn__content.

johnleider avatar Mar 05 '18 12:03 johnleider

I've noticed that text is centered vertically inside the button but a inside the button will be displayed at the top of the button.

Property: "fab", Results in: icon displaying on top of the button

adolfobee avatar Mar 06 '18 15:03 adolfobee

@adolfoBee not related, you're loading the icon CSS in the wrong order.

KaelWD avatar Mar 06 '18 15:03 KaelWD

@KaelWD this is the code I'm using:

<v-btn fab small class='green')'>
        <v-icon>keyboard_arrow_right</v-icon>
</v-btn>

adolfobee avatar Mar 06 '18 15:03 adolfobee

I have the same issue, then is solved changing the css to:

.btn--floating .icon {
    /* height: inherit; */
    /* width: inherit; */
}

Now, the icons are centered in middle, not top (still no side effects).

Mucaccino avatar Jun 28 '18 18:06 Mucaccino

Fixed by https://github.com/vuetifyjs/vuetify/commit/7abf1aa1cea8dad76543f3d554c1d702e81f70cf

KaelWD avatar Aug 07 '18 14:08 KaelWD