Skip to content
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: clean up docblock table CSS #105442

Merged
merged 2 commits into from
Dec 9, 2022

Commits on Dec 8, 2022

  1. rustdoc: clean up docblock table CSS

    * The rule `display: block` had no noticeable effect. Technically, because
      markdown tables have a tbody and thead, they get wrapped in an [anonymous
      table box] in the CSS tree, nested within the `<table>` element's block
      layout box.
    
      This rule was added in rust-lang#87230 to make the table side-scrolling, but
      this same issue was doubly fixed in rust-lang#88742 by wrapping it in an explicit
      `<div>` tag. Since accessibility advocates recommend the wrapper div over
      marking the table as `display: block`, we'll stick with that.
    
      https://adrianroselli.com/2020/11/under-engineered-responsive-tables.html
    
    * The rule `width: calc(100% - 2px)` had no visible effect, because the
      anonymous table box was not affected.
    
    * The style is tweaked to basically be the same style GitHub uses.
      In particular, it adds zebra stripes, and removes dotted borders.
    
    [anonymous table box]: https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes
    notriddle committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    a09e8c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    34700f6 View commit details
    Browse the repository at this point in the history