Skip to content

Blogger 1.1.6: show code blocks with their colours - #11

Merged
necessarylion merged 1 commit into
mainfrom
blogger-code-blocks
Nov 7, 2026
Merged

necessarylion merged 1 commit into
mainfrom
blogger-code-blocks

Conversation

@mydoxie

@mydoxie mydoxie commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Problem

The app's text editor now has code blocks with colours (sellrika/sellrika#69). On a blog post they showed as plain text with no box.

The cause: the post CSS has .blg-body [style]{color:inherit!important; background:none!important; …}. It cleans the look of text pasted from other pages. It also removed the code colours.

Fix

  • The rule now skips code blocks: .blg-body [style]:not(pre,pre *). Pasted text is still cleaned.
  • .blg-body sets a light set of --code-* colours, so the code box fits the cream page (a beige box with a thin border, darker text colours).
  • Code blocks get the same space below them as a paragraph.
  • Version 1.1.6.

Tests

  • bun test ./blogger/index.test.ts passes.
  • Checked on the dev server: a published post with a Python block shows the light box and the colours.

A rule in the post CSS removed every inline style, to clean text pasted
from other pages. It also removed the colours of the app's new code
blocks. Code blocks now keep their style. The post sets a light set of
--code-* colours that fits the cream page.
@necessarylion
necessarylion merged commit 96f1ed2 into main Nov 7, 2026
1 check passed
@necessarylion
necessarylion deleted the blogger-code-blocks branch November 7, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants