-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
CSS styling of text inside boxes #73
Comments
I'd like to add, that if all text had a text class, we'd be able to set default styles. Piggy backing on this issue request, if the text is within an object, you could add a class called text_object_name in addition to the default text class. So by default, it would look like so: Then, using the example from @mbrannstrom above, the text element would look like so: The legend would look like:
You could use the same/similar logic that you use to add the shape classes to the text elements within the shape. If I wanted to style all text in the graphic, I'd use the following:
|
Agree, this unfortunately breaks every rendered SVG on dark themes :/ |
It just gives the capability to style rendered SVGs. It would be up to the user to add the appropriate CSS, but adding the class itself shouldn't break anything. |
I think there is almost a work-around. Consider
The SVG will contain
Therefore you can style the text using the
I don't know how to easily integrate that CSS however. My main use case for svgbob at the moment is probably going to involve discourse so it won't be possible to inject arbitrary CSS (for good reasons probably, unless nesting can help now). That means that will require be some support from svgbob directly. |
I love the new CSS styling feature. It would be great if it was possible to apply styling to text inside boxes (or other shapes).
In the following example, it would be nice to set the text color to e.g. white. (the filter works best in chrome)
E.g. with the syntax:
Or, perhaps even better, make the entire styling block into pure CSS:
The
<text>
element would thus have theclass="a"
applied, if it is inside a box with that class.See the current output below:
The text was updated successfully, but these errors were encountered: