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

[docs] no line breaks in sklearn estimators attributes #5073

Closed
jmoralez opened this issue Mar 14, 2022 · 7 comments · Fixed by #5078
Closed

[docs] no line breaks in sklearn estimators attributes #5073

jmoralez opened this issue Mar 14, 2022 · 7 comments · Fixed by #5078
Labels

Comments

@jmoralez
Copy link
Collaborator

Description

The current build for the docs doesn't create line breaks to separate different attributes in the sklearn estimators.

Reproducible example

v.3.2.1
image

v.3.3.0+
image

@jmoralez jmoralez changed the title [docs] no line breaks sklearn estimators attributes [docs] no line breaks in sklearn estimators attributes Mar 14, 2022
@jmoralez jmoralez added the doc label Mar 14, 2022
@StrikerRUS
Copy link
Collaborator

I believe this is due to some changes in sphinx_rtd_theme

- "sphinx_rtd_theme>=0.5"

Probably our patch is related also:

/* Use wider container for the page content */
$('.wy-nav-content').each(function() { this.style.setProperty('max-width', 'none', 'important'); });

@StrikerRUS
Copy link
Collaborator

Probably our patch is related also:

No line breaks after removing the patch.

image

@jmoralez
Copy link
Collaborator Author

I don't know much about HTML and CSS but it seems that the main difference is that in the previous version the properties had the method class:
image
And now there is a property class:
image
And that class sets display: inline-block:
image
which allows items to be on the same line:

Compared to display: block, the major difference is that display: inline-block does not add a line-break after the element, so the element can sit next to other elements. (source)

Removing that property solves the issue:
image

I'm not sure where to make that change though 🤣

@StrikerRUS
Copy link
Collaborator

@jmoralez Thank you very much for investigating this!

I'm not sure where to make that change though 🤣

I can prepare a PR with the fix you've found.

However, I think it worth creating upstream issue in the sphinx_rtd_theme repository describing that new inline-block style for properties makes look them ugly.

@jmoralez
Copy link
Collaborator Author

However, I think it worth creating upstream issue in the sphinx_rtd_theme repository describing that new inline-block style for properties makes look them ugly.

I believe this is the same issue.

@StrikerRUS
Copy link
Collaborator

I guess you're right. Thanks for finding that issue!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants