Inline code code → Normal Code
I’ve found this two solutions, both doesn’t works, I’m missing something or something changed in the meantime.
thx in advanced…
Regards.,
The discussion is about making inline code more identifiable. The original poster, hhlp, found two solutions that didn’t work for them. IAmGav suggested checking four settings in admin > settings, but these were for code blocks only.
Ivan_Rapekas provided a CSS solution that works for inline code, but hhlp couldn’t get it to work on their site. JammyDodger confirmed the solution works on their site using the Default Light theme.
Eventually, hhlp found the issue to be a component interfering with the CSS. They then discovered a Discourse component (https://github.com/discourse/discourse-custom-code/tree/main/common) that can be modified to change the inline code formatting without using CSS tweaks. This component can be used to customize both inline code and block-code.
Inline code code → Normal Code
I’ve found this two solutions, both doesn’t works, I’m missing something or something changed in the meantime.
thx in advanced…
Regards.,
I can’t see any diferences:
Default code language → auto
autohlighted languages → a list
show copy button to codeblock → activated
autohighted all code → activated
option not available code-fences.
I can’t install code-fences because is a business plan.
I also adding plain-text to the list…
Regards.,
As OP mentioned, inline code can be highlighted. The method still works:
p>code, li>code {
color: #c7254e;
background: #f9f2f4;
padding: 2px 4px;
border-radius: 2px;
}
Save. Done. Your inline text looks like this: ![]()
this is for code blocks only (picture below). The original question was about inline text
I’ve used the default color schema → light
Regards.,
very glad to works here now, and thx for point me in the right directions, but some problem is here, a component which is apply the them has impediment the source works, when I’ve had a more clear idea was is the component I’ve wrote here.
Regards.,
I’ve found and this is the source:
→ discourse-custom-code/common at main · discourse/discourse-custom-code · GitHub
p > code,
li > code,
pre > code {
color: dark-light-choose($code_light, $code_dark) $i;
background: dark-light-choose($code_background_light, $code_background_dark) $i;
}
you can do it without tweaks CSS, just use that component and modify:
however this works for both inline code and block-code.
Regards.,
Seems the proper link should be Custom Code