FeatureFuel
2

Override Theme styles with custom selector for more CSS specificity

Source: elementor/elementor#17598 · opened by @ashbryant
I've had this issue a couple of times now where a theme being used has more weight on its CSS selectors than that of Elementor's and thus Elementor's styles are overridden by those of the theme.

I've managed to 'fixed' this by adding in a selector to the the elementor > includes > stylesheet.php (line 74) that then increases the weight of elementor's styles, but being able to do this from the admin would obviously be best as any changes here will need to be replicated every-time elementor updates.


public static function parse_rules( array $rules ) {
$parsed_rules = '';

foreach ( $rules as $selector => $properties ) {
$selector_content = self::parse_properties( $properties );

if ( $selector_content ) {
$parsed_rules .= '#increase-weight-selector-name-here ' . $selector . '{' . $selector_content . '}';
}
}

return $parsed_rules;
}

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests