| Age | Commit message (Collapse) | Author | Lines |
|
Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
|
|
The change in opacity is inconsistent with most of rustdoc, which uses
default browser styles for the focus outline. Unfortunately, just using
the default focus outline here won't work, because it gets applied to
the summary itself instead of the pseudo-element "real button."
|
|
|
|
rustdoc: remove redundant CSS `a.test-arrow:hover`
In 4b402dbe690dd00f567542ca9e41042826a168b5, when this rule was added, it was overriding a rule that made all links in docblock get an underline when hovered. This became redundant when, after reordering the rules, 7585632052298f9c84cc12ac5afcb23786ae1d3d changed the pro-underline rule to exclude the test-arrow link anyway.
|
|
r=GuillaumeGomez
rustdoc: remove unused `.sidebar-logo` DOM on source pages
|
|
In 4b402dbe690dd00f567542ca9e41042826a168b5, when this rule was added, it
was overriding a rule that made all links in docblock get an underline when
hovered. This became redundant when, after reordering the rules,
7585632052298f9c84cc12ac5afcb23786ae1d3d changed the pro-underline rule to
exclude the test-arrow link anyway.
|
|
|
|
This change converts the element from an `<a>` link to a button. It's
pretty much directly trading slightly more CSS for slightly less HTML, and
it's also semantically correct (so you don't get a broken "bookmark" option
when you right click on it).
While doing this, I also got rid of the unnecessary `class="inner"`
attribute on the inner span. There was a style targeting
`.collapse-toggle > .inner`, but no CSS ever targeted the
`#toggle-all-docs > .inner`.
|
|
|
|
This rule, added in 49e6db7f3510a99ab3d3723b2430add985629c39, overrode a
rule in normalize.css.
https://github.com/rust-lang/rust/blob/49e6db7f3510a99ab3d3723b2430add985629c39/src/librustdoc/html/static/normalize.css#L169-L175
When normalize.css was updated, this rule went away.
https://github.com/necolas/normalize.css/commit/a8edd0c5aa06b905e8e1550fd6a5c01e46375194
|
|
notriddle:notriddle/code-header-border-bottom-none, r=GuillaumeGomez
rustdoc: remove no-op CSS `.code-header { border-bottom: none }`
The code headers are always h3 or h4, which don't have border-bottom by default anyway.
|
|
The code headers are always h3 or h4, which don't have border-bottom by
default anyway.
|
|
It was added to the CSS in d8de2b4c338471aacaf0e8a096f9a7148b146ab4, but
was never actually used in that PR.
|
|
rustdoc: remove unused CSS `.out-of-band { font-weight: normal }`
This CSS was added in 083c3952e0d5473cd5c41a9eb7b4ffca18cc8e5f to normalize the appearance of out-of-band elements that were nested directly below headers.
Now, the only use of `out-of-band` is in the main page header, and it is nested below a wrapper, not the `<h1>` itself.
|
|
This CSS was added in 083c3952e0d5473cd5c41a9eb7b4ffca18cc8e5f to
normalize the appearance of out-of-band elements that were nested directly
below headers.
Now, the only use of `out-of-band` is in the main page header, and it is
nested below a wrapper, not the `<h1>` itself.
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: improve appearance of source page navigation bar
This commit changes things so that the search bar is exactly centered between the top of the page and the top of the source code content area.
Preview: https://notriddle.com/notriddle-rustdoc-demos/source-page-header/src/std/lib.rs.html
## Before

## After

|
|
+/- shortcut now only expand/collapse, not both
Fixes https://github.com/rust-lang/rust/issues/102772.
r? ```@notriddle```
|
|
This commit changes things so that the search bar is exactly centered between
the top of the page and the top of the source code content area.
|
|
|
|
r=GuillaumeGomez
rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`
This rule originated as a `font-size: 16px`, when body had `font-size: 13px` set in 4fd061c426902b0904c65e64a3780b21f9ab3afb.
It remained even when body's font size was bumped up to 16px, 4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was carried forward when it was converted to 1rem in cc18120425a5c571a968d850c75cc935a8321136.
|
|
Fix item declaration highlighting
Fixes https://github.com/rust-lang/rust/issues/103050.
As mentioned in the issue, https://github.com/rust-lang/rust/pull/102924 introduced this regression. This PR partially reverts it and adds a regression test.
r? `@notriddle`
|
|
This rule originated as a `font-size: 16px`, when body had `font-size: 13px`
set in 4fd061c426902b0904c65e64a3780b21f9ab3afb.
It remained even when body's font size was bumped up to 16px,
4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was
carried forward when it was converted to 1rem in
cc18120425a5c571a968d850c75cc935a8321136.
|
|
rustdoc: move `setting-line` color CSS to settings.css
|
|
rustdoc: remove class name `location` from sidebar sibling nav
Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-location/std/vec/struct.Vec.html
This change tweaks the CSS to apply most of its styles to `.sidebar h2`, cleaning up a few redundant rules from `.mobile-topbar .location` and restoring useful navigation aids in mobile mode.
## Before

## After

|
|
|
|
|
|
This change tweaks the CSS to apply most of its styles to `.sidebar h2`,
cleaning up a few redundant rules from `.mobile-topbar .location` and
restoring useful navigation aids in mobile mode.
|
|
Since it's possible to have a 700.5px viewport width, the JS needs to not
switch to mobile mode in such a setup.
|
|
The two rules within it can and should be done without the separate
media query:
* There ain't no rule saying a viewport can't be `700.5px` wide, since
hardware pixels can be finer than CSS pixels.
* The rule for the first example-wrap child should probably apply
on mobile.
* The rule for the source sidebar is overriden by the mobile rule
setting `max-width: 100vw`, so it can be merged with the rest
of the styles.
|
|
rustdoc: remove redundant CSS `#crate-search { border-radius }`
This is the same border-radius that's always set on that ID:
https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
|
|
notriddle:notriddle/copy-path-settings-help-button, r=GuillaumeGomez
rustdoc: remove redundant CSS on `#copy-path`
The border and background were removed in 5d004c1e2020eaa9bc336f09b6b0475c0eef4d78, but not all the CSS was.
|
|
This is the same border-radius that's always set on that ID:
https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
|
|
The border and background were removed in
5d004c1e2020eaa9bc336f09b6b0475c0eef4d78, but not all the CSS was.
|
|
https://github.com/rust-lang/rust/pull/98775#issuecomment-1172728308
|
|
* Since it's used exclusively on source pages, no need to explicitly
select.
* No need to hide it when the sidebar is open, since it fills the whole
page.
|
|
rustdoc: make the help button a link to a page
This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.
Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
|
|
|
|
|
|
This allows you to open the help section in a new browser tab, which is a
pretty reasonable thing to want for a documentation page.
|
|
|
|
r=GuillaumeGomez
rustdoc: remove unused CSS `.search-container > *`
The two items it was really intended to target were the buttons, and those both need to have the style set directly on them anyway because the buttons are both child elements of wrappers.
https://github.com/rust-lang/rust/blob/6b3ede3f7bc502eba7bbd202b4b9312d812adcd7/src/librustdoc/html/static/css/rustdoc.css#L1406-L1411
|
|
GuillaumeGomez:migrate-css-highlight-without-change, r=notriddle
Migrate css highlight without change
This is a "previous" version of https://github.com/rust-lang/rust/pull/102663: only migrating to CSS variables, no changes. It's a bit more verbose because rules are not coherent between themes.
r? ``@notriddle``
|
|
The two items it was really intended to target were the buttons, and those
both need to have the style set directly on them anyway because the buttons
are both child elements of wrappers.
|
|
rustdoc: merge separate `.item-info` CSS
Rough timeline:
* The longer `.content .item-info` selector originated in 110e7270ab7b0700ce714b8b1c7e509195dea2c4. No reason seems to be given in the PR why it needed the `.content` part, but it was probably added because of <https://github.com/rust-lang/rust/blob/110e7270ab7b0700ce714b8b1c7e509195dea2c4/src/librustdoc/html/static/rustdoc.css#L476-L478>. That selector with the margin-bottom was removed when CSS containment was added in 8846c0853d8687fda0e5f23f6687b03b243980ee.
* `.stability` was renamed `.item-info` in caf6c5790a858893c1d32ed2054c9577d12e7493.
* The selector without the `.content` was added in d48a39a5e24ab08f727d1c919dc2af98c333ad14.
|
|
Rough timeline:
* The longer `.content .item-info` selector originated in
110e7270ab7b0700ce714b8b1c7e509195dea2c4. No reason seems to be given in
the PR why it needed the `.content` part, but it was probably added because
of <https://github.com/rust-lang/rust/blob/110e7270ab7b0700ce714b8b1c7e509195dea2c4/src/librustdoc/html/static/rustdoc.css#L476-L478>.
That selector with the margin-bottom was removed when CSS containment
was added in 8846c0853d8687fda0e5f23f6687b03b243980ee.
* `.stability` was renamed `.item-info` in
caf6c5790a858893c1d32ed2054c9577d12e7493.
* The selector without the `.content` was added in
d48a39a5e24ab08f727d1c919dc2af98c333ad14.
|
|
rustdoc: remove unused CSS `nav.sum`
This was added in 4fd061c426902b0904c65e64a3780b21f9ab3afb, but never actually used.
|
|
|
|
This was added in 4fd061c426902b0904c65e64a3780b21f9ab3afb, but never
actually used.
|