summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2023-01-10 16:17:08 +0100
committerSamuel Mannehed <samuel@cendio.se>2023-03-23 11:06:03 +0100
commit4558104196834963cea5748e4bed1750fbc4f6e2 (patch)
treeaf0c8b2908e98198537c3133d4973aeb3ebdb560
parent6751cc1236699bb648ac0dd24fb0a53a002637c3 (diff)
downloadnovnc-4558104196834963cea5748e4bed1750fbc4f6e2.tar.gz
Properly center the checkbox checkmark
Using a flexbox we can easily center the checkmark without using hard coded positions.
-rw-r--r--app/styles/input.css8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/styles/input.css b/app/styles/input.css
index eaf083c..dc345aa 100644
--- a/app/styles/input.css
+++ b/app/styles/input.css
@@ -86,6 +86,9 @@ option {
* Checkboxes
*/
input[type=checkbox] {
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
background-color: white;
background-image: unset;
border: 1px solid dimgrey;
@@ -104,14 +107,11 @@ input[type=checkbox]:checked {
input[type=checkbox]:checked::after {
content: "";
display: block; /* width & height doesn't work on inline elements */
- position: relative;
- top: 0;
- left: 3px;
width: 3px;
height: 7px;
border: 1px solid white;
border-width: 0 2px 2px 0;
- transform: rotate(40deg);
+ transform: rotate(40deg) translateY(-1px);
}
/*