Skip to content

feat(cms): Allow customizing animated SVG colors in Strapi, apply to 3x SVGs#20192

Open
LZoog wants to merge 1 commit intomainfrom
FXA-13256
Open

feat(cms): Allow customizing animated SVG colors in Strapi, apply to 3x SVGs#20192
LZoog wants to merge 1 commit intomainfrom
FXA-13256

Conversation

@LZoog
Copy link
Contributor

@LZoog LZoog commented Mar 16, 2026

This commit:

  • Adds an 'illustrationsTheme' global property in Strapi to set colors used by our SVGs, with defaults if not supplied
  • Applies the theme to email code, backup codes, and authentication code SVGs, everywhere used
  • Adds Storybook documentation for each new image and theme property

closes FXA-13256


Strapi PR: mozilla/fxa-strapi/pull/193

This should not have CSP issues because this just uses CSS variables and fill, not inline <style> tags.

Check out stories for smart window theme / a nicer looking theme with clouds on the code.

Behold my ugly creation hooked up to strapi:

image

…3x SVGs

This commit:
* Adds an 'illustrationsTheme' global property in Strapi to set colors used by our SVGs, with defaults if not supplied
* Applies the theme to email code, backup codes, and authentication code SVGs, everywhere used
* Adds Storybook documentation for each new image and theme property

closes FXA-13256
@LZoog LZoog marked this pull request as ready for review March 17, 2026 18:06
@LZoog LZoog requested a review from a team as a code owner March 17, 2026 18:06
<FallingConfettiImage />
export const ConfettiFallingFullPage = () => <FallingConfettiImage />;

const smartWindowTheme: IllustrationsTheme = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am open to other names here, but it was hard to pick them since they apply across these SVGs.

I'll send these color themes to Product to add onto the smart window entrypoints.

The UX person I worked with, Michelle, has approved!! I sent her screenshots.

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

@LZoog Nice! Just the question about validating values

Image

type="warning"
content={{
localizedHeading:
'Only solid colors are supported. CSS gradients cannot currently be used because they require an XML change inside the SVG.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a regex in Strapi or here to make sure only valid colors are used?

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.

2 participants