mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 10:15:20 +01:00
[GH-ISSUE #327] Styling Question: How to set a different font size in a popup window? #7150
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#7150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Schweber on GitHub (Oct 12, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/327
I'm using the, slightly modified, example Stylesheet and would like to reduce the font size in the
clipboardpopup. However, all my attempts are in vain and the font size is unchanged:I'm not familiar with
cssat all so i guess i am missing something. Why do myfont-size:entries have no effect?@JakeStanger commented on GitHub (Oct 12, 2023):
Hey, CSS has an idea of 'specificity', which can be quite tricky especially with GTK. What this effectively means is that you're setting the font size at the item level, which is probably a
Box. The label element in that box then provides its own size rule, which is more specific than your rule, and so gets overriden.The solution to this usually is to target a more exact element. You might be able to get away with eg
.popup-clipboard .item labelto target all label elements. You can useironbar inspectto open the GTK inspector and view the elements to get a visual idea, or try a different element referenced on the wiki.If you still can't get anywhere, let me know and I can have a play when I get time to get a working example out.
@Schweber commented on GitHub (Oct 12, 2023):
You were right, this works:
Thank you for your quick help!
Maybe something like your explanation could be added to the documentation. It is surely obvious to someone who knows how to deal with
cssbut for me it wasn't obvious, because the documentation didn't list it as a stylable element.@JakeStanger commented on GitHub (Oct 12, 2023):
No problem, glad to help.
Agreed a paragraph or two on the styling page would definitely be helpful, I'll try and add something soon (or feel free to submit a PR :p)
@Schweber commented on GitHub (Oct 12, 2023):
If i knew how to do a PR i would probably know how to write css as well. Right now, all i can do on GitHub is nagging someone with my problems while trying not to reveal my ignorance too much ;-)
But i'm going to learn it as soon as i have a use for git, i've already started to dabble with the rust track on exercism.org.
@JakeStanger commented on GitHub (Oct 13, 2023):
Best way to learn is to jump in and figure it out as you go :) Don't worry about how much you don't know, people are always willing to lend a hand so long as you're willing to learn.
I went to add some text and found there actually is some guidance on the styling guide already:
https://github.com/JakeStanger/ironbar/blob/master/docs/Styling%20guide.md