codesandbox / codesandbox/codesandbox-client

Rendering CSS Wrong

Open
#6,396 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

When working with this IDE and using Vanilla Javascript and HTML, I made a new CSS file, and my main file index.html has the link to styles.css and it works. However when i made a new CSS file (hireme.css) and a new html with a link to hireme.css (hireme.html). That page renders CSS properly. However in the lillte preview to the side of the screen the index.html now rendered the hireme.css even though there is no link to it. But when I open the page to a seperate tab, it renders perfectly fine.

What it looks like

F1735924-93E7-4A20-BD3C-7D7087C32094

What its supposed to look like

CE224E8B-F157-45CB-B740-1E4426072061

How has this issue affected you? What are you trying to accomplish?

Me a developer, who is in school, has to work with this on a Ipad, so this is just one big inconvenience to have to open the new page, and render the wrong css in the preview.

To Reproduce

( its hard to explain but ill try )

Make the Vanilla javascript template, then link the main file to the CSS. When you make another html and css file, the preview should show the bug.

Your Environment
Software Name/Version
Сodesandbox 23405e5a1
Safari Current
Operating System IOS 14.8

This bug has happened to me about 10 times now, and only happens some of the time!! ( Please keep this in mind )

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 issue in the Vanilla JavaScript template using sandbox 23405e5a1 on Safari/iOS, comparing the side preview with the separately opened page. Trace why the preview applies hireme.css to index.html; done means each HTML file consistently uses only its linked stylesheet in the preview.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, javascript
Domain
frontend, web-dev
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.