commit 99b452cdccb53f00b492538e92b6691522c9e415
parent 35c6ba915c848639f0bdb347ba5e2a42efd407d7
Author: Marcel <mtrnord1@gmail.com>
Date: Mon, 13 Jul 2020 20:30:51 +0200
Slight improvements to the input
Took 9 minutes
Diffstat:
3 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/app/components/input.rs b/src/app/components/input.rs
@@ -66,7 +66,7 @@ impl Component for Input {
<span class="material-icons">{"lock_open"}</span>
</div>
<textarea autofocus=true
- placeholder={"Input Text..."}
+ placeholder={ "Input Text..." }
value=&self.state.value.as_deref().unwrap_or("")
oninput=&self.on_input
onkeypress=&self.on_submit
diff --git a/static/custom-css.scss b/static/custom-css.scss
@@ -381,33 +381,35 @@ body {
}
}
- // Move placeholder
- textarea::placeholder {
- font-family: Roboto, sans-serif;
- font-style: normal;
- font-weight: 300;
- font-size: 18px;
- line-height: 21px;
- /* identical to box height */
-
- display: flex;
- align-items: center;
- }
-
textarea {
flex-grow: 1;
//background-color: #f5f5f5;
// Reset
border: 0;
+
&:focus {
outline: 0;
}
-
}
}
+textarea::-webkit-input-placeholder {
+ padding-top: 20px;
+}
+
+textarea::-moz-input-placeholder {
+ padding-top: 20px;
+}
+
+textarea:-moz-input-placeholder {
+ padding-top: 20px;
+}
+
+textarea:-ms-input-placeholder {
+ padding-top: 20px;
+}
.message-scrollarea {
diff --git a/static/theme_slider.scss b/static/theme_slider.scss
@@ -1,5 +1,9 @@
.toggleWrapper {
+ div {
+ z-index: -100;
+ display: inline-block;
+ }
input {
position: absolute;
left: -99em;