JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
678 stars 34 forks source link

Improve Markdown inline code styling #481

Open rock3r opened 1 month ago

rock3r commented 1 month ago

Once https://issuetracker.google.com/issues/329052205 is available, we should improve the appearance of inline code spans in Markdown to match expectations.

francisconoriega commented 4 weeks ago

@rock3r even without considering this issue, the current styling seems to be using the wrong fontsize/style:

image
rock3r commented 3 weeks ago

The font size is currently set to defaultTextStyle.size * .85, matching GitHub's CSS:

image

Not sure what the other parts of the style you think are wrong. Could you elaborate?

francisconoriega commented 3 weeks ago

I think it's supposed to be italized, and the background seems to need more padding and rounded corners. But even with that, I still feel that it it is really hard to tell it apart from regular text, and AFAIK I don't suffer from any kind of vision/contrast impairment. (although it also doesn't help that the Jewel Markdown example uses a background that makes it even harder to see the inlined code background in light theme)

Jewel

image

IJ Dark image IJ Light

image

Gitghub markdown:

hello world.

Personally I find this style the easiest to read, but I understand that Jewel is really trying to stick to IJ's style.

image
rock3r commented 3 weeks ago

I suspect the italicisation is a bug in IJ, because it didn't use to be italicised, and it should not be rendered as such (it should only if it's inside of an Emphasis node)

rock3r commented 3 weeks ago

We definitely can iterate on the colours to make it stand out more, though. The font difference alone is pretty visible to me, but we can do better. We need to decide which direction to go in: more GitHub (pink code) or more IJ (grey code)?

rock3r commented 3 weeks ago

Lastly, for testing markdown I'd strongly recommend the Markdown section in the standalone sample, as the bit you look at in the IDE sample is only there to ensure Markdown works in the IDE, but it's by no means complete or meant to be