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

Fade disabled buttons into luminance-gray color of current plane background #40559

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jun 15, 2024

  1. Introduce css-var --bs-current-plane-bg and reference current bg-co…

    …lor via `var()`-name in `.bg-<COLOR>` classes
    
    ```css
    body {
      --bs-current-plane-bg: var(--bs-body-bg);
    }
    
    .bg-primary {
      --bs-current-plane-bg: var(--bs-primary);
    }
    
    .bg-secondary {
      --bs-current-plane-bg: var(--bs-secondary);
    }
    
    .bg-success {
      --bs-current-plane-bg: var(--bs-success);
    }
    
    […]
    ```
    rr-it committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    02e24fb View commit details
    Browse the repository at this point in the history
  2. Fade disabled buttons into luminance-gray color of current plane back…

    …ground
    
    ### Before:
    
    Disabled buttons simply used `opacity` and color-cross-fading happened.
    E.g. a disabled red button on a blue plane became purple.
    
    ### With this change:
    
    Disabled buttons color is mixed with a gray having the identical luminance as the background-color. This results in the following color change of disabled buttons.
    
    #### Lightness:
    
    Lightened on light background and darkened on dark background.
    
    In comparison:
    Identical behaviour as before. Buttons lightness is slightly (`fade-percentage`) fading into the background.
    
    #### Saturation:
    
    Slightly desaturated.
    
    In comparison:
    On black/white gray background: Identical behaviour as before.
    On colorful background: Before there was an unintentional mix between bg-color and button-color saturation. Now the button is simply slightly (`fade-percentage`) desaturated.
    
    #### Hue
    Stays identical.
    
    In comparison:
    On black/white gray background: Identical behaviour as before.
    On colorful background: Before there was an unintentional  cross-fading between bg-color and button-color resulting in unfortunate dyeing of the  button. Now the button keeps its color hue.
    rr-it committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    c806aaa View commit details
    Browse the repository at this point in the history
  3. Set css-var --bs-current-plane-bg for elements with background-colo…

    …r that might contain buttons
    rr-it committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    6a48cf0 View commit details
    Browse the repository at this point in the history