scratch.mit.edu's Debug function has broken CSS Topic is solved

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
leokids
Newbie
Newbie
Posts: 3
Joined: 2025-05-16, 22:56

scratch.mit.edu's Debug function has broken CSS

Post by leokids » 2025-08-16, 15:56

This might be irrelevant since Scratch itself works fine,but their "Debug" function has broken CSS.

How to test it:

1. Go to scratch.mit.edu

2. Click on Create

3. click on "Debug"

Once you do these steps,you can see the debug is broken visually,possibly related to CSS,although clicking on the texts works fine,since it uses Javascript.

User avatar
adoxa
Astronaut
Astronaut
Posts: 520
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: scratch.mit.edu's Debug function has broken CSS

Post by adoxa » 2025-08-17, 00:05

It's using nested styles, i.e. instead of

Code: Select all

a {}
a b {}
it uses

Code: Select all

a {
  b {}
}
Here's a Modify HTTP Response filter to remove the nesting

Code: Select all

a {}
b {}
not quite the same thing, but works in this instance.

Code: Select all

[["scratch.mit.edu",["/js/projects.bundle.js",[".debug-modal_modal-header","}$&"]]]]

User avatar
leokids
Newbie
Newbie
Posts: 3
Joined: 2025-05-16, 22:56

Re: scratch.mit.edu's Debug function has broken CSS

Post by leokids » 2025-10-11, 16:42

adoxa wrote:
2025-08-17, 00:05
It's using nested styles, i.e. instead of

Code: Select all

a {}
a b {}
it uses

Code: Select all

a {
  b {}
}
Here's a Modify HTTP Response filter to remove the nesting

Code: Select all

a {}
b {}
not quite the same thing, but works in this instance.

Code: Select all

[["scratch.mit.edu",["/js/projects.bundle.js",[".debug-modal_modal-header","}$&"]]]]
Thanks! This fixed it for me,But i'm still waiting for either Pale Moon or Scratch to fix this problem...

User avatar
jobbautista9
Board Warrior
Board Warrior
Posts: 1031
Joined: 2020-11-03, 06:47
Location: Philippines

Re: scratch.mit.edu's Debug function has broken CSS

Post by jobbautista9 » 2025-10-12, 03:03

CSS Nesting is still a working draft in the W3C, so websites should not be requiring it. This is really on Scratch to fix their own styling. Overhauling the CSS parser to support nesting is not a simple task, and imho it's not worth the cans of worms nesting opens when there's an already-working equivalent syntax of a b {} as mentioned by adoxa.
Image

"Destroying things, smartly!" - IJN Samidare, probably

Avatar artwork by ebifurya: https://www.pixiv.net/artworks/85379109

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

User avatar
leokids
Newbie
Newbie
Posts: 3
Joined: 2025-05-16, 22:56

Re: scratch.mit.edu's Debug function has broken CSS

Post by leokids » 2025-10-13, 22:31

jobbautista9 wrote:
2025-10-12, 03:03
CSS Nesting is still a working draft in the W3C, so websites should not be requiring it. This is really on Scratch to fix their own styling. Overhauling the CSS parser to support nesting is not a simple task, and imho it's not worth the cans of worms nesting opens when there's an already-working equivalent syntax of a b {} as mentioned by adoxa.
Yep,but for some reason Scratch somehow requires it...ideally,if it's a working draft,then website shouldn't require it but Scratch's styling (on the "debug" function) is broken and that's all due to CSS nesting,They should probably fix it...Scratch themselves,not this browser.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2480
Joined: 2018-05-05, 13:29

Re: scratch.mit.edu's Debug function has broken CSS

Post by vannilla » 2025-10-13, 23:48

leokids wrote:
2025-10-13, 22:31
They should probably fix it...Scratch themselves,not this browser.
You should send them an e-mail or something, since you are a user (probably a regular, too).

Nesting CSS is a solution to a non-existent problem. Sure, you can "layer" complex sheets and reason about them better, but you should not write complex sheets you can't wrap your heads around without "nested syntax" in the first place.
A lot of the use cases for nested CSS can be removed by re-thinking how things are laid out.

User avatar
medians
New to the forum
New to the forum
Posts: 1
Joined: 2025-10-09, 21:42

Re: scratch.mit.edu's Debug function has broken CSS

Post by medians » 2025-10-30, 22:49

vannilla wrote:
2025-10-13, 23:48
leokids wrote:
2025-10-13, 22:31
They should probably fix it...Scratch themselves,not this browser.
You should send them an e-mail or something, since you are a user (probably a regular, too).

Nesting CSS is a solution to a non-existent problem. Sure, you can "layer" complex sheets and reason about them better, but you should not write complex sheets you can't wrap your heads around without "nested syntax" in the first place.
A lot of the use cases for nested CSS can be removed by re-thinking how things are laid out.
He made a bug report on Scratch by the way
https://scratch.mit.edu/discuss/topic/822465
OSes: Windows 2K, XP, Vista, 7, OS X Mavericks, macOS Sierra, and Big Sur
Fav Windows: Vista