lib/isodoc/gb/gbbaseconvert.rb in metanorma-gb-1.2.4 vs lib/isodoc/gb/gbbaseconvert.rb in metanorma-gb-1.3.0

- old
+ new

@@ -75,25 +75,25 @@ def formula_dl_parse(node, out) out.table **{ class: "dl" } do |v| node.elements.each_slice(2) do |dt, dd| v.tr do |tr| - tr.td **{ valign: "top", align: "left" } do |term| + tr.td **{ style: "vertical-align:top;text-align:left;" } do |term| dt_parse(dt, term) end - tr.td(**{ valign: "top" }) { |td| td << "&mdash;" } - tr.td **{ valign: "top" } do |listitem| + tr.td(**{ style: "vertical-align:top;" }) { |td| td << "&mdash;" } + tr.td **{ style: "vertical-align:top;" } do |listitem| dd.children.each { |n| parse(n, listitem) } end end end end end EXAMPLE_TBL_ATTR = - { valign: "top", class: "example_label", - style: "padding:2pt 2pt 2pt 2pt" }.freeze + { class: "example_label", + style: "padding:2pt 2pt 2pt 2pt;vertical-align:top;" }.freeze def example_label(node) l10n(super + ":") end @@ -103,11 +103,11 @@ t.tr do |tr| @libdir = File.dirname(__FILE__) tr.td **EXAMPLE_TBL_ATTR do |td| td << l10n(note_label(node) + ":") end - tr.td **{ valign: "top", class: "Note" } do |td| + tr.td **{ style: "vertical-align:top;", class: "Note" } do |td| node.children.each { |n| parse(n, td) } end end end @note = false @@ -118,10 +118,10 @@ out.table **attr_code(id: node["id"], class: "Note") do |t| t.tr do |tr| tr.td **EXAMPLE_TBL_ATTR do |td| td << l10n("#{anchor(node['id'], :label)}:") end - tr.td **{ valign: "top", class: "Note" } do |td| + tr.td **{ style: "vertical-align:top;", class: "Note" } do |td| node.children.each { |n| parse(n, td) } end end end @note = false