Repository navigation
Blogger 1.1.6: show code blocks with their colours - #11
Merged
Merged
Conversation
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.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.blg-body [style]:not(pre,pre *). Pasted text is still cleaned..blg-bodysets a light set of--code-*colours, so the code box fits the cream page (a beige box with a thin border, darker text colours).Tests
bun test ./blogger/index.test.tspasses.