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

Comma separated CSS properties with mixins (box-shadow, transition, and newly added text-shadow)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/toekneestuck/2.0.4-wip into 2.0.4-wip Jun 01, 2012
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: toekneestuck

This adds the ability to pass multiple properties to the box-shadow and transition mixins (without having to pass an escaped string). It also adds a text-shadow mixin (with the same ability)

For example:

.box-shadow(1px 1px 0 rgba(0,0,0,0.5), inset -1px -1px rgba(255,255,255,0.5));

In short, when passing a single parameter to a LESS mixin with no arguments limit (e.g., using "..."), it will insert commas for every space character found. Thus, this implementation registers a default value for the second parameter (while still allowing 2+) and filters out the default value when parsing the @arguments variable.

See this post for a full description and reasoning behind the @arguments parsing and regex'ing: http://www.toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/toekneestuck/2.0.4-wip