Skip to content

[doc] improve the documentation to be clear about the dark selector #17944

Open
@its-dibo

Description

@its-dibo

in the docs it stated that the option darkModeSelector determines the class that is used for the dark mode, it means if the class exists the dark mode is applied, but this is not sufficient for the dark mode to be applied, the class must exist exclusively in <HTML> element, not any other element, which is not stated in the docs

toggleTheme(){
  document.body.addClass('.dark-theme') 
}

this will not switch to the dark mode, as the dark class is added to <body>, not <HTML>

Metadata

Metadata

Assignees

Labels

Component: DocumentationIssue or pull request is related to Documentation

Type

No type

Projects

Status

Review

Relationships

None yet

Development

No branches or pull requests

Issue actions