Module: Klods::Html

Included in:
Builders
Defined in:
lib/klods/html.rb

Overview

Raw HTML tag shortcuts — no BEM classes, just the element. Mirrors html.ts in klods-js. Tags that share a name with a klods component (nav, button, form, header, footer, section, table, thead, tbody, tr, th, td, input, select, textarea, details, summary, dl, dt, dd) are intentionally omitted — use the klods component or Core.el(“tag”, …) for the bare element.

Instance Method Summary collapse

Instance Method Details

#var_el(a = nil, b = nil) ⇒ Object

‘var` is a reserved word in some linters; named var_el to match klods-js.



18
19
20
21
# File 'lib/klods/html.rb', line 18

def var_el(a = nil, b = nil)
  props, children = Core.normalize_args(a, b)
  Core.el("var", props, children)
end