elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
9.21k stars 379 forks source link

[BUG] Border transparency doesn't work properly if a background color is set #1106

Open Nairou opened 4 months ago

Nairou commented 4 months ago

Checklist before submitting an issue

Description of the bug

From what I can tell, the window border is drawn on top of the window's background color. This means that setting a transparent window border won't actually appear transparent, as it will just show the window background color behind it.

Reproducing the issue

.my-bar {
  background-color: RGBA(32,32,32,1);    // Remove to get border to appear transparent
  padding: 4px;
  border: 4px solid;
  border-color: RGBA(161,221,224,0.25);
  border-radius: 8px;
}

Expected behaviour

Ideally, the rendering of the window background color would not overlap the rendering of the window border, allowing both a solid window and a transparent border.

For a good example of this being done, see the niri window manager. Attempting to replicate niri's border transparency is how I found this issue.

Additional context

No response