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

Blank right side border in table generated by rustdoc in Firefox #58134

Closed
tesuji opened this issue Feb 4, 2019 · 10 comments
Closed

Blank right side border in table generated by rustdoc in Firefox #58134

tesuji opened this issue Feb 4, 2019 · 10 comments
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Feb 4, 2019

Edit: Add test code in metadata.


It is ugly in my crate (not public yet), see below image displayed in Firefox:

image

but in Chromium:

image

At least in Chromium, the right side border of the table is displayed.

I tested in both 1.31.0, 1.32.0 and 1.34.0-nightly (852701a 2019-02-01), those have the same effect. I didn't test previous versions because I'm using Rust 2018.

Metadata

OS and software info

OS: Xubuntu 18.04.1
Browser: Firefox 65.0 (All extensions are disabled)

Rustdoc:

% rustdoc -Vv
rustdoc 1.32.0 (9fda7c223 2019-01-16)
binary: rustdoc
commit-hash: 9fda7c2237db910e41d6a712e9a2139b352e558b
commit-date: 2019-01-16
host: x86_64-unknown-linux-gnu
release: 1.32.0
LLVM version: 8.0
Build with below code to test locally with `rustdoc`
/// Tone (thanh điệu), which also called "accent", lists all possible
/// tones in Vietnamese.
///
/// These tones are:
///
/// Tone        | Example
/// ------------|--------
/// None        | a
/// Grave       | à
/// Acute       | á
/// Hook above  | ả
/// Tilde       | ã
/// Dot below   | ạ
#[derive(Debug, PartialEq)]
pub enum Tone {
    // Thanh bằng hoặc không dấu
    None = 0,
    // Thanh huyền
    Grave,
    // Thanh sắc
    Acute,
    // Thanh hỏi
    HookAbove,
    // Thanh ngã
    Tilde,
    // Thanh nặng
    DotBelow,
}
@memoryruins
Copy link
Contributor

Do the tables render without the right side border on
https://doc.rust-lang.org/nightly/std/collections/index.html?


Some screenshots from my laptop / desktop:

Firefox 64.0 / Arch Linux

unknown

Firefox 65.0 / Windows 10

screenshot 4550

Firefox Nightly 67.0a1 (2019-02-03) / Windows 10

screenshot 4551


Although I wasn't able to recreate the blank side, only Firefox Nightly rendered the table to expectations (there are slight offsets in previous versions).

@tesuji
Copy link
Contributor Author

tesuji commented Feb 4, 2019

No, it has the right side border (with a slight offset):

image

@tesuji tesuji changed the title Ugly table generated by rustdoc in Firefox Blank right side border in table generated by rustdoc in Firefox Feb 4, 2019
@memoryruins
Copy link
Contributor

Unable to test it locally currently, but one difference is that the tables on collections’ page has borders in the markdown as well. Does it make any difference by adding them? It doesn’t make a difference on github markdown, but worth a shot.

//! ## Sequences
//!
//! |                | get(i)         | insert(i)       | remove(i)      | append | split_off(i)   |
//! |----------------|----------------|-----------------|----------------|--------|----------------|
//! | [`Vec`]        | O(1)           | O(n-i)*         | O(n-i)         | O(m)*  | O(n-i)         |
//! | [`VecDeque`]   | O(1)           | O(min(i, n-i))* | O(min(i, n-i)) | O(m)*  | O(min(i, n-i)) |
//! | [`LinkedList`] | O(min(i, n-i)) | O(min(i, n-i))  | O(min(i, n-i)) | O(1)   | O(min(i, n-i)) |

@tesuji
Copy link
Contributor Author

tesuji commented Feb 4, 2019

@memoryruins I added left and right borders, and even when using module document
syntax //!, nothing is different.

@memoryruins memoryruins added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 4, 2019
@GuillaumeGomez
Copy link
Member

@lzutao Please make your code available somewhere so I can test it because I can't reproduce it...

@tesuji
Copy link
Contributor Author

tesuji commented Feb 4, 2019

@GuillaumeGomez I updated the issue details.

@memoryruins
Copy link
Contributor

memoryruins commented Feb 4, 2019

I was able to recreate something similar with your example:

Toggle the light/dark theme off and on a bit.
image

The right border will retain the black border on light theme and vice versa:
image
image

Recreated on the collections page (only on the sequences box in this screenshot).
image

If I resize the page after the border glitches, the border goes back to normal (most likely due to media queries).
image

Did you switch themes before opening the issue? Does resizing make any difference?

@tesuji
Copy link
Contributor Author

tesuji commented Feb 4, 2019

Did you switch themes before opening the issue?

I switched themes, but nothing changes.

Does resizing make any difference?

Yes! Resizing to < 100% or to 110%, it will display the border

Click to display the image

image

but to 120%, the border disappeared.

@GuillaumeGomez GuillaumeGomez self-assigned this Feb 10, 2019
@tesuji
Copy link
Contributor Author

tesuji commented Feb 10, 2019

Missing a cell?

image

Doc source
/// Each Vietnamese monosyllabic word can be decomposed at most into 4 parts,
/// which are:
///
/// 1. The initial group of consonants
/// 1. The vowel group
/// 1. The group of final consonants
/// 1. The tonal accent
///
/// # Examples
///
/// Word            | Consonant | Vowel | Consonant | Accent
/// --------------- | --------- | ----- | --------- | ------
/// trường (school) | tr        | ươ    | ng        | Grave
/// muối (salt)     | m         | uôi   |           | Acute
/// ao (the pond)   |           | ao    |           |

@GuillaumeGomez
Copy link
Member

Interesting! I was about to look into it. I'll do the two at once.

kennytm added a commit to kennytm/rust that referenced this issue Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants