8000 DOC Set word-break as normal against bootstrap directive. by cmarmo · Pull Request #18899 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Set word-break as normal against bootstrap directive. #18899

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

Closed
wants to merge 4 commits into from

Conversation

cmarmo
Copy link
Contributor
@cmarmo cmarmo commented Nov 23, 2020

Reference Issues/PRs

See comment in #18885

What does this implement/fix? Explain your changes.

This pull request set word-break to normal for all the documentation.

Any other comments?

cc @thomasjpfan

Copy link
Member
@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @cmarmo !

@cmarmo cmarmo mentioned this pull request Dec 7, 2020
12 tasks
Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not seem to fix the original problem:

https://127517-843222-gh.circle-artifacts.com/0/doc/modules/model_evaluation.html#multiclass-and-multilabel-classification

By using the firefox inspector, it seems that adding a min-width: 8em to the table.docutils td, table.docutils th class can fix the issue for this table but I am not sure what bad side effect this could have elsewhere.

@ogrisel
Copy link
Member
ogrisel commented Dec 8, 2020

I understand: bootstrap.css has word-break: break-word for any code tag and all the elements of the first column of this table have the double quotes which make them code.

If we were to remove the double quotes for the title of this column, that would remove the code tag and fix the problem I think. We can keep the double quotes for the first column elements of the other lines of the table.

@ogrisel
Copy link
Member
ogrisel commented Dec 8, 2020

Maybe having break-word on code tags is generally good to avoid horizontal scrolling in doctest code snippets.

@cmarmo
Copy link
Contributor Author
cmarmo commented Dec 8, 2020

Thanks @ogrisel: bootstrap hardcodes the word-break for the code tag so the directive should also be overwritten as Thomas did.

@ogrisel
Copy link
Member
ogrisel commented Dec 8, 2020

Thanks @ogrisel: bootstrap hardcodes the word-break for the code tag so the directive should also be overwritten as Thomas did.

I am not so sure (see my previous comments). Maybe what bootstrap does is not a bad idea in general.

Maybe we could add a rule such as:

th code {
   word-break: normal;
}

to keep the break-word for regular code snippets.

@cmarmo cmarmo closed this Dec 8, 2020
@cmarmo cmarmo deleted the css-word-break branch December 8, 2020 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0