diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-07 19:36:30 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-07 19:36:30 +0800 |
commit | c6e4f4e4048a6085b829b243b295c3fc47820f8f (patch) | |
tree | c55f9b32396005223b0e4b4277fbb326bcc84463 /fg21sim/webui/static | |
parent | 2e4b50fe7ac0b405e0e5e3219392d9b06f82b76d (diff) | |
download | fg21sim-c6e4f4e4048a6085b829b243b295c3fc47820f8f.tar.bz2 |
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.
Diffstat (limited to 'fg21sim/webui/static')
-rw-r--r-- | fg21sim/webui/static/css/main.css | 8 |
1 files changed, 8 insertions, 0 deletions
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) |