reactjs / reactjs/react.dev

[Bug]: Tic-Tac-Toe sandbox download contains duplicate CSS rules

Open
#8,535 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: unconfirmed
Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

Summary

The CodeSandbox generated from the Tic-Tac-Toe tutorial contains duplicate * and body CSS rules in src/styles.css.
The declarations are identical and do not affect the rendered result, but the duplication may confuse beginners following the tutorial.

Page

https://react.dev/learn/tutorial-tic-tac-toe

Details

Steps to reproduce:

  1. Open the Tic-Tac-Toe tutorial.
  2. Fork one of the interactive examples in CodeSandbox.
  3. Download and extract the sandbox.
  4. Open src/styles.css.

The * and body rules appear twice with identical declarations.
I confirmed the same duplication in multiple examples on the tutorial page.
The tutorial source defines them only once per example, so the duplication appears to occur when the sandbox files are generated.

Expected result:

src/styles.css contains only one copy of each rule.

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 at the Tic-Tac-Toe tutorial page and reproduce the issue by downloading multiple CodeSandbox examples. Inspect each extracted src/styles.css and compare it with the tutorial source, then trace how the sandbox files are generated. Done means each generated stylesheet contains only one copy of the * and body rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, react
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.