Skip to content

Fix backticked text styling in pinned issues & commit messages#9159

Merged
fregante merged 3 commits intomainfrom
backt-style
Apr 4, 2026
Merged

Fix backticked text styling in pinned issues & commit messages#9159
fregante merged 3 commits intomainfrom
backt-style

Conversation

@SunsetTechuila
Copy link
Copy Markdown
Member

Test URLs

https://github.com/refined-github/refined-github/issues

7455659

Screenshot

Before image
After image
Before image
After image

/* Style backticked code in links #4817, matches GitHub’s `.markdown-title code` rule */
/* `isCommitList` commit message */
[data-testid='commit-row-item'] code,
.Box-header .commit-author + span code /* `isRepoTree` commit message */ {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Has been outdated for months

@SunsetTechuila SunsetTechuila marked this pull request as ready for review April 4, 2026 17:41
@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 4, 2026

I'm thinking we should move this CSS into parse-backticks, even if technically it's not the same and it can't be disabled via JS.

The core idea is the same: they suck at dealing with backticks. The JS part deals with complete lack of support and this CSS part deals with partial support.

@SunsetTechuila
Copy link
Copy Markdown
Member Author

Then we've to decide which style to use, because they are not the same:

padding: 2px 4px;
background-color: var(
--bgColor-neutral-muted,
var(--color-neutral-muted, fuchsia)
);
font-size: 0.9em;
line-height: 1;
border-radius: 6px;

background-color: var(
--bgColor-neutral-muted,
var(--color-neutral-muted, fuchsia)
);
border-radius: 6px;
font-size: 85%;
margin: 0;
padding: 0.2em 0.4em;

@SunsetTechuila
Copy link
Copy Markdown
Member Author

SunsetTechuila commented Apr 4, 2026

I suppose the style in parse-backticks.css is just outdated

image

@fregante
Copy link
Copy Markdown
Member

fregante commented Apr 4, 2026

They don't need to use the same selector, they just need to be co-located.

Matching the style would be an additional improvement, but the "matching" would have to be "towards GitHub's own style" rather than towards one another.

@fregante fregante merged commit 762fd29 into main Apr 4, 2026
9 checks passed
@SunsetTechuila SunsetTechuila deleted the backt-style branch April 4, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants