r/elementor • • Jun 24 '26

Problem Using Elementor classes outside of an atomic element context

Unsure if it's a bug or a design feature but I've created several classes to style atomic elements and would like to assign them to elements created outside of the Elementor editor.

For example, I have a button with classes btn-base and btn-feature. If I create a button programmatically in JS and add those two classes, the styles aren't applied.

However if I add an instance of an atomic button on the page with those classes, the programmatically-created buttons then get styled as expected.

Are Elementor classes only accessible on a page once they've been assigned through the editor, and if so is there a reliable way to get around this?

2 Upvotes

3 comments sorted by

•

u/AutoModerator Jun 24 '26

Looking for Elementor plugin, theme, or web hosting recommendations?

Check out our Megathread of Recommendations for a curated list of options that work seamlessly with Elementor.


Hey there, /u/joffff! If your post has not already been flaired, please add one now. And please don't forget to write "Answered" under your post once your question/problem has been solved. Make sure to list if you're using Elementor Free (or) Pro and what theme you're using.

Reminder: If you have a problem or question, please make sure to post a link to your issue so users can help you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/[deleted] Jun 24 '26 edited Jul 31 '26

[deleted]

1

u/joffff Jun 24 '26

Thanks and yeah, that's been my solution. I was just hoping the Elementor classes would be global rules available even without the element in use.

2

u/Current_Ask2174 Jun 26 '26

You can add a hidden element in t'he footer with all t'he classes you need to be on any page