Skip to content

Report duplicate colors #54

@bartveneman

Description

@bartveneman

I've seen many codebases that have #000, #000000 and black in their final CSS output. These are all the same values and they could probably be #000 instead, since that is the shortest form. A possible benefit is improved filesize compression. It is likely that most compression algorithms will compress a file with more repeating content better than a file with different notations for the same value.

Why would you want this report?

  1. If you have #000 and #000000 in the same CSS file, it is likely that the minifier of your CSS isn't functioning properly. Usually the minifier shortens the #000000 to #000, but if this doesn't happen, it's probably some problem in your minifier workflow.
  2. Having separate notations for the same values indicates that you could probably improve the way that you work with your colors. Maybe you aren't using a proprocessor with variables support, or maybe you are in a transitioning phase. Who knows. Maybe it's that one rogue CSS file that no-one dares touching.
  3. The detail view on Project Wallace for colors will become less noisy. Removing duplicates from the list will make it easier to look at the actual unique colors in your CSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions