Skip to content

Added dark theme support in style.scss: improves contrast and readability #227

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

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

Yogi-Codes
Copy link
Contributor

This PR adds dark theme support to the zaproxy/browser-extension.

Changes Made:

  • Updated style.scss to define custom dark mode colors
  • Improved contrast for better readability
  • Addressed white text appearing on white background in dark mode

Fixes:

Fixes #225

@psiinon
Copy link
Member

psiinon commented Jul 15, 2025

Logo
Checkmarx One – Scan Summary & Details5f51730e-f66c-4dd7-b51e-bf0cb0124f54

New Issues (2)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
LOW CVE-2025-5889 Npm-brace-expansion-1.1.11
detailsRecommended version: 1.1.12
Description: A vulnerability was found in juliangruber brace-expansion. It has been rated as problematic. Affected by this issue is the function "expand" of the...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: DGrDp6QumFyGIHN2Jafd88CbWvLVtC%2F4OrhBZ5tpa%2Bk%3D
Vulnerable Package
LOW CVE-2025-5889 Npm-brace-expansion-2.0.1
detailsRecommended version: 2.0.2
Description: A vulnerability was found in juliangruber brace-expansion. It has been rated as problematic. Affected by this issue is the function "expand" of the...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: L4BNZYDANiGbuNV8jplZBitZmhgUT%2FOhIwK6DG7DqcY%3D
Vulnerable Package

@psiinon
Copy link
Member

psiinon commented Jul 16, 2025

Works well on Chrome 😁
But its not working for me on Firefox 😦 Anyone know if this should be able to work on Firefox or not?

@Yogi-Codes
Copy link
Contributor Author

Hi @psiinon ,
seems to work for me on Firefox can you share the issue please😅.
Screenshot 2025-07-16 230850

@kingthorin
Copy link
Member

Is Firefox set to dark or to system? (I haven't tested but perhaps that's handled differently?)

@Yogi-Codes
Copy link
Contributor Author

Hi @kingthorin ,
Firefox is set to system in my device.

@psiinon
Copy link
Member

psiinon commented Jul 17, 2025

That could definitely be the difference - I've set Firefox to "Dark" rather than "Automatic" (which uses the system).
Not a blocker (as this seems to work well in the other cases) but it is a restriction which should probably be noted (if it cant be fixed easily).

@kingthorin
Copy link
Member

I'll try to pull and build this today and test it in both scenarios.

@Yogi-Codes for the DCO you'll need to sign-off on all commits. https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

I'd suggest just squashing it all into one and signing that one off, we general prefer single commit PRs anyway. (Yes that means forced pushing)

@Yogi-Codes Yogi-Codes force-pushed the feature/dark-mode-colors branch from 1952c11 to abd4541 Compare July 17, 2025 14:09
@Yogi-Codes
Copy link
Contributor Author

Hi @kingthorin .
thanks for the DCO doc, signed all commits,
just asking whether squashing all commits into one is still required.

@Yogi-Codes Yogi-Codes force-pushed the feature/dark-mode-colors branch from abd4541 to 54811cd Compare July 17, 2025 14:29
@kingthorin
Copy link
Member

It can wait till the end or we can also do it at merge I believe.

@Yogi-Codes
Copy link
Contributor Author

sure ,
thanks

@kingthorin
Copy link
Member

kingthorin commented Jul 18, 2025

Okay I managed to do some local testing with Firefox on Windows. There are actually two settings "Website Appearance" and "Theme". However, in all combinations it seemed to behave in an expected way for me.

Tried both the full extension and recorder.

@Yogi-Codes
Copy link
Contributor Author

That's great , Thanks for testing

@thc202
Copy link
Member

thc202 commented Jul 18, 2025

The contrast between the background and the ZAP icon label is still poor (IMHO), lighter darker would be better, or change the icon label.

@Yogi-Codes
Copy link
Contributor Author

Hi ,
is there anything i can change from my side :)

@psiinon psiinon force-pushed the feature/dark-mode-colors branch 2 times, most recently from 544311e to 784b621 Compare August 5, 2025 08:37
@psiinon
Copy link
Member

psiinon commented Aug 5, 2025

I've just pushed an update which changes the ZAP icon with Checkmarx in white which is just used in dark mode.
I think this is ready to go now :)

@psiinon
Copy link
Member

psiinon commented Aug 5, 2025

Screenshot 2025-08-05 at 09 39 44

@psiinon psiinon force-pushed the feature/dark-mode-colors branch 3 times, most recently from 5d8436f to 198ec15 Compare August 5, 2025 08:52
readability

Signed-off-by: Yogi-Codes <yogicodes101@gmail.com>
@psiinon psiinon force-pushed the feature/dark-mode-colors branch from 198ec15 to f4f465b Compare August 5, 2025 08:56
@thc202
Copy link
Member

thc202 commented Aug 5, 2025

Thank you both!

@psiinon psiinon merged commit 2ebd941 into zaproxy:main Aug 5, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

Dark mode causes white text on white background
4 participants