Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to decrease the space between icons #3815

Closed
janemba opened this issue Dec 7, 2024 · 6 comments
Closed

How to decrease the space between icons #3815

janemba opened this issue Dec 7, 2024 · 6 comments

Comments

@janemba
Copy link

janemba commented Dec 7, 2024

Hello,

I'm using group for some icons with a simple CSS style:

#hardware{
	 font-weight: normal;
         padding: 0px;
         margin: 0px;
	 color: @fg;
	 background-color: @bg;
}

I'm trying to reduce the space between icons but my style has no effects.
Screenshot_2024-12-08_02 34 29

@JarKz
Copy link

JarKz commented Dec 8, 2024

Try change spacing option in main config file.
You can read more here: https://github.com/Alexays/Waybar/wiki/Configuration

@janemba
Copy link
Author

janemba commented Dec 8, 2024

I checked for it but unfortunately, its the gap size between modules and not icons.

@JarKz
Copy link

JarKz commented Dec 9, 2024

I didn't seen that you meant group, my bad. Try #hardware * selector, should work if you mean the space between group's inner elements.

@janemba
Copy link
Author

janemba commented Dec 9, 2024

Thank you it works fine.

Unfortunately, with that selector I'm having a radius for all icons instead of having the radius only on the edges. Is there a way to preserve it ?

I tried to suppress and manually put the radius at the edges from the first and last icons:

#hardware * {
    border-radius: 0;
    font-weight: normal;
    padding: 0 3px;
    margin: 0 3px;
    color: @fg;
    background-color: @bg;
}

#power-profiles-daemon {
    border-bottom-left-radius: 20px;
    border-top-left-radius: 20px;
}

#battery {
    border-bottom-right-radius: 20px;
    border-top-right-radius: 20px;
}

But the radius is not appearing for those icons in the group.

@JarKz
Copy link

JarKz commented Dec 9, 2024

As I understand you right, you mean the radius of group bar. To have this, you can use #hardware selector as well:

#hardware * {
    /* this radius option kinda useless but I leave here */
    border-radius: 0;
    font-weight: normal;
    padding: 0 3px;
    margin: 0 3px;
    color: @fg;
}

/* apply the radius only to group bar */
#hardware {
    border-radius: 20px;
    background-color: @bg;
}

And it should work fine if background applies only to the 'hardware' group bar and inner modules doesn't have background.

@janemba
Copy link
Author

janemba commented Dec 9, 2024

Perfect, thank you.

@janemba janemba closed this as completed Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants