From d378edca8215080fb0a86899f6dc52643bdb0852 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 7 Mar 2023 02:29:15 +0900 Subject: Add integration tests for HTTP API --- src/xhtml.cr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xhtml.cr') diff --git a/src/xhtml.cr b/src/xhtml.cr index d53eb04..8db5995 100644 --- a/src/xhtml.cr +++ b/src/xhtml.cr @@ -32,9 +32,9 @@ CSS = " display: grid; grid-template-columns: max-content 1fr 0; } - form label { margin-right: 1ch } form input { margin-bottom: 1ex } - .error { + form label { margin-right: 1ch } + form label.error { color: red; margin-top: -1ex; margin-bottom: 1ex; @@ -90,8 +90,8 @@ class Page required: "required" xml.element "br" if error - xml.element "label", class: "error" do xml.text "Error:" end - xml.element "label", class: "error" do xml.text error end + xml.element "label", for: name, class: "error" do xml.text "Error:" end + xml.element "label", for: name, class: "error" do xml.text error end xml.element "br" end end -- cgit 1.4.1