Method: Kernel#CSS
- Defined in:
- opal/browser/css.rb
#CSS(document = $document, &block) ⇒ Browser::DOM::Element #CSS(string, document = $document) ⇒ Browser::DOM::Element
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'opal/browser/css.rb', line 24 def CSS(*args, &block) document = if args.length > 1 || block_given? args.pop end || $document style = document.create_element(:style) style[:type] = 'text/css' if block style.inner_text = Paggio.css(&block) else style.inner_text = args.join("") end style end |