JedWatson / JedWatson/react-select
HTML Validator error: Element style not allowed as child of element div
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
I am using server-side rendering and after updating to react select 5.4.0 I am having HTML validation error:
HTML Validator error: Element style not allowed as child of element div

The version which I was using before - 3.0.8.
A similar issue was closed with a suggestion related to react-input-autosize https://github.com/JedWatson/react-select/issues/4033 but as react-input-autosize was removed from dependencies this is no longer actual.
Contributor guide
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 server-side-rendered output with react-select 5.4.0 and compare it with 3.0.8, then inspect the rendered markup around the reported style element. Done means the SSR output passes HTML validation without placing a style element directly inside a div.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100