FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add green, red and yellow side borders for code examples by hugovk · Pull Request #285 · python/python-docs-theme · GitHub

Repository navigation

Add green, red and yellow side borders for code examples - #285

Merged
hugovk merged 1 commit into
python:mainfrom
hugovk:green-red
Dec 10, 2025
Merged

hugovk merged 1 commit into
python:mainfrom
hugovk:green-red

Conversation

hugovk commented Dec 8, 2025 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Like python/peps#3567 and python/devguide#1237, re: python/docs-community#22.

This will allow us to add borders on the left side of code examples to flag if they're "good", "bad", or somewhere in between.

For example:

Do this:

.. code-block::
   :class: good

   a = 1

Don't do this:

.. code-block::
   :class: bad

    a =

Take care doing this:

.. code-block::
   :class: maybe

    a = 2

Gives:

And this will be useful for the upcoming free-threaded guidance coming to the docs.

cc @lysnikolaou


📚 Documentation preview 📚: https://python-docs-theme-previews--285.org.readthedocs.build/

StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

lysnikolaou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM! Thanks @hugovk!

hugovk merged commit bf2c2d7 into python:main Dec 10, 2025
15 checks passed
hugovk deleted the green-red branch December 10, 2025 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL