grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Css shorthand

Open froderf opened this issue 8 years ago • 2 comments

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.

froderf avatar Nov 05 '18 03:11 froderf

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

artf avatar Nov 07 '18 23:11 artf

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.

lock[bot] avatar Nov 07 '19 23:11 lock[bot]