Default style for custom blocks
You can make that class private to avoid selecting them in Style Manager, in that way you will style the component and not the rule
Read full answer below ↓Question
Hi, I'm using GrapesJS to a page builder inside a Prestashop website. The idea is to set default template stored in DB with custom Blocks. Everything working fine about the store and the load of the template. My problem is that I want to use only custom blocks that i created and added to the BlockManager but with default CSS. I'm able to put CSS but how do I set media queries for those blocks by default ? The users of the page builder will only have to drag the blocks and those one should be responsive by default. This is my code : The problem is that I have to use the <style></style> in orde...
Answers (3)
You can make that class private to avoid selecting them in Style Manager, in that way you will style the component and not the rule
Nice one, working great ! Thank's a lot !
@artf The code works but I just saw that I can't see anymore the select button to see the Hover state of the element in the editor.. It come back when i remove the code you made me add..
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1611
Script tag create JSON error
Hi. I'm creating blocks in Grapesjs and I need to use JS on them for hover effect and more.. Everything works fine for the creation, store,...
Issue #1720
[QUESTION] How to add the button in custom traits
Hi, I try to add a button to my custom traits for my custom blocks but its not working fine as expected and also need to know how to call t...
Issue #543
Blocks Manager in GrapesJS Not Working For Columns
Hello, My installation of GJS ties in all of the default blocks. Every block drags fine onto the page with the exception of all the "column...
Issue #1123
[QUESTION] Onload event inside template
Hi! I have a problem with some templates. This template has some scripts running after the page is loaded. When this templates is loaded by...
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.