Skip to content
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

Refresh: Standardize icon usage #15532

Open
stephaniehobson opened this issue Nov 20, 2024 · 1 comment
Open

Refresh: Standardize icon usage #15532

stephaniehobson opened this issue Nov 20, 2024 · 1 comment
Labels
Refresh 🦖 Work related to the 2024 site refresh

Comments

@stephaniehobson
Copy link
Contributor

stephaniehobson commented Nov 20, 2024

Different approaches have been taken with the icons for different components and we should standardize. This should mean moving away from changing icon colours in the CSS and towards including SVGs included on the page with the fill or stroke set to match currentColor.

Things to consider:

  • under 24px we need to use icons that do not have the pixel cut out effect. Those variants are available in this Google Drive.
  • icons are used in the launchpad, springboard, gallery, pencil banner, header, and footer.
  • in the strip of 4 pictos on the about page the icons are large enough for the pixel cut out version
  • where do we store the icons?
  • how do we include them?
  • should they be edited to remove all padding? (so they can be left or top aligned) I imagine that will break sizing so maybe not?

Goals:

  • icons have consistent file names
  • icons have consistent folder structure
  • icons are included in jinja templates in a standardized and predictable way
    • referencing the icon files so if updates are needed they are only made in one place
  • icons change colour as needed when included on pages (button hover effects, dark theme components, and eventually dark mode)
@stephaniehobson stephaniehobson added the Refresh 🦖 Work related to the 2024 site refresh label Nov 20, 2024
@stephaniehobson stephaniehobson moved this to Dev Ready in Moz.org Refresh Nov 20, 2024
@alexgibson
Copy link
Member

alexgibson commented Nov 21, 2024

Reminder that we have the picture() helper that can serve light/dark mode icon images without the need for inlining and using custom CSS styling.

Avoiding in-line images where possible circumvents CSP issues, and also offers improved caching and lazy loading provided by the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refresh 🦖 Work related to the 2024 site refresh
Projects
Status: Dev Ready
Development

No branches or pull requests

2 participants