Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve quoted code contrast #19522

Open
HarHarLinks opened this issue Oct 27, 2021 · 10 comments
Open

Improve quoted code contrast #19522

HarHarLinks opened this issue Oct 27, 2021 · 10 comments
Assignees
Labels
A11y A-Themes-Official Official themes (light, dark) A-Theming A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Design

Comments

@HarHarLinks
Copy link
Contributor

Steps to reproduce

> `{ "m.server": "matrix-federation.matrix.org:443" }`

Outcome

image

Operating system

arch

Application version

Element Nightly version: 2021102701 Olm version: 3.2.3

How did you install the app?

aur

Homeserver

No response

Will you send logs?

No

@dbkr
Copy link
Member

dbkr commented Oct 27, 2021

This is due to the fact that the domain name has been linkified and so its colour is from being a link rather than any of highlight.js's theme colours. The contrast of the link's blue isn't amazing on the normal dark background but is worse on the lightened background of the code block.

@turt2live
Copy link
Member

The m.server bit in the example is pretty difficult to see too.

@dbkr
Copy link
Member

dbkr commented Oct 27, 2021

Oh wait, the bug you were pointing out was the fact that 'm.server' is grey on grey.

@dbkr
Copy link
Member

dbkr commented Oct 27, 2021

Right, so we need to pick a different colour for our quoted text so it shows up against the lighter background of the code block, or not apply the quote formatting to code blocks, so some such solution.

@dbkr dbkr added A-Themes-Official Official themes (light, dark) A-Theming A-Timeline A11y O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist X-Needs-Design labels Oct 27, 2021
@HarHarLinks
Copy link
Contributor Author

Well, if you feel the link colour could be improved, feel free to do so, but indeed this was mainly intended for the grey on grey on grey. I can imagine that the quote indicating bracket and indentation is plenty and no further styles need be applied for quoted code. The indentation is additionally clear as code blocks have a background which in a quote would be indented as a whole.
You should probably create an example code snippet that uses all possible colors and half-manually test that in the official skins now and then. Themers could probably also profit from that.

@germain-gg
Copy link
Contributor

Fixed as part of matrix-org/matrix-react-sdk#11079

Screenshot 2023-07-19 at 09 11 30

@HarHarLinks
Copy link
Contributor Author

@germain-gg:

Fixed as part of matrix-org/matrix-react-sdk#11079
Screenshot 2023-07-19 at 09 11 30

is it really though?

on Element version: 1.11.36 we had
image
image

meanwhile on develop right now Version von Element: 2753bc9-react-19d927f497be-js-f77662406c68 (assuming 11079 made it in there)
image
image

I'd almost argue the situation for light mode has regressed here. For dark mode, it may have changed slightly for the better but still doesn't feel great.

What do you think about a route similar to the one the new matrix.org goes:
image

I'm not saying that you should style element's code highlighting red (it's a bit strage on matrix.org really), but maybe for quoted code blocks, you could have just the outline and not modify the text background?
image
image

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jul 21, 2023

@HarHarLinks, I'd say that the “improved” versions, per your screenshots, are noticeably more difficult to parse.

@HarHarLinks
Copy link
Contributor Author

@HarHarLinks, I'd say that the “improved” versions, per your screenshots, are noticeably more difficult to parse.

@RokeJulianLockhart please clarify: which one do you mean by the "improved" version? 2753bc9-react-19d927f497be-js-f77662406c68/matrix-org/matrix-react-sdk#11079 or my suggestion with outlines at the end?

@germain-gg germain-gg reopened this Aug 7, 2023
@germain-gg germain-gg self-assigned this Aug 7, 2023
@RokeJulianLockhart
Copy link

#19522 (comment)

@HarHarLinks,

dark
light

is the best design (Element 1.11.36's). I don't like the redesign nor your version, since the contrast it much worse for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11y A-Themes-Official Official themes (light, dark) A-Theming A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Design
Projects
None yet
Development

No branches or pull requests

5 participants