Skip to content

Commit

Permalink
Merge pull request #59 from jsnmrs/fixups
Browse files Browse the repository at this point in the history
Update note, add more examples
  • Loading branch information
jsnmrs authored Nov 23, 2024
2 parents 27a6bec + a1bdb28 commit 7403668
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bookmarklets/placeholder-contrast.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,29 @@
---

<style>
input {
width: 12rem;
}
#high::placeholder {
color: #000;
}
#low::placeholder {
color: #ccc;
}
#red::placeholder {
color: #f00;
}
#green::placeholder {
color: #060;
}
</style>


<p>Open the console to see the results. Working consistently in Chrome 131. Firefox 132 gets messed up by srgb values. Safari 18 can't figure out the text color with the unprefixed selector (at least).</p>
<p>Open the console to see the results. This works consistently in Chrome (131). Firefox (132) struggles with default values that contain opacity. Safari (18) can't identify the text color properly, in any case.</p>

<p><input type="text" placeholder="Placeholder text (default)"></p>
<p><input id="high" type="text" placeholder="Placeholder text (high contrast)"></p>
<p><input id="low"type="text" placeholder="Placeholder text (low contrast)"></p>
<p><input id="red" type="text" placeholder="Placeholder text (red)"></p>
<p><input id="green"type="text" placeholder="Placeholder text (green)"></p>

0 comments on commit 7403668

Please sign in to comment.