Underline links in body text by default #6238
Replies: 2 comments 9 replies
-
Thanks for asking! I agree that it might be worth revisiting whether we should underline all text links, but since customization is absolutely trivial, I don't want to rush this topic and revisit it in the future when we give the theme its next face lift. Currently, IMHO, when you add underline to all links, it leads to much more visual clutter than without the lines. This is my personal opinion and anyone is allowed to disagree. It is not expected that adding the following CSS will break in any way in the foreseeable future, so adding underlines is one of the most trivial customizations one can think of: .md-typeset a {
text-decoration: underline;
} Three lines of code, that's all there is. Thus, please use theme extension for the time being. |
Beta Was this translation helpful? Give feedback.
-
I'm literally using this as a template for an accessibility blog engine. I just noticed the links aren't underlined because it's late at night and my phone is grayscale to encourage me to get offline and go to bed. This is not okay as a default. It should be accessible by default with "it's so easy to override" as the logic to make it less accessible. The number of blind, low vision, and colorblind people out there would astound you, and defaults that aren't accessible are bad defaults that are an insult to users with disabilities. Please reconsider and include this as a sensible default in an upcoming release, I think including the css change in a changelog might be something you could quickly point to if you get complaints. I would hope that people who are fussed about an underline might just as quickly become unfussed if you say "this helps colorblind users, tweak the css if you hate it" and leave it at that. A lot of websites rely on this now and it should be accessible. People are using it because they're quasi technical and don't want to fuss with html and CSS, they just want to write docs. Docs should be readable, and readability includes accessibility. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like Material for MkDocs to underline links in body text by default.
But you can override in CSS!
I know I can override the default "no underlined links" by putting this in the
src/assets/css/style.css
file:It would be best if Material for MkDocs does the accessible thing by default. Also, each time I override something I may mess up something else. When Material for MkDocs updates the link styling later, I may need to fix things again.
Why underlining links is good
Try it yourself
Set your operating system to grayscale, and go to the Material for MkDocs docs site. Click around on some pages. Focus on the body text (the text in the center of the screen, between the sidebars). I find it very hard to discover the links.
Discussion
Can you explain why Material for MkDocs does not underline links by default right now? I'm sure you did this for a reason. 😉
Related discussions
Beta Was this translation helpful? Give feedback.
All reactions