1

I have a GtkLabel with which I have setup a hyperlink using the <a> tag in the label's markup however doing so negates any styling my GtkCssProvider sets. How can I continue to allow CSS to style the text in the label while also making it a hyperlink?

1 Answer 1

2

to style all the text you could try

GtkLabel *{
color : red;
}

this selects pretty much selects everything in gtk labels(like all states) and applies the css style to all of it.

to Style only the link part select the subnode "link"

label link{
color : red;
}
Sign up to request clarification or add additional context in comments.

2 Comments

The identifier is actually label not GtkLabel and that works although that's not really ideal. What's the exact state that's being selected? Is there a more fine grained selector than simply using *?
in the previous version's of gtk GtkLabel is allowed as a selector...and insted of * you can use the subnode "link" to select the link part of the text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.