Issue #1566💬 AnsweredOpened November 8, 2018by ThomasLaigneau0 reactions

Default style for custom blocks

Quick answerby artf

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)

artfNovember 8, 2018

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

ThomasLaigneauNovember 9, 2018

Nice one, working great ! Thank's a lot !

ThomasLaigneauNovember 16, 2018

@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.

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.