fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

TextField Placeholder Font-Size

Open SudharsanSukumar opened this issue 7 years ago • 4 comments

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

SudharsanSukumar avatar May 22 '19 19:05 SudharsanSukumar

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

kenotron avatar May 22 '19 19:05 kenotron

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)

SudharsanSukumar avatar May 22 '19 19:05 SudharsanSukumar

This is right, we unnecessarily overrode the ::placeholder. I'm going to remove that override. It should address your needs.

kenotron avatar May 23 '19 15:05 kenotron

:tada:This issue was addressed in #9193, which has now been successfully released as [email protected].:tada:

Handy links:

msft-github-bot avatar May 29 '19 12:05 msft-github-bot