[GH-ISSUE #75] [BREAKING] Improvements to selecting widgets with CSS #7072

Closed
opened 2026-05-23 02:52:16 +01:00 by JakeStanger · 1 comment
Owner

Originally created by @JakeStanger on GitHub (Feb 11, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/75

Is your feature request related to a problem? Please describe.
nth-of-type is not supported in GTK3 CSS, which makes it harder to style widgets when you have multiple of each instance.

Describe the solution you'd like

  • Widgets should use classes instead of names to be more standard - this is going to be a BIG BREAKING CHANGE to existing stylesheets.
  • A widget-level name config option should be added to set a custom widget name.

Describe alternatives you've considered
You can currently work around using nth-child but this requires hard-coding the widget's index within the section.

Additional context
Origin: https://github.com/JakeStanger/ironbar/discussions/31

Originally created by @JakeStanger on GitHub (Feb 11, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/75 **Is your feature request related to a problem? Please describe.** `nth-of-type` is not supported in GTK3 CSS, which makes it harder to style widgets when you have multiple of each instance. **Describe the solution you'd like** - Widgets should use classes instead of names to be more standard - this is going to be a **BIG BREAKING CHANGE** to existing stylesheets. - A widget-level `name` config option should be added to set a custom widget name. **Describe alternatives you've considered** You can currently work around using `nth-child` but this requires hard-coding the widget's index within the section. **Additional context** Origin: https://github.com/JakeStanger/ironbar/discussions/31
JakeStanger 2026-05-23 02:52:16 +01:00
Author
Owner

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

Pinning this so anybody closely watching knows you are going to need to update your stylesheets when this lands. I will provide a script that should be able to migrate from old -> new.

<!-- gh-comment-id:1529695844 --> @JakeStanger commented on GitHub (May 1, 2023): Pinning this so anybody closely watching knows _**you are going to need to update your stylesheets when this lands.**_ I will provide a script that should be able to migrate from old -> new.
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#7072
No description provided.