Tutorial recommendation of naming stylesheet index.css causes problems
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
The React Tutorial (https://reactjs.org/tutorial/tutorial.html#setup-option-2-local-development-environment) includes the instruction
- Add a file named index.css in the src/ folder with [this CSS code]
This stylesheet is ignored. Upon perusing the generated file structure in Google Developer Tools, I discovered that another index.css (apparently generated by Webpack) had overwritten this one.
Giving the stylesheet another name (e.g. myapp.css) solves the problem.
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 with the React Tutorial's Setup Option 2 section and its instruction to create src/index.css. Verify the reported conflict with the generated Webpack stylesheet, then update the tutorial's stylesheet naming guidance if confirmed. Done means the tutorial no longer causes the user-authored stylesheet to be ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript, react, webpack
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100