bitwarden / bitwarden/clients

`aaccd8d` permits `gitee.com`'s `invert()` to override BW's CSS.

Open
#20,971 3 comments 0 reactions 0 assignees View on GitHub
browser bug
Dominant language
TypeScript
Stars
13.8k
Forks
2k
Avg merge
3d 9h
Merged PRs (30d)
397

Description

### Steps To Reproduce

~~~JS
#!/usr/bin/env xdg-open
window.location.assign('https://gitee.com/login');
window.querySelector('.js-email-input').click();
window.querySelector('.inline-menu-button').click();
~~~

### Expected Result

`#mainPopupSet` should not invert.

### Actual Result

This erroneously appears to cause it to render as if `prefers-color-scheme: light`, when, globally, `color-scheme: light dark`, with `prefers-color-scheme: dark`, inherited from `org.freedesktop.appearance.color-scheme`:

Image

### Operating System

Linux

### Operating System Version

1.

~~~sh
#!/usr/bin/env sh
cat /etc/os-release | jc --ini | jq 'with_entries(.value |= (if type=="string" and test("^[0-9]+$") then tonumber else . end))| {NAME, VARIANT, VERSION_ID}' | yq -P
~~~

1.

~~~YAML
NAME: Fedora Linux
VARIANT: KDE Plasma Desktop Edition
VERSION_ID: 44
~~~

### Web Browser

Firefox

### Browser Version

1.

~~~sh
#!/usr/bin/env sh
rpm -qf "$(command -v firefox-nightly)" \
--queryformat "$(
cat <<'EOF'
Name: %{NAME}
Version: %{VERSION}
Release: %{RELEASE}
Architecture: %{ARCH}
Install Date: %{INSTALLTIME:date}
Size: %{SIZE}
Signature: %{SIGPGP:pgpsig}
Source RPM: %{SOURCERPM}
Build Date: %{BUILDTIME:date}
Build Host: %{BUILDHOST}
Packager: %{PACKAGER}
Vendor: %{VENDOR}
EOF
)"$'\n' | yq -P
~~~

1.

~~~YAML
Name: firefox-nightly
Version: 153.0a1
Release: 20260530231809
Architecture: x86_64
Install Date: Mon 01 Jun 2026 01:11:11 BST
Size: 389297235
Signature: (none)
Source RPM: firefox-nightly-153.0a1-20260530231809.src.rpm
Build Date: Sun 31 May 2026 11:12:44 BST
Build Host: 7223a3f8a03f
Packager: (none)
Vendor: Mozilla
~~~

### Environment Versions

1.

~~~JS
#!/usr/bin/env firefox-nightly
window.location.assign(`moz-extension://${UUID}/popup/index.html#/about`);
window.querySelector('bit-item.tw-block:nth-child(1) > bit-item-action:nth-child(1) > button:nth- child(1)').click();
window.querySelector('button.ng-tns-c3286894130-3:nth-child(2)').click();
~~~

1.

~~~YAML
Version: 2026.4.0
SDK: 'main (aaccd8d)'
Server version: 2026.5.0
~~~

### Issue Tracking Info

- [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by opening the Gitee login flow and interacting with the menu, then inspect the browser extension popup entry point at popup/index.html and the styling affecting #mainPopupSet. Done means the popup no longer renders as light or inverts when the system prefers dark color-scheme settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.