verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

Add vizyBlock names as data-name or class to the vizyBlocks #96

Closed davidhellmann closed 1 year ago

davidhellmann commented 2 years ago

We do from time to time something with control panel css to overwrite style within the control panel Would be nice to have here: image

the block names to select it via css.

For stuff like that

.vui-rich-text .vizyblock {
  margin: 20px 0;
}

.vui-rich-text .vizyblock ~*:not(.vizyblock[data-name="blockSection"]) {
  width: calc(100% - 32px);
  margin-left: 32px;
}

.vui-rich-text .vizyblock:first-of-type {
  margin-top: 10px;
}

.vui-rich-text .vizyblock:last-of-type {
  margin-bottom: 10px;
}

image

We use this in matrix fields too. So the user can open a section to put content together. If he creates another section the old section is self closing. So it's possible to put content in another block without doing it :)

engram-design commented 1 year ago

Added in 2.1.0