Skip to content

Text opacity in _theming.scss not in complete alignment #6236

Closed
@anwalkers

Description

@anwalkers

Bug, feature request, or proposal:

Proposal

What is the expected behavior?

Match Material.io spec for text color usability. Search for "Dark text on light backgrounds" and "White text on dark backgrounds" on this page: https://material.io/guidelines/style/color.html#color-usability

What is the use case for this

I am creating a custom theme and want to reuse these colors on my custom controls

What is the current behavior?

Currently in _theme.scss

$black-87-opacity: rgba(black, 0.87);
$white-87-opacity: rgba(white, 0.87);
$black-12-opacity: rgba(black, 0.12);
$white-12-opacity: rgba(white, 0.12);
$black-6-opacity: rgba(black, 0.06);
$white-6-opacity: rgba(white, 0.06);

Proposal

// Dark text on light backgrounds
// Primary
$black-87-opacity: rgba(black, 0.87);
// Seconday
$black-54-opacity: rgba(black, 0.54);
// Disabled text, hint text
$black-38-opacity: rgba(black, 0.38);
// Dividers
$black-12-opacity: rgba(black, 0.12);
// NOT IN SPEC...
$black-6-opacity: rgba(black, 0.06);

// Primary
$white-100-opacity: white;
// NOT IN SPEC...
$white-87-opacity: rgba(white, 0.87);
// Seconday
$white-70-opacity: rgba(white, 0.70);
// Disabled text, hint text
$white-50-opacity: rgba(white, 0.50);
// Dividers
$white-12-opacity: rgba(white, 0.12);
// NOT IN SPEC...
$white-6-opacity: rgba(white, 0.06);

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionshelp wantedThe team would appreciate a PR from the community to address this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions