class Sass::SCSS::CssParser
It does support all the same CSS hacks as the SCSS parser, though.
parent references, nested selectors, and so forth.
It doesn’t support any Sass extensions, such as interpolation,
This is a subclass of {Parser} which only parses plain CSS.
def block_child(context)
def block_child(context) case context when :ruleset declaration when :stylesheet directive || ruleset when :directive directive || declaration_or_ruleset end end
def interp_ident(ident = IDENT); tok(ident); end
def interp_ident(ident = IDENT); tok(ident); end
def interp_string; tok(STRING); end
def interp_string; tok(STRING); end
def interpolation; nil; end
def interpolation; nil; end
def nested_properties!(node, space)
def nested_properties!(node, space) expected('expression (e.g. 1px, bold)'); end
def parent_selector; nil; end
def parent_selector; nil; end
def parse_selector_string
-
(Sass::SyntaxError)
- if there's a syntax error in the selector
Returns:
-
(String, nil)
- The parsed selector, or nil if no selector was parsed
def parse_selector_string init_scanner! str {return unless selector} end
def use_css_import?; true; end
def use_css_import?; true; end