compass

https://github.com/chriseppstein/compass

CSS

Compass is no longer actively maintained. Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain.

Compass::Core::SassExtensions::Functions::Selectors#append_selector

Permute two selectors, the first may be comma delimited.
The end result is a new selector that is the equivalent of nesting the second
selector under the first one in a sass file and preceding it with an &.
To illustrate, the following mixins are equivalent, except the second
mixin handles:

    @include mixin-a($selector, $to-append) {
      #{$selector} {
        &#{$to-append} {
          width: 2px
        }
      }
    }
    
    @include mixin-b($selector, $to-append) {
      #{append_selector($selector, $to-append)} {
        width: 2px
      }
    }

Source | Google | Stack overflow

Edit

git clone [email protected]:chriseppstein/compass.git

cd compass

open core/lib/compass/core/sass_extensions/functions/selectors.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Compass--Core--SassExtensions--Functions--Selectors-append_selector-for-pr


# Commit to git

git add core/lib/compass/core/sass_extensions/functions/selectors.rbgit commit -m "better docs for Compass::Core::SassExtensions::Functions::Selectors#append_selector"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Compass--Core--SassExtensions--Functions--Selectors-append_selector-for-pr

hub pull-request


# Celebrate!