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

Refactor hideSidebar option #1382

Closed
jhildenbiddle opened this issue Oct 2, 2020 · 2 comments
Closed

Refactor hideSidebar option #1382

jhildenbiddle opened this issue Oct 2, 2020 · 2 comments
Assignees

Comments

@jhildenbiddle
Copy link
Member

Feature request

Refactor the hideSidebar option using a CSS class instead of styles applied directly to HTML elements.

What problem does this feature solve?

The hideSidebar implementation applies styles directly to the <section class="content"> element to override the styles specified in a theme stylesheet. This makes it very difficult for other themes (like docsify-themeable) to support the hideSidebar option properly without resorting to a JavaScript "fix".

How should this be implemented in your opinion?

A better implementation would be to add a class to an appropriate parent element (e.g. <body>) that indicates the sidebar is hidden. This would allow end users and theme authors to use the class as a hook for additional styling and/or behaviors.

Are you willing to work on this yourself?

Yes

@jhildenbiddle
Copy link
Member Author

This change will address jhildenbiddle/docsify-themeable#55.

@jhildenbiddle
Copy link
Member Author

Fixed docsify-themeable issue without requiring changes in docsify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant