Web it works for both in this example:
Change font weight of placeholder. Web first, change the placeholder text color to red, afterwards, increase the font weight. 4 rem , 4 : Web here’s a diagram:
You can apply styles to placeholder directly without impacting input field text styles like this. Placeholders in form fields are harmful — nielsen norman group Higher numbers represent weights that are bolder than (or as bold as) lower numbers.
There are a few ways to change the font weight of a placeholder, depe. Example ::placeholder { /* chrome, firefox, opera, safari 10.1+ */ color: I tried using placeholderstyle, but this is not for my scenario, i dont want to change the style, only font weight.
Web placeholders are not a replacement for the element. Certain commonly used values correspond to common weight names, as described in the common weight name mapping section below.</p> This can be frustrating, as you would like the text to be as legible as possible.
When preparing text for your website or document, you may have noticed placeholder fonts that are either too light or too heavy. 3.5 rem , 5 : 5 rem , 2 :
Note that firefox adds a lower opacity to the placeholder, so we use opacity: You can apply styles to placeholder directly without impacting input field text styles like this. 4.5 rem , 3 :