| Age | Commit message (Collapse) | Author | Lines |
|
The module-item and import-item classes are attached to the item-left.
Just target that, instead.
|
|
r=GuillaumeGomez
rustdoc: remove redundant CSS `.import-item .stab { font-size }`
This sets the exact same font size that `.stab` has by default anyway. It used to be slightly different, but dd5ff428edbc7cd4fa600b81f27bbec28589704f made it identical.
|
|
This sets the exact same font size that `.stab` has by default anyway.
It used to be slightly different, but
dd5ff428edbc7cd4fa600b81f27bbec28589704f made it identical.
|
|
r=GuillaumeGomez
rustdoc: simplify CSS selectors on top-doc and non-exhaustive toggles
This code uses a special `hideme` class anyway, so just style that.
|
|
r=GuillaumeGomez
rustdoc: remove no-op mobile CSS `.sidebar { margin: 0; padding: 0 }`
This isn't overriding anything, because the sidebar never has a margin or padding on it.
|
|
Fix UI issues with Rustdoc scrape-examples feature.
A few regressions have been introduced into scrape-examples in the last few months. This commit fixes those regressions:
* Help file was being loaded from the wrong place (introduced in f9e1f6ffdf03ec33cb29e20c88fc7bcc938c7f42).
* CSS selector in JS has a typo (introduced in 14897180ae6a0506a5ad0a9f6a30ae1f75916179).
* Line numbers in scraped example code snippets are overflowing (not sure if this was ever fixed). Changing from flexbox to grid display fixed this issue.
|
|
This code uses a special `hideme` class anyway, so just style that.
|
|
This isn't overriding anything, because the sidebar never has a margin or
padding on it.
|
|
r=GuillaumeGomez
rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`
|
|
|
|
r=GuillaumeGomez
rustdoc: clean up help and settings button CSS
The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically.
Preview: http://notriddle.com/notriddle-rustdoc-demos/flexbox-help-settings-buttons/test_dingus/
|
|
r=GuillaumeGomez
rustdoc: use simpler CSS for setting the font on scraped examples
|
|
r=notriddle
Migrate summary toggle filter to CSS variable
r? `@notriddle`
|
|
The old version of this code specified a bunch of different numbers that had
to line up just right to get the size it wanted. This version uses flexbox
centering, specifies the font size, and lets the browser figure out the
rest of the layout automatically.
|
|
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: remove redundant CSS `div.desc { display: block }`
DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
|
|
rustdoc: clean up sidebar link CSS
Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on.
Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
|
|
rustdoc: add comment to confusing CSS `main { min-width: 0 }`
This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the reason why it was necessary was unclear. This comment makes it clear.
|
|
DIV tags have block display by default. It is from when this rule
used to target a SPAN tag, but became redundant in
4bd6748bb9b73c210558498070ae0b7ed8193ddf.
|
|
Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes
no sense to try to apply it to links with `overflow-wrap: anywhere`, because
it can't actually make ellipses when that's turned on.
Simplify the selector for the 25rem left padding on sidebar links, to match
up with the style for the container left padding that makes room for it.
|
|
This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the
reason why it was necessary was unclear. This comment makes it clear.
|
|
|
|
rustdoc: remove `fnname` CSS class that's styled exactly like `fn`
It's not obvious why this was ever a separate class name, since even in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added, it was styled identically to regular `fn` links.
|
|
It's not obvious why this was ever a separate class name, since even
in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added,
it was styled identically to regular `fn` links.
|
|
|
|
* Help file was being loaded from the wrong place.
* CSS selector in JS has a typo.
* Line numbers are overflowing, change to display: grid to fix.
|
|
r=GuillaumeGomez
rustdoc: use flexbox CSS to align sidebar button instead of position
This accomplishes the same thing with significantly less code.
Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-toggle-flexbox/src/test_dingus/lib.rs.html
|
|
rustdoc: remove no-op CSS `#help dt { display: block }`
`display: block` is the [default UA style] for dt.
[default UA style]: https://html.spec.whatwg.org/multipage/rendering.html#lists
|
|
This accomplishes the same thing with significantly less code.
|
|
`display: block` is the [default UA style] for dt.
[default UA style]: https://html.spec.whatwg.org/multipage/rendering.html#lists
|
|
text #fff on background #fdffd3 fails the [WCAG color contrast checker], and
seems like a mistake in 16b55903ee16503e7026677c169727d1907704c2.
[WCAG color contrast checker]: https://accessibleweb.com/color-contrast-checker/
|
|
It's misleading unless it gets changed to respond to being clicked.
|
|
r=notriddle
Migrate source code elements style to CSS variables
r? ``@notriddle``
|
|
|
|
r=GuillaumeGomez
rustdoc: simplify `.search-results-title` CSS
By using `display: flex`, we still get the never-wrapping layout with `#crate-search-div` maxing out and truncating its text. The title itself winds up always filling its parent, but since `#crate-search` doesn't have `flex-grow` set, it won't fill available space.
|
|
r=notriddle
Small accessibility improvements
From this [reddit post](https://www.reddit.com/r/rust/comments/z1gyz7/accessible_documentation/), I started to check a bit how to improve accessibility and how we could add test for it.
So these two fixes come from the use of the [pa11y tool](https://github.com/pa11y/pa11y). To make it work, I had to update its puppeteer version to the last one but otherwise it seems to be quite nice. I didn't fix all the errors it reported because they were about colors. To get the same result as mine, you can use this config:
```json
{
"ignore": [
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail",
"WCAG2AA.Principle3.Guideline3_2.3_2_2.H32.2"
]
}
```
I think trying to improve accessibility is something we should definitely aim for. I'll try to integrate a tool to enforce this check (very likely `pa11y`) directly into the CI.
cc ``@jsha``
r? ``@notriddle``
|
|
By using `display: flex`, we still get the never-wrapping layout with
`#crate-search-div` maxing out and truncating its text. The title itself
winds up always filling its parent, but since `#crate-search` doesn't have
`flex-grow` set, it won't fill available space.
|
|
r=GuillaumeGomez
rustdoc: give struct fields CSS `display: block`
Fixes #104737
|
|
* Set aria-label attribute on search input
* Put anchor text directly into the DOM and not in the CSS
|
|
|
|
Since this box is absolutely positioned, its display type is [blockified]
anyway. We just need to make sure it isn't `display: none`.
[blockified]: https://www.w3.org/TR/css-display-3/#transformations
|
|
Since this box is absolutely positioned, its display type is [blockified]
anyway. We just need to make sure it isn't `display: none`.
[blockified]: https://www.w3.org/TR/css-display-3/#transformations
|
|
r=notriddle
Migrate alias search result to CSS variables
r? `@notriddle`
|
|
|
|
|
|
Migrate kdb style to CSS variables
r? `@notriddle`
|
|
r=GuillaumeGomez
rustdoc: use real buttons for scrape examples controls
This makes the expand and switch controls keyboard-accessible.
Preview: https://notriddle.com/notriddle-rustdoc-demos/scrape-examples-button/test_dingus/fn.test.html
|
|
|