Skip to content

Commit

Permalink
Added $(selector) method for creating Selector
Browse files Browse the repository at this point in the history
  • Loading branch information
adamldavis committed Mar 11, 2019
1 parent f7cad23 commit cd18c1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/groovy/org/groocss/GrooCSS.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ class GrooCSS extends Script implements CurrentKeyFrameHolder {
new Selector("$selector", currentCss)
}

/** Creates a selector from any given argument. Same as {@link #sel(java.lang.Object)}. */
Selector $(selector) {
sel(selector)
}

/** Creates a new StyleGroup element and runs given closure on it. */
StyleGroup sel(Selector selector,
@DelegatesTo(value = StyleGroup, strategy = Closure.DELEGATE_FIRST) Closure<StyleGroup> clos) {
Expand Down

0 comments on commit cd18c1e

Please sign in to comment.