[GH-ISSUE #1478] Focused module and workspace focused css classes conflict #1854

Open
opened 2026-05-22 22:54:58 +01:00 by JakeStanger · 3 comments
Owner

Originally created by @arkreddy21 on GitHub (May 8, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1478

Describe the bug
When trying to add margin to "focused" module, the css instead applies it to the active workspace button (for example, 2)

Image

To reproduce
Add this to css

.focused {
    margin-left: 4rem;
    margin-right: 2rem;
}

Expected behavior
It applies margin to the "focused" module

System information:

  • Distro: Arch linux
  • Compositor: Hyprland
  • Ironbar version: 0.18
Originally created by @arkreddy21 on GitHub (May 8, 2026). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1478 **Describe the bug** When trying to add margin to "focused" module, the css instead applies it to the active workspace button (for example, 2) <img width="194" height="43" alt="Image" src="https://github.com/user-attachments/assets/36dec9c6-8888-4df0-9276-aa106dfdab7d" /> **To reproduce** Add this to css ``` .focused { margin-left: 4rem; margin-right: 2rem; } ``` **Expected behavior** It applies margin to the "focused" module **System information:** - Distro: Arch linux - Compositor: Hyprland - Ironbar version: 0.18
Author
Owner

@JakeStanger commented on GitHub (May 8, 2026):

You'll probably find it applies to both.

You can use .widget.focused to target the module specifically

<!-- gh-comment-id:4404825763 --> @JakeStanger commented on GitHub (May 8, 2026): You'll probably find it applies to both. You can use `.widget.focused` to target the module specifically
Author
Owner

@arkreddy21 commented on GitHub (May 8, 2026):

You're right. It conflicts with workspace's focused selector.
I installed ironbar just today and figuring it out. Would be niceif you mention this in the docs as it currently mentions ".focused" as selector for the "focused" module. Or maybe rename the module to "window" or something but that's a breaking change

<!-- gh-comment-id:4404879074 --> @arkreddy21 commented on GitHub (May 8, 2026): You're right. It conflicts with workspace's focused selector. I installed ironbar just today and figuring it out. Would be niceif you mention this in the docs as it currently mentions ".focused" as selector for the "focused" module. Or maybe rename the module to "window" or something but that's a breaking change
Author
Owner

@JakeStanger commented on GitHub (May 8, 2026):

it currently mentions ".focused" as selector for the "focused" module

It is the selector. The conflict is definitely an issue though. I'll probably look at changing the workspace class name to something else

<!-- gh-comment-id:4405463703 --> @JakeStanger commented on GitHub (May 8, 2026): > it currently mentions ".focused" as selector for the "focused" module It is the selector. The conflict is definitely an issue though. I'll probably look at changing the workspace class name to something else
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#1854
No description provided.