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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme: Amend utility function bgBlur to not modulate background value #485

Merged
merged 1 commit into from
May 24, 2022
Merged

theme: Amend utility function bgBlur to not modulate background value #485

merged 1 commit into from
May 24, 2022

Commits on May 23, 2022

  1. theme: Amend utility function bgBlur to not modulate background value

    Amends the Stitches utility function `bgBlur` to set the passed background-color value as-is instead of appending `66` (for alpha), which only works for hex color codes.
    
    This change enables passing other color code formats, like `hsla()` and `rgb()`, just like the rest of NextUI. The previous implementation confuses users for why their color value does not work.
    
    Second, the previous implementation of setting the passed color alpha to 66% is hidden from the user. If the user wants to pass a value with a particular alpha that is not 66%, she must think about the additional 66% modification happening to her color.
    
    For example, I would like to set the background color for this blur effect to exactly `hsla(0, 0%, 100%, 0.1)`, where I can easily tweak the alpha value. However, this color code format is incompatible with the current implementation for the reason explained above. Second, if I instead find the corresponding hex color code for this value, I can not tweak the alpha easily; and when I do, I must also account for the 66% happening in the background.
    DannyNemer committed May 23, 2022
    Configuration menu
    Copy the full SHA
    8adc20c View commit details
    Browse the repository at this point in the history