Issue #575Opened November 27, 2017by NorthstarTech0 reactions

Border Width Properties

Question

Is it possible to add border-top, border-right,border-left properties individually under the decoration heading in grapesjs. This would be similar to border radius.

For now it only shows the border-width which gives all sided borders. I want only right or left sided borders.

Answers (3)

artfNovember 30, 20170 reactions

@NorthstarTech Example for the right border

editor.StyleManager.addProperty('Decorations', {
  name: 'Border right',
  property: 'border-right',
  type: 'composite',
  properties: [{
    name: 'Width',
    type: 'integer',
    units: ['px', 'em', 'rem'],
    property: 'border-right-width',
  },{
    name: 'Style',
    type: 'select',
    property: 'border-right-style',
    options: [
      {value: 'none'},
      {value: 'solid'},
      {value: 'dotted'},
      {value: 'dashed'},
      {value: 'double'},
      {value: 'groove'},
      {value: 'ridge'},
      {value: 'inset'},
      {value: 'outset'}
    ]
  }, {
    name: 'Color',
    type: 'color',
    property: 'border-right-color',
  }]
});
lock[bot]September 18, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.