cldfire / ayu-rs Goto Github PK
View Code? Open in Web Editor NEWCSS for Rustlang websites based on the ST3 theme Ayu
License: Other
CSS for Rustlang websites based on the ST3 theme Ayu
License: Other
See the feature=...
notes. They are styled by default under .stab.portability>code
(for some reason).
Just found out about Manishearth hosting the rustc_private
docs on his site (ex. libsytax which are built using the docs tool. Sound useful? (I added (https://manishearth.github.io/rust-internals-docs/).*
as a regexpr to "Code 3" personally)
After using this theme on Rust docs, I went looking for the original theme for ST3. However, it's quite different to my eyes โ this theme uses slightly darker but (maybe?) more saturated colours. Have you considered upstreaming these changes as a fourth Ayu theme variant? Or releasing it as a new ST3 syntax colour scheme?
Just search for something
It will look like this:
Most UserCSS authors have been moving away from userstyles.org - why? - because they are the same people behind Stylish, which has gone rogue.
It is possible (and recommended) to serve the file directly from the GitHub repo: https://github.com/openstyles/stylus/wiki/UserCSS-authors#hosting-a-usercss
See for yourself here
See here, you need to click on the three dots next to the run button.
This will likely be more work than the playground support, so it's lower priority.
https://doc.rust-lang.org/nightly/std/
When I was checking this new theme, suddenly I felt something up there...
Maybe something like https://userstyles.org/styles/138041/rust-by-example-dark
The most notable issue this is currently causing is the overriding of custom logos for crate docs (https://docs.rs/serenity/0.1.5/serenity/index.html is an example).
As you'll notice on the following screenshot (taken from here), the alert-info
class insert an ugly light blue which conflicts with the dark background. There's also the various btn-*
classes that have the same color issue.
Maybe we can use steal the colors from one of the dark bootswatch themes?
I started work on this last night and should be able to finish up in the next few days.
I am trying to use this theme with cargo doc, but am having issues.
rustdoc --themes
fails to use rustdoc.css, and rustdoc --theme-checker
cites numerous missing rules
$ rustdoc -Z unstable-options --theme-checker ~/src/rustdoc_styles/ayu.css
rustdoc: [theme-checker] Starting tests!
- Checking "/home/evanjs/src/rustdoc_styles/ayu.css"... FAILED
Missing ".stab.internal" rule
Missing ".sidebar-title" rule
Missing ".content .highlighted.fn, .content .highlighted.method, .content .highlighted.tymethod" rule
Missing ".modal-content" rule
Missing ".content .highlighted.trait" rule
Missing "pre.ignore:hover, .information:hover + pre.ignore" rule
Missing ".search-failed a" rule
Missing ".docblock table th" rule
Missing ":target > .in-band" rule
Missing ".content span.union, .content a.union, .block a.current.union" rule
Missing ".content span.primitive, .content a.primitive, .block a.current.primitive" rule
Missing ".modal-content > .whiter" rule
Missing "nav.main .current" rule
Missing ".information > .ignore:hover" rule
Missing ".stab.internal a" rule
Missing "pre.compile_fail:hover, .information:hover + pre.compile_fail" rule
Missing "pre.rust .lifetime" rule
Missing ".content .highlighted.foreigntype" rule
Missing "tr.result span.primitive::after, tr.result span.keyword::after" rule
Missing ".tooltip.ignore" rule
Missing "h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod)" rule
Missing ".content .highlighted.primitive" rule
Missing ".tooltip .tooltiptext::after" rule
Missing ".stab.unstable" rule
Missing "h1.fqn" rule
Missing "h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod)" rule
Missing "nav.main .separator" rule
Missing ".since" rule
Missing "pre.rust .kw" rule
Missing "#titles > div:not(.selected)" rule
Missing ".line-numbers :target" rule
Missing ".modal-content > .close:hover + .whiter" rule
Missing ".collapse-toggle" rule
Missing ".docblock table td" rule
Missing "#titles > div > div.count" rule
Missing ".modal-content > .close:hover" rule
Missing "#crate-search + .search-input" rule
Missing ".modal-content > .close" rule
Missing ".content .highlighted.struct" rule
Missing ".content .highlighted.enum" rule
Missing ".content .highlighted.mod, .content .highlighted.externcrate" rule
Missing ".content .highlighted.keyword" rule
Missing ".content span.keyword, .content a.keyword, .block a.current.keyword" rule
Missing "@media (max-width: 700px)" rule
Missing ".content .highlighted" rule
Missing "pre.rust .kw-2, pre.rust .prelude-ty" rule
Missing ".docblock:not(.type-decl) a:not(.srclink):not(.test-arrow), .docblock-short a:not(.srclink):not(.test-arrow), .stability a" rule
Missing ":target > code" rule
Missing "pre.compile_fail" rule
Missing ".docblock table" rule
Missing ".sidebar .current" rule
Missing "pre.rust .macro, pre.rust .macro-nonterminal" rule
Missing "pre.rust .doccomment" rule
Missing "pre.rust .question-mark" rule
Missing ".toggle-label" rule
Missing ".stab.deprecated" rule
Missing ".content span.constant, .content a.constant, .block a.current.constant, .content span.static, .content a.static, .block a.current.static" rule
Missing ".source .sidebar" rule
Missing ".sidebar" rule
Missing "pre.ignore" rule
Missing ".tooltip.compile_fail" rule
Missing ".stab.portability" rule
Missing ".content .highlighted a, .content .highlighted span" rule
Missing ".content .highlighted.union" rule
Missing "pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .attribute, pre.rust .attribute .ident" rule
Missing ".content .method .where, .content .fn .where, .content .where.fmt-newline" rule
Missing ".important-traits .tooltip .tooltiptext" rule
Missing "#titles > div:hover, #titles > div.selected" rule
Missing ".invisible" rule
Missing ".example-wrap > pre.line-number" rule
Missing ".modal" rule
Missing ".sidebar .version" rule
Missing ".in-band" rule
Missing ".information > .compile_fail:hover" rule
Missing ".content .highlighted.type" rule
Missing ".content .highlighted.attr, .content .highlighted.derive, .content .highlighted.macro" rule
Missing ".content span.foreigntype, .content a.foreigntype, .block a.current.foreigntype" rule
Missing ".content span.attr, .content a.attr, .block a.current.attr, .content span.derive, .content a.derive, .block a.current.derive, .content span.macro, .content a.macro, .block a.current.macro" rule
Missing ".content .highlighted.constant, .content .highlighted.static" rule
Missing "#crate-search" rule
I've also tried the steps listed here, for using cargo doc
, but this also fails.
Input:
RUSTDOCFLAGS="-Z unstable-options --extend-css ~/src/rustdoc_styles/ayu.css" cargo doc
Result:
error: Could not document `void`.
Caused by:
process didn't exit successfully: `rustdoc --crate-name void /home/evanjs/.cargo/registry/src/github.com-1ecc6299db9ec823/void-1.0.2/src/lib.rs --cap-lints allow --color always -o <project_path>/target/doc -L dependency=<project_path>/target/debug/deps -Z unstable-options --extend-css '~/src/rustdoc_styles/ayu.css'` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: option --extend-css argument must be a file
However, removing the apostrophes from --extend-css '~/src/rustdoc_styles/ayu.css'
seems to succeed and does not produce any errors.
Any idea if I'm doing something wrong? Or is this something that needs to go upstream?
From what I remember, this theme is an example of how to do it.
https://userstyles.org/styles/150560/dark-rust-documentation
As pointed out in #23, rustdoc.css
cannot be used by the new theme system in rustdoc. This is because I built the theme to sit on top of the existing rustdoc themes rather than replace them. It would be nice, however, to change this and fully support being integrated into the rustdoc theme system.
The only issue I see with this is that it would result in a greatly increased maintenance burden: any changes to rustdoc's themes would require the same changes to be made to my theme (and rustdoc changes quite a bit).
Anyhow, it's something to consider.
Especially since it is currently unstyled, it would be great to have ayu styling here: https://zulip-archive.rust-lang.org/
I don't know how different the styles from docs.rs are, but I'm sure that this can be improved by supporting it. ๐
Just discovered this website. Quite handy, but it could do with whipping up the theme.
Going to fix this today.
Overriding a theme that wasn't the default (.ace-chrome
) has proved to be far more trouble than it's worth (it's a hassle to remember to change the theme to chrome).
Sometime .ace-chrome
should be replaced by whatever the default theme is.
Can a PR be submitted for the changes that are specified in this issue for Night Mode for Rust Programming Language Blog?
Night Mode
See here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.