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
  • !9234

Overloaded label-variant mixin for increased flexibility

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/ggam/patch-15 into 3.0.0-wip Aug 08, 2013
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: ggam

For now, label-variant can only be called with the background-color parameter, that is darkened for the link hover state. I also wanted to allow the posibility to manually provide the hover color, but as an optional parameter, so I tried this:

I tried

.label-variant(@background; @link-hover-color: darken(@background, 10%)) { 

But it failed to compile, cause LESS tried to process the background parameter even after the mixin was called.

So I overloaded the mixin, creating one that receives only one parameter, and other that receives both. It could be done in other places as well.

I know is not as easily readable, but I think we can gain a lot of flexibility by doing this.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ggam/patch-15