JedWatson / JedWatson/react-select

HTML Validator error: Element style not allowed as child of element div

Open
#5,303 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
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

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.