Skip to content

Standardize color keyword arguments in components #108

@joemull

Description

@joemull

Description or user story

Steph has come up with a set of utility classes, currently living in button.css, that allow a component to take color information from the caller and reliably produce accessible contrasts. The way it's structured encourages using only the colors we have established in the scheme, because both foreground and background color are used in the class.

Proposed solution

I think we should move this to utilities.css, get rid of best_foreground, and refactor the page section component (and others, though I think it's just the George splash?) to use this.

We should also consider whether the border color can be set with this utility, since it is especially useful in our style for button borders to have the same color as text.

Alternatives

Keeping the current two solutions in the codebase and getting confused between them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-readyThis issue has been refined and is ready for development.refactoringsize SSmall

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions