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

[BUG] rgba is limited from :style in yuck #1040

Open
3 tasks done
ArtemSmaznov opened this issue Feb 27, 2024 · 0 comments
Open
3 tasks done

[BUG] rgba is limited from :style in yuck #1040

ArtemSmaznov opened this issue Feb 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ArtemSmaznov
Copy link

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

Is there a reason why rgba() behaves differently between cscc and yuck?

This works fine:

.music-player {
    background: rgba(#FF0000, 0.4);
}

This for some reason doesn't:

(box :class "music-player"
     :style "background: rgba(#FF0000, 0.4);"

It works fine without the opacity though:

(box :class "music-player"
     :style "background: #FF0000;"

To clarify what I am trying to do.
I have a var music-player-album-color in yuck and I want to make the music player widget have a dynamic color AND be semi-transparent. I can get to having either one of those but not both.

I have even tried setting a new scss variable from yuck but it seems anything set there operates on a different scope than what I write in scss so couldn't get this working as a workaround.

Is there a bug in how rgba() in handled from yuck or is this a limitation that is easy to overcome?

Reproducing the issue

Add the following to any widget

     :style "background: rgba(#FF0000, 0.4);"

Expected behaviour

the widget should get colored accordingly (40% transparent red)

Additional context

No response

@ArtemSmaznov ArtemSmaznov added the bug Something isn't working label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant