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
-
#var_el(a = nil, b = nil, &block) ⇒ Object
‘var` is a reserved word in some linters; named var_el to match klods-js.
Instance Method Details
#var_el(a = nil, b = nil, &block) ⇒ Object
‘var` is a reserved word in some linters; named var_el to match klods-js.
19 20 21 22 23 |
# File 'lib/klods/html.rb', line 19 def var_el(a = nil, b = nil, &block) props, children = Core.normalize_args(a, b) children = klods_capture(&block) if block Core.el("var", props, children) end |