BUG: Name of @container directive is missing a space when exporting CSS
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Chrome LTS
Reproducible demo link
/
Describe the bug
I noticed that the @container directive is missing a whitespace when exporting the code.
This is the code I provide:
@container portable (max-width: 639px) {
.teaser-paa__headline {
font-size: 24px;
line-height: 29px;
max-width: 272px;
margin: 0 auto;
}
}
To use it in a custom block, I save the CSS into the style attribute of a block, which looks like this:
@container portable (max-width:639px){.teaser-paa__wrapper{max-width:calc(100% - 24px)}}
To ensure proper spacing, I tried adding an escaped space without success:
@container portable\u0020(max-width:639px){.teaser-paa__wrapper{max-width:calc(100% - 24px)}}
When opening the code export, there is a missing space after the @container name, which results in broken CSS that does not work in HTML.
Resulting CSS:
@container portable(max-width: 639px) { // missing whitespace after portable
.teaser-paa__headline {
font-size: 24px;
line-height: 29px;
max-width: 272px;
margin: 0 auto;
}
}
This issue needs to be addressed to ensure the @container queries function correctly in the exported CSS.
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6654
BUG: the rich-text editor cannot be activated
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? chrome v91 Reproducible demo link https://...
Issue #6180
BUG: Trait's `setValue()` method not called when value changes
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome latest Reproducible demo link https...
Issue #6152
BUG: CSS added via custom code persists after custom code component is removed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesj...
Issue #6051
BUG:Issue in plugin
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link asdasd Descr...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.