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

Gradient mixin to allow nth number of colors and stops

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/giftcards/master-gradient-nth-colors into master Feb 03, 2014
  • Overview 0
  • Commits 9
  • Pipelines 0
  • Changes 0

Created by: hppycoder

Created a mixin that would allows nth number of colors and stops to be be used. Enables other developers to not have to use only 2 or 3 colors, instead they can use as many colors as desired.

Added the following mixin's:

  • vertical-nth-colors
  • horiztonal-nth-colors

Sample Usage:

#gradient > .horizontal-nth-colors(#ffffff #fffffa #ff0011 #000000 #affd29, 0 50 75 80 100);
#gradient > .vertical-nth-colors(#1E5799 #1A4884 #2672BF #7db9e8, 0 30 60 100);

It maintains backwards compatibility by having the current horizontal, horiztonal-three-colors, vertical, and vertical-three-colors use the same iterator pattern

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/giftcards/master-gradient-nth-colors