Issue #1561Opened November 5, 2018by froderf0 reactions

Css shorthand

Question

Hello @artf , is there a way to not convert a css added into shorthand? for example: border: 4px solid rgb(239, 13, 24);

after visiting the code viewer, the above css is converted to the following

    border-top-color: rgb(239, 13, 24);
    border-right-color: rgb(239, 13, 24);
    border-bottom-color: rgb(239, 13, 24);
    border-left-color: rgb(239, 13, 24);
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-width: 4px;
    border-right-width: 4px;
    border-bottom-width: 4px;
    border-left-width: 4px;

how can I prevent this kind of conversion? What I want is to remain this style border: 4px solid rgb(239, 13, 24); to what is it.

Answers (2)

artfNovember 8, 20180 reactions

That happens due to the browser's CSS parser, which is used by default in GrapesJS. You can prevent that by using grapesjs-parser-postcss

lock[bot]November 8, 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.