-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
rustdoc: kbd style rules #46900
Comments
What prevents you to add your own style in your crate doc? Because I'm not sure to understand why we'd want that... |
cc @rust-lang/docs |
I also prefer the github style. @GuillaumeGomez to me, this is a regular old HTML element; we should give it a decent style. |
👍 for the github style. |
github style looks most like a keyboard key to me, so i'd be favor of that too |
Thank you for your responses <3 what about the rule? Every <kbd> tag or just the ones inside a docblock ? |
I'd say to make it every |
Agreed!
|
I extend a bit my statement: I'm opposed to this add because it'll be used in too few cases to be interesting to grow the CSS files (I could bet on maximum 5 people, which is just way too low). It doesn't bring anything useful enough to justify any new content. Please remember that new content means more maintenance. Adding a CSS rule in your own doc crate is far easier and better for everyone in most cases. If we add such a style for an element which is almost never used, should we add a style for every HTML tag as well? Of course not! This is way too specific and it's up to crates' owners, not to rustdoc. cc @rust-lang/docs |
I may understand your concern, but do not share your opinion. A tag is just a tag, and kbd should be used to represent input from a keyboard and for that it should be visualized as such. It's not about adding bloat to the css, but to give a nice visual hint to the reader, that this is a keyboard input. |
I already mentioned a place where rustdoc can use a |
If the PR does the switch (aka removing dt tag and style). Then it's good for me. As long as it's used by rustdoc, no problem. |
Sure, no problem. Hope you enjoyed it. :)
Try to move all "keys" a bit to the right so all the column seems centered. And add a bit of margin to the right of the "+/-" keys please. |
I'm fine with either.
…On Mon, Jan 15, 2018 at 9:56 AM, Marcel Hellwig ***@***.***> wrote:
I had to change ths overall width of the #help box, because elsewise the
last line would break. I changed the height to auto (can revert that, but I
thought it looks nicer) and added inner padding to the dt section.
Which one do you like more? (center or right aligned)
[image: unbenannt]
<https://user-images.githubusercontent.com/921462/34948151-a30988f8-fa0c-11e7-8b1f-da30854228b7.png>
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#46900 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABsitiB3TWVOUch7HZfyVMhCw9UafPZks5tK2crgaJpZM4RJe_1>
.
|
I have a slight preference for the second one. What about you @QuietMisdreavus? |
I think i like the second one (the centered one) a little more. |
One could also split the + and - keys into different lines
And we wouldn't have the problem with different width of dt tags |
@hellow554: Indeed, great suggestions! |
Latest commit makes it looks like this, I hope you like it :) |
Yep, looks great! With this design: 👍 |
…laumeGomez add kbd style tag to main.css in rustdoc Added css style for kbd tags so they actually look like keys. Result preview and discussion was going on in rust-lang#46900 .
…laumeGomez add kbd style tag to main.css in rustdoc Added css style for kbd tags so they actually look like keys. Result preview and discussion was going on in rust-lang#46900 .
It got merged so it can get closed now. For reference: #46938 |
Hi everyone,
I documented a struct which uses keyboard commands during runtime to do something and I noticed that it looks not as nice as it could be, so I looked around and compared different kbd styles on the internet.
I compare here the github style (A), Stackexchange and Bootstrap (v4)
Which of these styles do you prefer? I would go with the github style, because it's looks nice and clean without any padding. Maybe one could increase the font size.
I would also do a PR, but I wanted to discuss the style before I do that.
So, what are your thoughts? Do you have any different style in mind? To which elements should the rule apply? To all <kbd> tags or just tags inside a
docblock
?The text was updated successfully, but these errors were encountered: