[GH-ISSUE #170] Help with styling .workspaces #4304

Closed
opened 2026-05-23 00:52:34 +01:00 by JakeStanger · 6 comments
Owner

Originally created by @dennkaii on GitHub (May 28, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/170

border-raidus in .workspaces aint working

OS:
image

Screenshots
image

Originally created by @dennkaii on GitHub (May 28, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/170 border-raidus in .workspaces aint working OS: ![image](https://github.com/JakeStanger/ironbar/assets/70287696/1afdf48d-b9e3-4e61-aca9-e68023b04a66) **Screenshots** ![image](https://github.com/JakeStanger/ironbar/assets/70287696/3608f722-55a2-4704-9647-54de46e2bea8)
JakeStanger 2026-05-23 00:52:34 +01:00
Author
Owner

@JakeStanger commented on GitHub (May 28, 2023):

CSS is case-sensitive, so you need to use .workspaces and not .Workspaces. Let me know if you still have any trouble.

<!-- gh-comment-id:1566241444 --> @JakeStanger commented on GitHub (May 28, 2023): CSS is case-sensitive, so you need to use `.workspaces` and not `.Workspaces`. Let me know if you still have any trouble.
Author
Owner

@dennkaii commented on GitHub (May 28, 2023):

still
image

<!-- gh-comment-id:1566286300 --> @dennkaii commented on GitHub (May 28, 2023): still ![image](https://github.com/JakeStanger/ironbar/assets/70287696/bd540024-2e7a-4ace-bbad-7073691c3be3)
Author
Owner

@JakeStanger commented on GitHub (May 29, 2023):

So this looks to be a quirk in how GTK handles border-radius with buttons. It does apply to the container, but the child buttons aren't "cropped" to the container.

I think you can achieve what you want here with a bit of padding on the .workspaces, so that you have some room on the edges to curve. Something like the below should work:

.container, window {
  background-color: rgba(0, 0, 0, 0);
}

.workspaces {
  background-color: #ccc;
  padding: 0 10px; 
  border-radius: 10px;
}

.workspaces .item {
  background-color: #ccc;
  border: none;
}
<!-- gh-comment-id:1567044494 --> @JakeStanger commented on GitHub (May 29, 2023): So this looks to be a quirk in how GTK handles border-radius with buttons. It does apply to the container, but the child buttons aren't "cropped" to the container. I think you can achieve what you want here with a bit of padding on the `.workspaces`, so that you have some room on the edges to curve. Something like the below should work: ```css .container, window { background-color: rgba(0, 0, 0, 0); } .workspaces { background-color: #ccc; padding: 0 10px; border-radius: 10px; } .workspaces .item { background-color: #ccc; border: none; } ```
Author
Owner

@A-Cloud-Ninja commented on GitHub (May 29, 2023):

Alternatively, my solution to default GTK styling on most of the widgets is to use something like

* {
  border: none;
  border-radius: 0;
  border-image: none;
  outline: none;
  background-image: none;
  box-shadow: none;
  color: inherit;
}

I throw this at the top of my CSS and it removes quite a bit of the default button styling and such.
Edit: realizing this doesn't actually solve that issue. If you just want to clip off the first and last elements (as they'd be where the corners are) you can use :first-child and :last-child selectors.

<!-- gh-comment-id:1567305436 --> @A-Cloud-Ninja commented on GitHub (May 29, 2023): Alternatively, my solution to default GTK styling on most of the widgets is to use something like ```css * { border: none; border-radius: 0; border-image: none; outline: none; background-image: none; box-shadow: none; color: inherit; } ``` I throw this at the top of my CSS and it removes quite a bit of the default button styling and such. Edit: realizing this doesn't actually solve that issue. If you just want to clip off the first and last elements (as they'd be where the corners are) you can use :first-child and :last-child selectors.
Author
Owner

@dennkaii commented on GitHub (May 29, 2023):

alr thanks both will try them

<!-- gh-comment-id:1567598787 --> @dennkaii commented on GitHub (May 29, 2023): alr thanks both will try them
Author
Owner

@dennkaii commented on GitHub (May 30, 2023):

ty both it worked!

<!-- gh-comment-id:1567613362 --> @dennkaii commented on GitHub (May 30, 2023): ty both it worked!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4304
No description provided.