Skip to content

Add Dracula/Alucard System Theme#17

Open
ericstephenr wants to merge 1 commit into
dracula:masterfrom
ericstephenr:dracula-alucard-system-theme
Open

Add Dracula/Alucard System Theme#17
ericstephenr wants to merge 1 commit into
dracula:masterfrom
ericstephenr:dracula-alucard-system-theme

Conversation

@ericstephenr

Copy link
Copy Markdown

This PR adds a new Firefox theme: "Dracula/Alucard System Theme."

  • Combines existing Dracula and Alucard themes into a single theme that automatically switches between light and dark based on system preference.
  • Tested on Firefox 142.0.1 (Fedora Linux).

@coderabbitai

coderabbitai Bot commented Sep 6, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a new Firefox WebExtension manifest at Addon/system/manifest.json defining a “Dracula/Alucard System Theme” (manifest_version 2). Specifies Gecko strict_min_version 142.0.1 and provides two theme configurations: theme (light) and dark_theme, each with detailed colors and properties for browser UI surfaces.

Changes

Cohort / File(s) Summary
Firefox theme manifest
Addon/system/manifest.json
New manifest defining extension metadata (manifest_version: 2, version: "1.0", name/short_name) and browser_specific_settings.gecko.strict_min_version. Introduces theme and dark_theme objects with comprehensive UI color tokens and properties (color_scheme, panel states, toolbar_field_icon_opacity, zap_gradient).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
Addon/system/manifest.json (1)

3-5: Add description and use semantic versioning.

Small metadata polish for AMO listing and future releases.

   "manifest_version": 2,
-  "version": "1.0",
+  "version": "1.0.0",
   "name": "Dracula/Alucard System Theme",
   "short_name": "Dracula/Alucard",
+  "description": "A system-aware Dracula (light) / Alucard (dark) theme that switches with your OS preference.",

Optionally add browser_specific_settings.gecko.id if you plan self-hosting or side-loading.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a53978 and 4c04e06.

📒 Files selected for processing (1)
  • Addon/system/manifest.json (1 hunks)
🔇 Additional comments (7)
Addon/system/manifest.json (7)

13-58: Light theme looks coherent overall.

Color token coverage is thorough and consistent with Firefox static theme schema.


60-105: Correct use of dark_theme for system-driven switching.

Defining both theme and dark_theme enables automatic switching with system preference. Nicely done.


1-11: Confirm the tested Firefox version.

PR text says “tested on Firefox 142.0.1 (Fedora)”. As of 2025-09-06, that version seems ahead of stable cadence; please confirm the exact version/build you tested.


2-2: No action needed: Manifest V2 is still supported for static themes on AMO, and no deprecation timeline has been announced.


7-11: Could you confirm if by “dark_theme” you meant the theme.properties.color_scheme property (e.g. "color_scheme": "dark") in static theme manifests rather than a separate dark_theme key? Once that’s clear, I’ll gather the exact Firefox version support and per-token minimums.


1-106: Run web-ext lint in Addon/system
Install or enable web-ext (e.g. npm install -g web-ext or use npx web-ext lint --verbose), then execute web-ext lint --verbose from the Addon/system directory to validate manifest.json against the Firefox schema and surface any typos or unsupported keys.


21-21: Your script will compute the contrast ratio for the proposed color.

