-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Use an SVG image for clipboard instead of unicode character #85118
Conversation
Some changes occurred in HTML/CSS/JS. |
We should really switch to using an SVG sprite sheet for rustdoc icons, so all three icons can be loaded from one file, and so that we can inherit theme colors. |
They currently keep their color, whatever the theme. |
Oh right! Good catch! |
06bf2f9
to
7450f70
Compare
Fixed all the mentionned issues. |
Looks good enough to start, @notriddle do you wanna open an issue about maybe moving to an SVG sprite sheet? I guess the major thing that would need checking is browser compatibility. @bors r+ |
📌 Commit 7450f70 has been approved by |
…laumeGomez Rollup of 4 pull requests Successful merges: - rust-lang#84465 (rustdoc: Implement `is_primitive` in terms of `primitive_type()`) - rust-lang#85118 (Use an SVG image for clipboard instead of unicode character) - rust-lang#85148 (Fix source code line number display and make it clickable again) - rust-lang#85152 (Adjust target search algorithm for rustlib path) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I voluntarily made it bigger actually. XD |
So could you make it smaller again? ;) |
Hmm, I don't see such a small icon on older docs, it looks like it's using system fonts so depends on what font is selected. That said the new icon definitely is a bit bigger, I kinda like something like dropping the border and reducing the opacity (with some kind of hover state). Having an inline "button" border looks quite weird to me. |
Hum... Maybe @jsha has an opinion here? I personally don't mind changing to any of what was suggested so I'm definitely not the good person to pick one. |
I like @Nemo157's proposal with the smallish, unobtrusive icon. |
Giving it a try then! |
…provement, r=jsha Improve display for "copy-path" button, making it more discreet As suggested by `@Nemo157` [here](rust-lang#85118 (comment)): ![Screenshot from 2021-05-18 11-18-49](https://user-images.githubusercontent.com/3050060/118626882-899ddb00-b7cb-11eb-84c5-ef68dee5e351.png) ![Screenshot from 2021-05-18 11-15-06](https://user-images.githubusercontent.com/3050060/118626880-899ddb00-b7cb-11eb-95c1-2f3bacd22374.png) ![Screenshot from 2021-05-18 11-18-54](https://user-images.githubusercontent.com/3050060/118626885-8a367180-b7cb-11eb-870c-7acdf4259bef.png) ![Screenshot from 2021-05-18 11-15-00](https://user-images.githubusercontent.com/3050060/118626877-89054480-b7cb-11eb-9efc-9a0f153964ce.png) ![Screenshot from 2021-05-18 11-18-58](https://user-images.githubusercontent.com/3050060/118626888-8a367180-b7cb-11eb-91bb-47867cd0f2cc.png) ![Screenshot from 2021-05-18 11-19-00](https://user-images.githubusercontent.com/3050060/118626891-8acf0800-b7cb-11eb-9e3d-d2937b361524.png) r? `@jsha`
Linked to rust-lang/docs.rs#1394.
cc @jsha
r? @Nemo157