[QUESTION] Multiple identical classes usage
Question
Hey @artf ,
I have a question around the Style Manager. Let's say we have multiple elements with row classes inside html, is there any possibility that on selection of a specific element the styles changed through the StyleManager are added on a programmatically created id/class instead of the existing class (in this scenario row)?
I think that the current implementation may be a little confusing from the perspective that the user expects that his action will reflect on the specific element he chose to style not every other element with the same style.
Thanks in advance 🙂
Answers (3)
I think that the current implementation may be a little confusing from the perspective that the user expects that his action will reflect on the specific element he chose to style not every other element with the same style.
Yeah, I agree with you, the current implementation of classes is probably too much tech/dev oriented, what I have planned to do in the future is to create a similar approach used in Sketch but unfortunately, don't have time to implement it.
BTW for now the only solution I can suggest is to make you selectors (classes) private, here is an example https://codepen.io/artf/pen/jaaKvq
@artf the proposed solution works great. Thank you! :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1307
Question: To stop dynamically generated classes in grapes Editor
Hi @artf is there any Way to stop dynamically generating classes on reloading editor. let say when i add my custom class i.e "my_class" to...
Issue #1330
[Question] Drop and drag restricted classes
Hey @artf , is there a possibility to restrict the drop and drag functionality to elements classList containing some class or classes inste...
Issue #843
[QUESTION] - CssComposer - removes unused classes
hi @artf , I import a html , using import from grapesjs-preset-newsletter, with some css classes inside the <style> tag. After the import,...
Issue #1877
[FEATURE REQUEST] Custom styles that add/remove custom classes?
Currently, all the style manager values that you change for an element simply update a <style> tag inline in the HTML. Is it possible to ch...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.