Skip to content

Commit 4911782

Browse files
committed
book2: remove unused Pygments syntax highlighting CSS
These rules were introduced in 05cde25 ("prepare for progit v2", 2014-10-23) when Scott Chacon copied the theme CSS verbatim from the progit/progit2 repository's `theme/html/html.css`. That CSS targeted Pygments syntax highlighting output (manni theme) with selectors like `pre code.go` and `pre[data-code-language="console"]`, matching the HTMLBook format that O'Reilly's Atlas platform produced. The Atlas pipeline was replaced by direct Asciidoctor rendering in bbe6cf1 ("Task for publishing progit2 books from git", 2016-12-30), and the Atlas-based `genbook2` task was dropped entirely in a0a189b ("book2.rake: drop "genbook2" task", 2018-09-20), which noted that "Atlas hasn't existed for a few years." Asciidoctor without a `source-highlighter` attribute — and one was never configured in this repository's history — does not produce Pygments token classes. Instead, it emits `<code class="language-X" data-lang="X">` with plain text content (no per-token `<code>` children, and `data-lang` rather than `data-code-language`). This can be verified by downloading the build artifact from the latest "Deploy to GitHub Pages" workflow run via the GitHub API, unpacking it, and searching for any matching HTML elements: # download the `pages` artifact (adjust the artifact ID) gh api repos/git/git-scm.com/actions/artifacts/<id>/zip > pages.zip unzip -q pages.zip -d pages-outer mkdir site && tar xzf pages-outer/pages.tar.gz -C site grep -rP 'data-code-language|<code class="[a-z]{1,3}"' site/ --include='*.html' This returns no matches at all, confirming that these Pygments selectors have been dead CSS since the Atlas-to-Asciidoctor transition in late 2016. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent dd89378 commit 4911782

1 file changed

Lines changed: 0 additions & 95 deletions

File tree

