TextField Placeholder Font-Size
Bug Report
- Package version(s): 6.180.0
- Browser and OS versions: (all)
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? No
Requested priority: High
Products/sites affected: Microsoft Planner
Describe the issue:
Setting a font-size on a text field via css does not affect the placeholder size. This used to work as expected but I think this PR: https://github.com/OfficeDev/office-ui-fabric-react/pull/8018 changed the behavior by setting the font-size via ::placeholder in TextField.styles.tsx.
Actual behavior:
Setting font-size: 28px on a TextField sets the text font-size to 28px but the placeholder font-size remains the default 14px
Expected behavior:
Setting a font-size of input text and placeholder should be the same.
If applicable, please provide a codepen repro:
https://codepen.io/anon/pen/EzodgX
I modified the CSS to add a ::placeholder there to up the size of the placeholder. Seems like a pretty minor workaround. Would this solve your issue?
https://codepen.io/anon/pen/MdrPLv
That workaround would fix this issue but other places where we set the input font-size would need this fix as well which may end up being many files (not to mention it's hard to find all the places we do this)
This is right, we unnecessarily overrode the ::placeholder. I'm going to remove that override. It should address your needs.
:tada:This issue was addressed in #9193, which has now been successfully released as [email protected].:tada:
Handy links: