NO BUG: Theme link style override styling in builder

Hi,
not only the link style apply to every a element, but this style has priority over what I select in the Builder.

I added this filter to apply the Theme link style only to this element, but it doesn’t do anything. What could be happening?

add_filter( 'bricks/link_css_selectors', function( $link_css_selectors ) {
    // Add CSS link styles to .my-custom-element a
    //$link_css_selectors[] = '.my-custom-element a';
    
    // OR return new list of CSS link selectors
     $link_css_selectors = ['.brxe-post-content p > a'];

    return $link_css_selectors; // Array of selectors link styles are applied to
} );

Please help

Hi,
Thanks so much for your report!

The Theme Style link settings are not actually applied to headings, but “only” to these selectors by default:

:where(.brxe-accordion .accordion-content-wrapper) a, :where(.brxe-icon-box .content) a, :where(.brxe-list) a, :where(.brxe-post-content) a:not(.bricks-button), :where(.brxe-posts .dynamic p) a, :where(.brxe-shortcode) a, :where(.brxe-tabs .tab-content) a, :where(.brxe-team-members) .description a, :where(.brxe-testimonials) .testimonial-content-wrapper a, :where(.brxe-text) a, :where(a.brxe-text), :where(.brxe-text-basic) a, :where(a.brxe-text-basic), :where(.brxe-post-comments) .comment-content a, .brxe-product-content a, .brxe-product-short-description a, .brxe-product-tabs .woocommerce-Tabs-panel a

However, since you are using the link_css_selectors filter, the theme-style links should only be applied to your selector (works for me) :

With a live link, I could see where the styles come from. Please share a live link or have a look at the computed styles yourself.

Best regards,
timmse

Hi @timmse,

The styles come from the theme styles (its a heading link)

I finally opted for using css and not theme styles, because I’m in a hurry.

Thanks!

I can’t see the selector on the screenshot, so unfortunately I still can’t say anything more. But ok, if you’ve found a solution for yourself, that’s always a good thing! :slight_smile:

I’m so sorry, you are right, can’t see it. Something is wrong with the link theme styles, at least in my installation, now I just wanted to apply hover to all links, but was not working, I use this css and it works…maybe the snippet caused some problem, though it’s deactivated…Thanks for your support

a:hover {
    color: var(--tertiary);
}```