Pārlūkot izejas kodu

[style] Center search cursor and hide placeholder

The search bar doesn't feel right if the placeholder is centered,
while the text cursor is left-aligned. The cursor should appear
instead of the placeholder (at the same position).

Added styles to center the text cursor and hide the placeholder
when selecting the input field.

Tested in:
 - Firefox 54 & 55
 - Chromium 60 (compatible with Chrome 60)
 - Microsoft Edge (partially working!)

--- Microsoft Edge ---

Due to a bug in the Microsoft Edge browser, the text cursor is not
centered as long as the placeholder is defined (which it is always)

More information:
  https://stackoverflow.com/a/33224868

Official bug report:
  https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4468563/

----------------------
logmanoriginal 6 gadi atpakaļ
vecāks
revīzija
f757d7d1a5
1 mainītis faili ar 25 papildinājumiem un 0 dzēšanām
  1. 25 0
      static/style.css

+ 25 - 0
static/style.css

@@ -197,6 +197,31 @@ input[type="text"] {
 	font-size: 1.1em;
 	margin-left: 8px;
 	padding-left: 4px;
+	text-align: center;
+
+}
+
+input[type="text"]:focus::-webkit-input-placeholder {
+
+	opacity: 0;
+
+}
+
+input[type="text"]:focus::-moz-placeholder {
+
+	opacity: 0;
+
+}
+
+input[type="text"]:focus:-moz-placeholder {
+
+	opacity: 0;
+
+}
+
+input[type="text"]:focus:-ms-input-placeholder {
+
+	opacity: 0;
 
 }