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

User Module missing CSS classes #3403

Open
ndom91 opened this issue Jul 2, 2024 · 3 comments
Open

User Module missing CSS classes #3403

ndom91 opened this issue Jul 2, 2024 · 3 comments
Labels

Comments

@ndom91
Copy link

ndom91 commented Jul 2, 2024

Hey folks, I'm trying to customize the user module a bit, but it doesn't look like there are any CSS classes for the various elements.

The wiki entry doesn't list any CSS at all at the bottom. Seems like there aren't any defined in the user.cpp file to begin with 😢

I was hoping to be able to round the avatar, for example.

#user .avatar {
  border-radius: 50%;
}
@github-actions github-actions bot added the custom label Jul 2, 2024
@RobertMueller2
Copy link
Contributor

You should be able to style #user image, e.g.

#user image {
    border-radius: 50%;
    background-color: #ffffff;
    padding: 5px;
}

if you start waybar with GTK_DEBUG=interactive, you can have a look at the elements including CSS hierarchy.

@HarshNarayanJha
Copy link

This adds a circular border to the image rather than rounded the image itself

@RobertMueller2
Copy link
Contributor

It does, but that's a limitation of GtkImage. https://gitlab.gnome.org/GNOME/gtk/-/issues/555

The above is a working CSS selector. It might be more useful once #2815 is implemented. Short of that, somebody would have to implement a custom widget, as suggest in the GTK issue above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants