ContentTools icon indicating copy to clipboard operation
ContentTools copied to clipboard

Add support for setting multiple classes when defining a style

Open Teddy95 opened this issue 8 years ago • 2 comments

Following code do not work:

ContentTools.StylePalette.add([
	new ContentTools.Style('Alert info', 'alert alert-info', ['p']),
	new ContentTools.Style('Alert success', 'alert alert-success', ['p']),
	new ContentTools.Style('Alert warning', 'alert alert-warning', ['p']),
	new ContentTools.Style('Alert danger', 'alert alert-danger', ['p'])
]);

Only one class is possible.

In this code:

ContentTools.StylePalette.add([
	new ContentTools.Style('Alert info', ['alert', 'alert-info'], ['p']),
	new ContentTools.Style('Alert success', ['alert', 'alert-success'], ['p']),
	new ContentTools.Style('Alert warning', ['alert', 'alert-warning'], ['p']),
	new ContentTools.Style('Alert danger', ['alert', 'alert-danger'], ['p'])
]);

it isn't working too.

Teddy95 avatar Dec 08 '16 22:12 Teddy95

Hi @Teddy95 - yes currently the system only supports for a single class and I agree this is limiting, I know it's been looked at previously (but I'm now struggling to find the issue). However I'm going to flag it as an enhancement, this is something I know my frontend colleagues would really appreciate too.

anthonyjb avatar Dec 09 '16 00:12 anthonyjb

I'd like to add my request for this feature as well. It would lend itself very well for use with the Tachyons css library and other "Atomic CSS" methodologies.

ghost avatar Jul 25 '19 22:07 ghost