Multiple font-face at-rule CSS rules are not processed
@cjpollard thanks, but it seems like you are taking apart something that was stitched together for the wrong reason. I believe a better approach is to not stitch together these at-rules in the first place. @artf I have submitted a PR for this: https://github.com/artf/grapesjs/pull/1036 To be honest, in my opinion the...
Read full answer below βQuestion
Latest version of grapes #cfde1c1 If you supply a single @font-face, this is parsed just fine: JSFiddle example: https://jsfiddle.net/szLp8h4n/140/ Screenshot: <img width="1395" alt="screen shot 2018-04-11 at 3 19 56 pm" src="https://user-images.githubusercontent.com/331833/38646200-d5c4260e-3d9b-11e8-8c41-7c3c6b1f67dd.png"> However, if you supply a second @font-face, only the second one is parsed, and the first is lost: JSFiddle example: https://jsfiddle.net/szLp8h4n/141/ Screenshot: <img width="1401" alt="screen shot 2018-04-11 at 3 21 45 pm" src="https://user-images.githubusercontent.com/3...
Answers (3)
@cjpollard thanks, but it seems like you are taking apart something that was stitched together for the wrong reason. I believe a better approach is to not stitch together these at-rules in the first place. @artf I have submitted a PR for this: https://github.com/artf/grapesjs/pull/1036 To be honest...
Totally agree with you Tom, the main goal of cssComposer is just to provide a lean interface for style definitions. What we have inside CssParser right now it's actually a browser's parser and the rest of code is just a traverser. Actually, we have issues like #307 which show the inconsistency gene...
@artf FYI I can now reproduce this in a failing test case: After further debugging this seems to be caused by cssComposer thinking that the second rule is the same rule as the previous one and then returning the first rule: https://github.com/artf/grapesjs/blob/dev/src/css_composer/index.js#L185
Related Questions and Answers
Continue research with similar issue discussions.
Issue #609
CSS editing duplicates body properties
It's still duplicating body sections and properties: When I pull it up, this is what it looks like: <img width="472" alt="screen shot 2017-...
Issue #912
[BUG]: HTML attributes/traits not escaped
When double quotes are added to an attribute it breaks the HTML.https://jsfiddle.net/szLp8h4n/Drag in the link block.Click the link in the...
Issue #1358
Create link only on "OK" button press
Hello everyone, I overwrote the default 'Link' acton of the rich text editor: <img width="1274" alt="screen shot 2018-08-13 at 1 58 43 pm"...
Issue #1614
[Bug]: adding css variables as style manager property
trying to add css variable to style manager causing error: Uncaught TypeError: Cannot read property 'toUpperCase' of undefined fiddle Am i...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.