Commit 3ad7d07c authored by Jeffrey Chen's avatar Jeffrey Chen Committed by Commit Bot

Revert "Use opacity of 0.54 for placeholder text in input fields"

This reverts commit 30d3999b.

Reason for revert: crbug.com/1009285

Original change's description:
> Use opacity of 0.54 for placeholder text in input fields
>
> Prior to this change, placeholder text in input fields was set to grey
> (#757575), but this did not apply to emojis. Now, we use an opacity
> value to control the placeholder appearance. 0.54 is used because in a
> white input field, regular placeholder text still appears as #757575.
>
> Bug: 932026
> Change-Id: Iba02fe3eb31484255332f2f34a67f97b97f50cb8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754086
> Commit-Queue: Jeffrey C <jeffreyca16@gmail.com>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#691770}

TBR=aboxhall@chromium.org,eae@chromium.org,tkent@chromium.org,jeffreyca16@gmail.com

Bug: 932026, 1009285
Change-Id: I97b7114ceb670e09bfbd6461d761a6404fa5c5be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839434
Commit-Queue: Jeffrey Chen <jeffreyca16@gmail.com>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702988}
parent 69304271
...@@ -511,7 +511,7 @@ textarea { ...@@ -511,7 +511,7 @@ textarea {
::-webkit-input-placeholder { ::-webkit-input-placeholder {
-webkit-text-security: none; -webkit-text-security: none;
color: -internal-light-dark-color(rgba(0, 0, 0, 0.54), rgba(255, 255, 255, 0.54)); color: #757575;
pointer-events: none !important; pointer-events: none !important;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<head> <head>
<style> <style>
#pass1, #pass3 { #pass1, #pass3 {
color: rgba(0, 0, 0, 0.54); color: #757575;
} }
</style> </style>
</head> </head>
......
<style> <style>
input { color: rgba(0, 0, 0, 0.54); font-size: 30px; width: 500px; } input { color: #757575; font-size: 30px; width: 500px; }
input.a { text-indent: 0px; } input.a { text-indent: 0px; }
input.b { text-indent: 10px; } input.b { text-indent: 10px; }
input.c { text-indent: 200px; } input.c { text-indent: 200px; }
......
<!DOCTYPE html>
<style>
input {
color: rgba(0, 0, 0, 0.54);
line-height: 15px;
}
</style>
This tests that emojis in placeholders appear faded along with the text.
<div>
<input value="default 😊">
<input disabled value="default disabled 😊">
</div>
<!DOCTYPE html>
<style>
input {
line-height: 15px;
}
</style>
This tests that emojis in placeholders appear faded along with the text.
<div>
<input placeholder="default 😊">
<input disabled placeholder="default disabled 😊">
</div>
<!DOCTYPE html> <!DOCTYPE html>
<style> <style>
input { input {
color: rgba(0, 0, 0, 0.54); color: #757575;
} }
input.red { input.red {
...@@ -31,7 +31,7 @@ This tests that you can set the placeholder text color. ...@@ -31,7 +31,7 @@ This tests that you can set the placeholder text color.
<div> <div>
Default style: Default style:
<input value="default"> <input value="default">
<input disabled value="default disabled"> <input value="default disabled">
</div> </div>
<div> <div>
......
...@@ -27,7 +27,7 @@ This tests that you can set the placeholder text color. ...@@ -27,7 +27,7 @@ This tests that you can set the placeholder text color.
<div> <div>
Default style: Default style:
<input placeholder="default"> <input placeholder="default">
<input disabled placeholder="default disabled"> <input placeholder="default disabled">
</div> </div>
<div> <div>
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
<div>aaa</div> <div>aaa</div>
<div>bbb</div> <div>bbb</div>
</div> </div>
<input style="color: rgba(0, 0, 0, 0.54);" value="placeholder"> <input style="color: #757575;" value="placeholder">
<!DOCTYPE html> <!DOCTYPE html>
<style> <style>
textarea { textarea {
color: rgba(0, 0, 0, 0.54); color: #757575;
} }
.red { .red {
......
<textarea rows=8> <textarea rows=8>
A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog.
</textarea> </textarea>
<textarea rows=8 style="color: rgba(0, 0, 0, 0.54);"> <textarea rows=8 style="color: #757575;">
A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog.
</textarea> </textarea>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment