Skip to content

Phrase dark mode affecting my whole page. #217

Closed as not planned
Closed as not planned
@Josefnm

Description

@Josefnm

Expected behavior
Should be limited to the phrase elements

Actual behavior
all my articles turn dark grey with white text, as i use less specific styles

Your environment
next js 14 (pages)
next-i18next 15 (i18next 23)
i18next-phrase-in-context-editor-post-processor: 1.7.0
chrome 132
macos 15.1

new PhraseInContextEditorPostProcessor({
  phraseEnabled: true,
  projectId: process.env.NEXT_PUBLIC_PHRASE_PROJECT_ID,
  accountId: process.env.NEXT_PUBLIC_PHRASE_ACCOUNT_ID,
  useOldICE: false,
}),

Steps to reproduce the problem
I assume it would be easyto reproduce, as it seems to be caused these two factors:
this global css:
[data-theme=dark] article {
background-color: #181818;
color: #fff;
}

Setting the pages root html element to:
data-theme="dark"

Image

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