vegana
Version:
vegana is a container based js framework
47 lines • 1.88 kB
JSON
{
"template": [
"2iyza5mwkm50399y"
],
"rows": {
"2iyza5mwkm50399y": {
"id": "2iyza5mwkm50399y",
"template": [
"2iyza5mwkm503cm6",
"2iyza5mwkm503dmm",
"2iyza5mwkm503e66"
],
"containers": {
"2iyza5mwkm503cm6": {
"id": "2iyza5mwkm503cm6",
"field": {
"type": "heading",
"data": {
"value": "engine.make.style"
}
}
},
"2iyza5mwkm503dmm": {
"id": "2iyza5mwkm503dmm",
"field": {
"type": "paragraph",
"data": {
"value": "this api adds or replaces style property of a dom element."
}
}
},
"2iyza5mwkm503e66": {
"id": "2iyza5mwkm503e66",
"field": {
"type": "code",
"data": {
"value": "\n\n\nengine.make.div({\n\tparent:pageId,\n text:'click me',\n draw:{\n \tall:{\n \tborder:\"5px solid purple\",\n padding:\"10px\",\n \"border-radius\":\"10px\"\n }\n },\n function:(id)=>{\n \t\n //------------------------------------\n //api is here\n \n //style is a object and it overtakes any style of parent element.\n \n engine.make.style({\n \tid:id,\n style:{\n \tborder:\"5px solid pink\",\n padding:\"20px\",\n color:\"pink\"\n }\n });\n \n //------------------------------------\n \n }\n});\n\n"
}
}
}
}
}
},
"title": "Vegana Api : Engine Make Style",
"discription": "how to edit or add style of a dom element in vegana js.",
"keywords": "vegana,api,engine,make,style,add,edit,update"
}