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

[Feature Request] New button variant: plain (no background hover) #3026

Closed
sindrepm opened this issue Jan 16, 2018 · 5 comments · Fixed by #12814
Closed

[Feature Request] New button variant: plain (no background hover) #3026

sindrepm opened this issue Jan 16, 2018 · 5 comments · Fixed by #12814
Assignees
Labels
C: VBtn T: enhancement Functionality that enhances existing features
Milestone

Comments

@sindrepm
Copy link
Contributor

New Functionality

For some UI I prefer buttons with no background change on hover but rather a change in opacity for the icon/text itself. I am suggesting a new prop plain to v-btn which will basically apply the following styles (as well as having the effect of passing the flat prop):

.btn--plain {
  height: auto;
  width: auto;
  margin: 0;
  padding: 8px;
  min-width: 0;
  > .btn__content {
    padding: 0;
    opacity: 0.75;
    &:before {
      background-color: transparent !important;
      transition: none !important;
    }
  }
  &:hover {
    > .btn__content {
      opacity: 1;
    }
  }
}

Here is an example of how it works/looks:
https://codepen.io/anon/pen/BJOYjd

I have been using this myself for a while and thought maybe others want something similar, so decided to suggest it as an addition to the v-btn component. What do you think? Is this something you will consider?

Improvements

If this is functionality many users request it makes sense to include it in the framework.

Bugs or Edge Cases it Helps Avoid

Users don't have to implement it themselves.

@johnleider johnleider added the pending review The issue is still pending disposition label Jan 16, 2018
@nekosaur nekosaur added T: enhancement Functionality that enhances existing features help wanted We are looking for community help good first issue A quick-win fix that would be great for new contributors and removed pending review The issue is still pending disposition labels Mar 8, 2018
@franchert franchert mentioned this issue Jul 12, 2018
9 tasks
@KaelWD KaelWD removed good first issue A quick-win fix that would be great for new contributors help wanted We are looking for community help labels Sep 2, 2018
@siamkreative

This comment has been minimized.

@yuens1002
Copy link

yuens1002 commented Feb 14, 2019

.v-btn:hover:before {
      background-color: transparent;
    }

should do the trick or add a class your-class:hover:before and apply it on the v-btn instance

@ryantunis
Copy link

.v-btn:hover:before {
      background-color: transparent;
    }

should do the trick or add a class your-class:hover:before and apply it on the v-btn instance

This only gets rid of the hover for mouseover. As soon as you move your mouse off the button it does the hover effect from 1 opacity to 0.

@mikegoforth
Copy link

mikegoforth commented Nov 8, 2019

.v-btn:hover:before {
      background-color: transparent;
    }

should do the trick or add a class your-class:hover:before and apply it on the v-btn instance

This only gets rid of the hover for mouseover. As soon as you move your mouse off the button it does the hover effect from 1 opacity to 0.

Add this to your CSS (or custom class):

.v-btn:before {
  display: none;
}

This should take care of it. Toggling the transitions as seen below also gives more specific desired result. Cheers!

Screen Shot 2019-11-08 at 11 22 18 AM

@joonhuang
Copy link

This enhancement should apply whenever clicking on the v-btn as well.

Workaround to avoid opacity get changed to 0 when click on v-btn
.v-ripple__animation{ display: none; }

@johnleider johnleider added this to the v3.0.0 milestone Dec 16, 2020
@johnleider johnleider linked a pull request Dec 21, 2020 that will close this issue
8 tasks
@johnleider johnleider modified the milestones: v3.0.0, v2.4.0 Dec 21, 2020
johnleider added a commit that referenced this issue Dec 22, 2020
resolves #3026 

Co-authored-by: John Leider <john.j.leider@gmail.com>
@johnleider johnleider modified the milestones: v2.4.0, v2.5.0 Dec 22, 2020
@KaelWD KaelWD modified the milestones: v2.5.0, v2.4.0 Dec 23, 2020
@KaelWD KaelWD closed this as completed Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VBtn T: enhancement Functionality that enhances existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.