Issue #1614Opened November 28, 2018by gcoda0 reactions

[Bug]: adding css variables as style manager property

Question

trying to add css variable to style manager causing error: Uncaught TypeError: Cannot read property 'toUpperCase' of undefined fiddle

editor.StyleManager.addSector('test', {
  name: 'My Vars',
  open: true,
  properties: [{
    type: 'integer',
    property: '--my-var',
  }],
})

Am i doing something wrong?

Fixed by changing utils/mixins.js#L76 to

const camelCase = value => {
  const values = value.split('-').filter(v=>!!v);

Answers (3)

artfNovember 30, 20180 reactions

Hi @gcoda you should use property for the CSS property name (eg. color)

gcodaNovember 30, 20180 reactions

Yes, it works with regular properties like color, is there another way to edit css custom properties on components?

artfDecember 1, 20180 reactions

is there another way to edit css custom properties on components?

Well, not currently, the style manager was made to edit style properties and not CSS custom one, but they have a lot in common

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.