From 7412a98815ba7cfb54b4311aa38958f4a45680fb Mon Sep 17 00:00:00 2001
From: Isiah Lloyd
Date: Sat, 21 May 2022 20:57:24 -0400
Subject: [PATCH] - Add styling for number input (#133)
- Update docs to show styling for more fields
---
docs/index.html.ejs | 32 ++++++++++++++++++++++++++------
style.css | 10 +++++++++-
2 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/docs/index.html.ejs b/docs/index.html.ejs
index 4158173..faf811c 100644
--- a/docs/index.html.ejs
+++ b/docs/index.html.ejs
@@ -391,15 +391,35 @@
`) %>
- Text boxes can also be disabled and have value with their corresponding HTML attributes.
+ Text boxes can also be disabled and have value with their corresponding HTML attributes.
-
+
<%- example(`
`) %>
+
+
+ Other types of HTML5 text inputs are also supported.
+
+
+ <%- example(`
+
+
+
+
+
+
+
+
+
+
+
+
+ `) %>
+
@@ -548,7 +568,7 @@
assistive technologies know the intent of this button. You may also use
"Minimize", "Maximize", "Restore" and "Help" like so:
-
+
<%- example(`
A Title Bar
@@ -578,7 +598,7 @@
-
+
`) %>
You can make a title bar "inactive" by adding inactive class,
@@ -663,7 +683,7 @@
- You can render a status bar with the status-bar class,
+ You can render a status bar with the status-bar class,
and status-bar-field for every child text element.
@@ -688,7 +708,7 @@
`) %>
-
+
diff --git a/style.css b/style.css
index e65c9e0..acd84a9 100644
--- a/style.css
+++ b/style.css
@@ -422,6 +422,7 @@ input[type="checkbox"][disabled]:checked + label::after {
input[type="text"],
input[type="password"],
input[type="email"],
+input[type="number"],
select,
textarea {
padding: 3px 4px;
@@ -441,10 +442,15 @@ input[type="email"],
select {
height: 21px;
}
+input[type="number"] {
+ /* need this 1 pixel to fit the spinner controls in box */
+ height: 22px;
+}
input[type="text"],
input[type="password"],
-input[type="email"] {
+input[type="email"],
+input[type="number"] {
/* For some reason descenders are getting cut off without this */
line-height: 2;
}
@@ -452,6 +458,7 @@ input[type="email"] {
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="text"]:disabled,
+input[type="number"]:disabled,
textarea:disabled {
background-color: var(--surface);
}
@@ -472,6 +479,7 @@ select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
+input[type="number"]:focus,
textarea:focus {
outline: none;
}