Discuss Scratch

mybearworld
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

<!-- Code tags are implemented like this: -->
<!DOCTYPE html>
<body>
    <div class="code">
        <pre>
            <span class="c">&lt;!-- Code tags are implemented like this:--></span>
            <span class="cp">&lt;!DOCTYPE html></span>
            <!-- and so on -->
        </pre>
    </div>
</body>
As you can see, the class names are quite cryptic. I tried to look for an explenation, but failed.
Does anyone know all of them?

Thanks to #5 for the answer!

Last edited by mybearworld (May 28, 2022 14:05:49)


Signatures are the only place where assets links still work.
MagicCrayon9342
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

mybearworld wrote:

<!-- Code tags are implemented like this: -->
<!DOCTYPE html>
<body>
    <div class="code">
        <pre>
            <span class="c">&lt;!-- Code tags are implemented like this:--></span>
            <span class="cp">&lt;!DOCTYPE html></span>
            <!-- and so on -->
        </pre>
    </div>
</body>
As you can see, the class names are quite cryptic. I tried to look for an explenation, but failed.
Does anyone know all of them?
The class names do not pertain to the code itself from the looks of it, rather it pertains to how the code is displayed? The class names are probably for the syntax highlighting. The ‘pre’ tags probably keep the code in the exact layout and format that the user input it. The class ‘code’ probably resembles code blocks.

mybearworld
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

MagicCrayon9342 wrote:

The class names do not pertain to the code itself from the looks of it, rather it pertains to how the code is displayed? The class names are probably for the syntax highlighting. The ‘pre’ tags probably keep the code in the exact layout and format that the user input it. The class ‘code’ probably resembles code blocks.
I know, but is there a way we know all of them?

Signatures are the only place where assets links still work.
MagicCrayon9342
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

mybearworld wrote:

MagicCrayon9342 wrote:

The class names do not pertain to the code itself from the looks of it, rather it pertains to how the code is displayed? The class names are probably for the syntax highlighting. The ‘pre’ tags probably keep the code in the exact layout and format that the user input it. The class ‘code’ probably resembles code blocks.
I know, but is there a way we know all of them?
I can only assume html comments have the class ‘c’
and the DocType tag has the class ‘cp’
You can write every syntax highlighting type into a code tag and see how it renders to know the classes.

Mrcomputer1
Scratcher
500+ posts

Does anyone know all the classes for the code tag?

https://cdn.scratch.mit.edu/scratchr2/static//djangobb_forum/css/pygments.css

My Profile / My User Page / My Talk Page
——————–
Progress bar to 1000+ Posts - Image might not be up to date

——————–
My browser / operating system: Windows NT 10.0 (Windows 11 - 22H2), Firefox 122.0b4
——————–
My ScratchX Extensions——–If you like this post, give me an internet!——–Sharp Scratch Mod
mybearworld
Scratcher
1000+ posts

Does anyone know all the classes for the code tag?

Mrcomputer1 wrote:

(#5)
https://cdn.scratch.mit.edu/scratchr2/static//djangobb_forum/css/pygments.css
Thanks!

Signatures are the only place where assets links still work.

Powered by DjangoBB