Issue #672Opened December 22, 2017by mingodad2 reactions

Missing option to erase style options

Question

Hello ! In several style options there is no way to erase/reset several options like:

  • font-family : if we select a font to experiment and decided that we do not want any custom there is no way to reset it.
  • dimensions-width: if we experiment with some value and do not want any custom value we can erase the value but we still get a style in the css "width:auto" that in some cases mess up the layout (could we have the property removed completely ?).

The same apply to several other properties we need a default options in all of then to be able to remove/erase then from the generated styles.

Cheers !

Answers (3)

artfDecember 27, 20171 reactions

Hi @mingodad there is actually an option which enables the possibility to clear values but it's still a work in progress (have to deal better with composite types)

grapesjs.init({
	...
	styleManager: {
		clearProperties: true,
		...
	}
})
artfAugust 26, 20191 reactions

@benvmatheson

const sm = editor.StyleManager;
sm.getConfig().clearProperties = 1;
sm.render();
afoteyDecember 22, 20170 reactions

A SCSS style tutorial would be nice

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.