Skip to content

Refactor hideSidebar option #1382

Closed
Closed
@jhildenbiddle

Description

@jhildenbiddle

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions