Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !10517

Just like :active has an equivalent .active class, so should :hover and :focus.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/altano/add-hover-and-focus-clas into master Sep 07, 2013
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 3

Created by: altano

I am trying to use ZeroClipboard on top of a bootstrap button. ZeroClipboard overlays a flash movie on top of the button to enable copy-to-clipboard functionality.

The problem is that there is currently no clean way to cause the hover/active states to be reflected on the bootstrap button below the flash movie.

There is no way for ZeroClipboard to programmatically set the actual :active/:hover pseudo classes on the DOM button when the user mouses over or clicks on the flash movie, so it allows you to set a custom class that it will set on the DOM button instead. Since there is no class for the hover state, unlike the active state, I cannot use this functionality.

I could theoretically use less to make this easy as well, by defining my own classes outside of bootstrap, like so:

.btn.hover { .btn:hover; }

But unfortunately, less does not allow you to mixin pseudo-classes and this generates a syntax error.

The solution is to add a .hover and .focus class to bootstrap's .btn, just like :active already has an equivalent .active class.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/altano/add-hover-and-focus-clas