Module | Compass::SassExtensions::Functions::Selectors
In: | lib/compass/sass_extensions/functions/selectors.rb

### Methods

append_selector headers headings nest

### Constants

COMMA_SEPARATOR | = | /\s*,\s*/

### Public Instance methods

append_selector(selector, to_append)

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:

# mixin-a(!selector, !to_append)

      #{!selector}
        &#{!to_append}
          width: 2px

# mixin-b(!selector, !to_append)

      #{append_selector(!selector, !to_append)}
        width: 2px

headers(from = nil, to = nil)

Return the header selectors for the levels indicated Defaults to all headers h1 through h6 For example: headers(all) => h1, h2, h3, h4, h5, h6 headers(4) => h1, h2, h3, h4 headers(2,4) => h2, h3, h4

headings(from = nil, to = nil)

Alias for headers

nest(*arguments)

Permute multiple selectors each of which may be comma delimited, the end result is a new selector that is the equivalent of nesting each under the previous selector. To illustrate, the following mixins are equivalent:

# mixin-a(!selector1, !selector2, !selector3)

      #{!selector1}
        #{selector2}
          #{selector3}
            width: 2px

# mixin-b(!selector1, !selector2)

      #{nest(!selector, !selector2, !selector3)}
        width: 2px

[Validate]