kriasoft / kriasoft/react-firebase-starter
css-modules being applied after componentDidMount
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.5k
- Forks
- 752
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to get the font size of an input on componentDidMount via JavaScript, and it returns 11px even though my CSS has it styled to 14px (confirmed it renders as 14px). The 11px comes from the default Chrome user agent styles (font: 11px BlinkMacSystemFont), so this leads me to believe the JS is running before the CSS gets applied. Is this the expected behavior, or a bug?
(sorry if this is a duplicate, I tried searching!)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the input-style observation around componentDidMount, CSS Modules, and Chrome's user-agent styles. Inspect when the stylesheet is loaded relative to the component lifecycle, then determine whether the reported 11px value is reproducible and what behavior should be documented or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100