Issue #4341💬 AnsweredOpened May 20, 2022by senthil177cse0 reactions

While adding border style for Html component css json only fetching for border selector not fetching selector of border-width, border-style, border-colorBUG:

快速解答by aharishsundhar

@artf how to resolve this problem i'm face the same issues in my side latest version v0.18.4 padding: 0 0 0 0, padding-top: "", padding-bottom: "", padding-right: "", padding-left: "",

Read full answer below ↓

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

chrome v101.0.4951.54

Reproducible demo link

https://jsfiddle.net/7sn5h91r/7/

Describe the bug

  1. my issue is for style border property width, style and color not updating in json even i have checked in https://grapesjs.com/demo.html. please check the attached screenshot. below is my code JSON response. tell me how to remove that empty properties like border-width, border-style,border-color.

my response JSON:{ "selectors": "is98i", "style": { "width": "100%", "__p": false, "height": "5%", "margin-bottom": "15px", "border-radius": "5px", "border": "1px solid #d6d6d6", "border-width": "", "border-style": "", "border-color": "" }, "mediaText": "(max-width: 480px)", "atRuleType": "media" } 168816344-e19cb449-3d01-45e4-a5be-f315d1d749c9

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (4)

aharishsundharJuly 20, 2022

@artf how to resolve this problem i'm face the same issues in my side latest version v0.18.4 padding: 0 0 0 0, padding-top: "", padding-bottom: "", padding-right: "", padding-left: "",

senthil177cseJuly 20, 2022

Hi @aharishsundhar .. As per my knowledge instead of using padding: 0 0 0 0; you can add only pading-top, padding-bottom,padding-left,padding-right...

aharishsundharJuly 20, 2022

@senthil177cse im getting the same issues on padding : 0 0 0 0; created also the padding-top create but empty properties coming how to fix the problem is its issues with grapesjs v0.18.4?

ClaudeCodeMay 17, 2026

Thanks for reporting this, @senthil177cse.

Great question about while adding border style for Html component css json only fetching for border selector not fetching selector of border-width, border-style, border-colorBUG:. The recommended approach with StyleManager is to use the event-driven API.

Start here:

  1. Check the GrapesJS documentation for your specific module
  2. Look for the on() event listener method
  3. Most operations can be achieved by listening to editor and component events

Common patterns:

// Listen for changes
editor.on('change', () => console.log('something changed'));

// Component lifecycle
editor.on('component:mount', (c) => console.log('component ready', c));
editor.on('component:update', (c) => console.log('component updated', c));

If you're still stuck:

  • Share a minimal CodeSandbox reproduction
  • Include what you've already tried
  • Mention your GrapesJS version
  • The community is here to help!

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.