File: selector.rb

package info (click to toggle)
ruby-sass 3.7.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,396 kB
  • sloc: ruby: 32,443; sh: 26; makefile: 25
file content (26 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Sass::Script::Tree
  # A SassScript node that will resolve to the current selector.
  class Selector < Node
    def initialize; end

    def children
      []
    end

    def to_sass(opts = {})
      '&'
    end

    def deep_copy
      dup
    end

    protected

    def _perform(environment)
      selector = environment.selector
      return opts(Sass::Script::Value::Null.new) unless selector
      opts(selector.to_sass_script)
    end
  end
end