[Feature request] style manager css functions (for example transform: rotate(90deg)) accepts only one parameter
Question
I would like to provide an option for the css function translate(x,y) but the addProperty parameter functionName accepts only one parameter as input. I tried to use translateX() and translateY() but they don't work simultaneously. I'd be grateful if someone could maybe tell me some other method to get the desired effect.
Answers (2)
@alikabeer32 I ran into the same problem before, you have to set the defaults value for translateY and translateX since the transform property in css is shared across both translateX and translateY.
for example grapes outputs transform: translateY(40px) translateX(0);
Here's an example of how you could pass it through the styleManager attribute when constructing grapes.
styleManager: {
sectors: [
{
id: 'dimension',
name:'Dimension',
open:false,
buildProps:[
'transform'
],
properties:[
{
property:'transform',
properties:[
{
name:'Translate Y',
property:'transform-translate-y',
functionName: 'translateY',
defaults: 0,
type: 'integer',
units: ['px', '%'],
unit: 'px'
},
{
name:'Translate X',
property:'transform-translate-x',
functionName: 'translateX',
defaults: 0,
type: 'integer',
units: ['px', '%'],
unit: 'px'
},
]
}
]
}
]
},
Yes! It was the perfect solution. Thank you !
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1577
Inline CSS Comments break Code Manager
Apparently this is valid piece of html and css: <div style="color: red; / height 200px; /; font-weight: bold;"> (Hence the commented out he...
Issue #2592
Modal width
Hello, is there a way to set a modal's width, its currently set to 850px by CSS, but I would like to create a dialog with a small amount of...
Issue #1615
[Feature] support edit credentials request attribute on Remote Storage
The credentials options its forced to be 'include' on Remote Storage. https://github.com/artf/grapesjs/blob/master/src/storage_manager/mode...
Issue #2364
[Question] How to add toolbar functionality to the layers panel.
I am trying to add the toolbar to the layers panel and I am not sure how to go about this. Is there any way to accomplish this? toolbar Whe...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.