Open hellow554 opened 6 years ago
TIL about this tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
I can't resist. I'm sorry.
As mentioned on MDN, a "proper" kbd
tag style would actually use <kbd><kbd>A</kbd></kbd>
for key presses, but nobody writes their CSS to style that properly: A. And the HTML spec itself was even inconsistent in its own use of the tag: https://github.com/whatwg/html/pull/2363
...but pragmatically, GitHub, StackExchange, etc. all (incorrectly!) style the single <kbd>
as a button, so you might as well follow suit :(
...but pragmatically, GitHub, StackExchange, etc. all (incorrectly!) style the single
<kbd>
as a button, so you might as well follow suit :(
When the implementation becomes the spec. Maybe being able to handle them both properly would probably be best.
I'd like to see
<kbd>A</kbd>
tags to be formatted like "real" keys, e.g. here on github A or like on stackexchange or in any other possible way :)