Class: LightningcssRb::AST::Selectors::Namespace

Inherits:
Base
  • Object
show all
Defined in:
lib/lightningcss_rb/ast/selectors/namespace.rb

Instance Attribute Summary

Attributes inherited from Base

#node

Instance Method Summary collapse

Methods inherited from Base

from_ast, #initialize, node_attr_reader, #to_s

Constructor Details

This class inherits a constructor from LightningcssRb::AST::Selectors::Base

Instance Method Details

#to_cssObject



11
12
13
14
15
16
17
18
# File 'lib/lightningcss_rb/ast/selectors/namespace.rb', line 11

def to_css
  case kind
  when "none"  then "|"
  when "any"   then "*|"
  when "named" then "#{prefix}|"
  else raise UnknownNamespaceKind(kind, node)
  end
end