assets/sass/book2.scss

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -608,99 +608,4 @@
608608
text-indent: 0;
609609
}
610610
}
611-
612-
/* syntax highlighting and coloring text in general */
613-
614-
/* Pygments with manni theme */
615-
pre code.hll { background-color: #ffffcc }
616-
pre code.c { color: #0099FF; font-style: italic } /* Comment */
617-
pre code.err { color: #AA0000 } /* Error */
618-
pre code.k { color: #006699; font-weight: bold } /* Keyword */
619-
pre code.o { color: #555555 } /* Operator */
620-
pre code.cm { color: #35586C; font-style: italic } /* Comment.Multiline */
621-
pre code.cp { color: #009999 } /* Comment.Preproc */
622-
pre code.c1 { color: #35586C; font-style: italic } /* Comment.Single */
623-
pre code.cs { color: #35586C; font-weight: bold; font-style: italic } /* Comment.Special */
624-
pre code.gd { background-color: #FFCCCC } /* Generic.Deleted */
625-
pre code.ge { font-style: italic } /* Generic.Emph */
626-
pre code.gr { color: #FF0000 } /* Generic.Error */
627-
pre code.gh { color: #003300; font-weight: bold } /* Generic.Heading */
628-
pre code.gi { background-color: #CCFFCC } /* Generic.Inserted */
629-
630-
/* Overriding default manni style of #AAAAAA gray for Generic Output with #000000 black, which is better suited to ORM terminal output */
631-
pre code.go { color: #000000 } /* Generic.Output */
632-
633-
pre code.gp { color: #000099; font-weight: bold } /* Generic.Prompt */
634-
pre code.gs { font-weight: bold } /* Generic.Strong */
635-
pre code.gu { color: #003300; font-weight: bold } /* Generic.Subheading */
636-
pre code.gt { color: #99CC66 } /* Generic.Traceback */
637-
pre code.kc { color: #006699; font-weight: bold } /* Keyword.Constant */
638-
pre code.kd { color: #006699; font-weight: bold } /* Keyword.Declaration */
639-
pre code.kn { color: #006699; font-weight: bold } /* Keyword.Namespace */
640-
pre code.kp { color: #006699 } /* Keyword.Pseudo */
641-
pre code.kr { color: #006699; font-weight: bold } /* Keyword.Reserved */
642-
pre code.kt { color: #007788; font-weight: bold } /* Keyword.Type */
643-
pre code.m { color: #FF6600 } /* Literal.Number */
644-
pre code.s { color: #CC3300 } /* Literal.String */
645-
pre code.na { color: #330099 } /* Name.Attribute */
646-
pre code.nb { color: #336666 } /* Name.Builtin */
647-
pre code.nc { color: #00AA88; font-weight: bold } /* Name.Class */
648-
pre code.no { color: #336600 } /* Name.Constant */
649-
pre code.nd { color: #9999FF } /* Name.Decorator */
650-
pre code.ni { color: #999999; font-weight: bold } /* Name.Entity */
651-
pre code.ne { color: #CC0000; font-weight: bold } /* Name.Exception */
652-
pre code.nf { color: #CC00FF } /* Name.Function */
653-
pre code.nl { color: #9999FF } /* Name.Label */
654-
pre code.nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */
655-
pre code.nt { color: #330099; font-weight: bold } /* Name.Tag */
656-
pre code.nv { color: #003333 } /* Name.Variable */
657-
pre code.ow { color: #000000; font-weight: bold } /* Operator.Word */
658-
pre code.w { color: #bbbbbb } /* Text.Whitespace */
659-
pre code.mf { color: #FF6600 } /* Literal.Number.Float */
660-
pre code.mh { color: #FF6600 } /* Literal.Number.Hex */
661-
pre code.mi { color: #FF6600 } /* Literal.Number.Integer */
662-
pre code.mo { color: #FF6600 } /* Literal.Number.Oct */
663-
pre code.sb { color: #CC3300 } /* Literal.String.Backtick */
664-
pre code.sc { color: #CC3300 } /* Literal.String.Char */
665-
pre code.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
666-
pre code.s2 { color: #CC3300 } /* Literal.String.Double */
667-
pre code.se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */
668-
pre code.sh { color: #CC3300 } /* Literal.String.Heredoc */
669-
pre code.si { color: #AA0000 } /* Literal.String.Interpol */
670-
pre code.sx { color: #CC3300 } /* Literal.String.Other */
671-
pre code.sr { color: #33AAAA } /* Literal.String.Regex */
672-
pre code.s1 { color: #CC3300 } /* Literal.String.Single */
673-
674-
/* Overriding manni default yellow #FFCC33 with brown #AA6600, which is easier to read */
675-
pre code.ss { color: #AA6600 } /* Literal.String.Symbol */
676-
677-
pre code.bp { color: #336666 } /* Name.Builtin.Pseudo */
678-
pre code.vc { color: #003333 } /* Name.Variable.Class */
679-
pre code.vg { color: #003333 } /* Name.Variable.Global */
680-
pre code.vi { color: #003333 } /* Name.Variable.Instance */
681-
pre code.il { color: #FF6600 } /* Literal.Number.Integer.Long */
682-
683-
/* Sanders's additions to manni */
684-
pre code.g { color: #005500 } /* Generic */
685-
pre code.l { color: #CC6600 } /* Literal */
686-
pre code.l { color: #FF9900 } /* Literal.Date */
687-
pre code.n { color: #000088 } /* Name */
688-
pre code.nx { color: #000088 } /* Name.Other */
689-
pre code.py { color: #9966FF } /* Name.Property */
690-
pre code.p { color: #000000 } /* Punctuation */
691-
pre code.x { color: #FF0066 } /* Other */
692-
693-
/* Chacon's additions to make command line look more like a command line */
694-
pre[data-code-language="console"] {
695-
padding: 10px;
696-
background: #eee;
697-
}
698-
pre[data-code-language="console"] code.go {
699-
font-size: 1.0em;
700-
color: #555;
701-
}
702-
pre[data-code-language="console"] code.gp {
703-
font-weight: bold;
704-
color: #009900;
705-
}
706611
}

0 commit comments

Comments
 (0)