Skip to content
Discussion options

You must be logged in to vote

In JointJS+ (joint.ui.Stencil), the collapse/expand toggle arrow is rendered via the pseudo-element .group-label::before on .group (and styled for its closed state with .group.closed .group-label::before).

Depending on whether your theme renders the icon as an SVG mask/background or a CSS border triangle, here is how you can color it with your --primary-color CSS variable:

Method 1: Using CSS mask (Recommended for SVG icons)

If the toggle icon is an SVG or background image, modern CSS allows you to mask a background color so it respects CSS variables:

/* Color the toggle icon with your CSS variable */
.joint-stencil .group > .group-label::before {
    background-color: var(--primary-color)…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@metamorphosis-1
Comment options

Answer selected by metamorphosis-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants