-25

I much prefer the colored highlighting that was applied to 'code' before about a week ago.

Is there a way to re-enable that? Or configure the pages to work with a different CSS? Or something else?

I feel that my answers are not as pointed when code does not stand out as much as it used to. The coloring seems to have been removed.

31
  • 3
    What do you mean? What code is missing syntax highlighting?
    – E_net4
    Commented Mar 21, 2022 at 18:30
  • 2
    Syntax highlighting works perfectly fine in Firefox Nightly 100.0a1. What browser are you using? Does it work without extensions? Is there an error in the browser console or the Network tab? Commented Mar 21, 2022 at 18:31
  • 2
    I didn't realize it had changed. Different colors are used for the same syntax highlighting now than were used a week ago? This is not how you see "your answers" styled? (Dark mode notwithstanding)
    – yivi
    Commented Mar 21, 2022 at 18:31
  • 1
    Syntax highlighting colors have not been removed.
    – yivi
    Commented Mar 21, 2022 at 18:33
  • @E_net4standswithUkraine - I found the coloring to be useful. I am using Chrome 99.0.4844.74 . I played with "accessibility", but thought I turned it all off.
    – Rick James
    Commented Mar 21, 2022 at 18:35
  • 2
    Syntax highlighting has not been removed. See the linked screesnhot in my previous comment. Something may be wrong in your setup.
    – yivi
    Commented Mar 21, 2022 at 18:36
  • @SebastianSimon FWIW nightly builds of browsers are not officially supported because they are not officially released, so it is not particularly helpful to check on those browsers for if something is still working or not.
    – TylerH
    Commented Mar 21, 2022 at 18:36
  • 1
    I think the issue is on Dark mode where the highlight for inline codes has too low contrast compared to the background, though I can't remember what it looked like before...
    – Andrew T.
    Commented Mar 21, 2022 at 18:40
  • 1
    Maybe, @AndrewT. Yet, I can see inline code perfectly with dark mode (cln.sh/IGelOP). And the OP mentions "coloring", which seem to be more pertinent for multiline code blocks than for inline code formatting.
    – yivi
    Commented Mar 21, 2022 at 18:42
  • 1
    @RickJames Did you see my screenshot? It shows the word "code" on a grey background. Is this what you see or not? Which browser are you on? Which theme do you use? Can you provide a screenshot?
    – VLAZ
    Commented Mar 21, 2022 at 18:49
  • 7
    Without a screenshot, I'm afraid there isn't much to say here. As a shot in the dark, you do not happen to mean the code you see in t this answer, don't you?
    – yivi
    Commented Mar 21, 2022 at 19:18
  • 9
    You are not providing the minimum for other users to be able to help you: a screenshot showing the issue, a link to a post where you experience it, etc. Worse, other users commented/answered with screenshots of their own, and you didn't say if these replicate or not your experience. For that, some users find the question "not useful", and probably voted accordingly.
    – yivi
    Commented Mar 21, 2022 at 19:19
  • 1
    @RickJames Yes, what about it? Looks normal. That’s the screenshot that VLAZ provided earlier. You have yet to provide your own screenshot. Commented Mar 21, 2022 at 19:26
  • 3
    An inline piece of code with the text "code" (code) was never really highlighted in any special way AFAIK.
    – E_net4
    Commented Mar 21, 2022 at 19:26
  • 6
    @RickJames By the way, you still haven’t addressed two of my three questions from my first comment: “Does it work without extensions? Is there an error in the browser console or the Network tab?” Commented Mar 21, 2022 at 19:36

1 Answer 1

6

I can't reproduce this report. This is what your code looks like in your most recent answer in dark mode, which looks like it's working just fine, at least.

screenshot of an answer showing clear code coloring/syntax highlighting in a dark-mode answer

Be aware that sometimes you may need to explicitly state the language that needs to be used. If the system can't automatically detect which language it is, it won't apply any syntax highlighting. You can do this with the code fences (e.g. " ```php") or the old-school method (<!-- language: lang-php -->).

Also keep in mind that when editing a post, the preview will lose syntax highlighting whenever you start typing or making changes. You'll need to stop and wait a few seconds for the syntax highlighting to show up in the preview again.

Not the answer you're looking for? Browse other questions tagged .