Issue #1550Opened October 30, 2018by froderf0 reactions

Remove Duplicate Css Rule by Class

Question

Hi @artf , I'm reading and experimenting the setStyle method but when i used setStyle editor.getSelectedToStyle().setStyle({ color: 'red' })

it duplicates the css rule of that class e.g

.class1{
 color: 'black';
}

.class1{
 color: 'red';
}

What I want is either removed the existing class

.class1{
 color: 'black';
}

or update that existing class css rule

.class1{
 color: 'black';
}

This issue is very similar to issue 932. I need avoidInlineStyle: to be set to false since im using inline style.

Please help. Thanks

Answers (2)

froderfOctober 30, 20180 reactions

If there's no work around for this issue. what I need right now is used cssComposer.getClassRule()

but the problem is, it is selecting the first class

.class1{
 color: 'black';
}

and not this updated class

.class1{
 color: 'red';
}
lock[bot]October 30, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.