Comment on lines +50 to +57
"properties": {
"color_scheme": "light",
"panel_hover": "color-mix(in srgb, currentColor 9%, transparent)",
"panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
"panel_active_darker": "color-mix(in srgb, currentColor 25%, transparent)",
"toolbar_field_icon_opacity": "1",
"zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Non-standard theme properties will be ignored without a theme_experiment.

panel_hover, panel_active, panel_active_darker, toolbar_field_icon_opacity, and zap_gradient aren’t part of the public theme schema and will not apply unless you declare a theme_experiment (which AMO typically does not allow for public themes). Recommend removing.

-    "properties": {
-      "color_scheme": "light",
-      "panel_hover": "color-mix(in srgb, currentColor 9%, transparent)",
-      "panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
-      "panel_active_darker": "color-mix(in srgb, currentColor 25%, transparent)",
-      "toolbar_field_icon_opacity": "1",
-      "zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
-    }
+    "properties": {
+      "color_scheme": "light"
+    }

🌐 Web query:

Are custom theme properties like panel_hover and zap_gradient supported in Firefox static themes without theme_experiment? Is theme_experiment allowed on AMO for third-party themes?

💡 Result:

Short answer: No — only the standard theme keys documented by MDN are supported in regular static themes. Custom UI CSS via theme_experiment (which is how things like extra CSS-driven variables/gradients are exposed in Mozilla’s built‑in themes) is an experimental mechanism and not usable for third‑party themes on AMO. Themes that rely on theme_experiment cannot be signed/submitted for distribution on AMO (theme experiments are used for Mozilla‑vetted/built‑in experiments only).

Sources: MDN theme/theme_experiment docs [1][2], Firefox built‑in theme manifest showing zap_gradient used with theme_experiment [3], community/AMO notes that theme_experiment themes can’t be submitted/signed for AMO distribution [4].

References

  1. MDN — theme (manifest.json).
  2. MDN — theme_experiment (manifest.json).
  3. Firefox built‑in Dark theme manifest (shows zap_gradient & theme_experiment).
  4. Community/AMO discussion (theme_experiment not allowed for third‑party AMO themes).

Remove non-standard theme properties from manifest.json
Custom keys (panel_hover, panel_active, panel_active_darker, toolbar_field_icon_opacity, zap_gradient) aren’t part of MDN’s static theme schema and require a theme_experiment, which third-party AMO themes cannot use—these entries will be ignored and must be removed.

🤖 Prompt for AI Agents
In Addon/system/manifest.json around lines 50 to 57, remove the non-standard
theme properties (panel_hover, panel_active, panel_active_darker,
toolbar_field_icon_opacity, zap_gradient) because they are not part of MDN’s
static theme schema and require a theme_experiment which third-party AMO themes
cannot use; delete these custom keys from the "properties" block and keep only
standard theme fields (e.g., color_scheme) so the manifest validates against the
static theme schema, or if you must retain those visuals document them elsewhere
and implement via an approved extension experiment rather than in this manifest.

Comment on lines +97 to +104
"properties": {
"color_scheme": "dark",
"panel_hover": "color-mix(in srgb, currentColor 9%, transparent)",
"panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
"panel_active_darker": "color-mix(in srgb, currentColor 25%, transparent)",
"toolbar_field_icon_opacity": "1",
"zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Repeat: remove unsupported dark properties.

Mirror the light-side change; keep only color_scheme: "dark" to avoid ignored fields.

-    "properties": {
-      "color_scheme": "dark",
-      "panel_hover": "color-mix(in srgb, currentColor 9%, transparent)",
-      "panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
-      "panel_active_darker": "color-mix(in srgb, currentColor 25%, transparent)",
-      "toolbar_field_icon_opacity": "1",
-      "zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
-    }
+    "properties": {
+      "color_scheme": "dark"
+    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"properties": {
"color_scheme": "dark",
"panel_hover": "color-mix(in srgb, currentColor 9%, transparent)",
"panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
"panel_active_darker": "color-mix(in srgb, currentColor 25%, transparent)",
"toolbar_field_icon_opacity": "1",
"zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
}
"properties": {
"color_scheme": "dark"
}
🤖 Prompt for AI Agents
In Addon/system/manifest.json around lines 97 to 104, the manifest includes
unsupported dark theme properties that will be ignored; remove all entries
inside "properties" except keep "color_scheme": "dark" (i.e., delete
panel_hover, panel_active, panel_active_darker, toolbar_field_icon_opacity,
zap_gradient) so the properties object only contains the single supported
color_scheme key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant