From c6e4f4e4048a6085b829b243b295c3fc47820f8f Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 7 Nov 2016 19:36:30 +0800 Subject: webui: Fix input[type=number] validation; Add input validation styles * Fix the validation for some "input[type=number]" element; By default, the number type input only accept *integer*. By setting the 'step="any"' attribute, the float numbers are also valid. * Add form input validation styles for ":valid" and ":invalid" pseudo classes. --- fg21sim/webui/static/css/main.css | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fg21sim/webui/static') diff --git a/fg21sim/webui/static/css/main.css b/fg21sim/webui/static/css/main.css index de2eb18..8e687ba 100644 --- a/fg21sim/webui/static/css/main.css +++ b/fg21sim/webui/static/css/main.css @@ -211,6 +211,14 @@ label, legend { font-weight: normal; } +/* Validation */ +input:valid { + border-color: #5cb85c; +} +input:invalid { + border-color: #d9534f; +} + /** * Label styles (general usage) -- cgit v1.2.2