silexlabs / Silex

Silex live web creation, free/libre no-code website builder, next gen Webflow for the static web
http://www.silex.me
GNU Affero General Public License v3.0
2.19k stars 581 forks source link

Advanced CSS selectors plugin for grapesjs #1496

Open lexoyo opened 1 year ago

lexoyo commented 1 year ago

Why?

GrapesJS style manager is used in Silex v3 to style CSS classes and ID of the selected element in the editor

GrapesJS style manager

Here are use cases where this is not enough

Here are the ideas I could come up with in order to create a useful plugin for grapesjs

Solution 1

A UI for grapesjs css

Solution 2

Just a code editor to edit all CSS

Solution 3

Preview arbitrary selectors in the layers UI and add arbitrary selectors to the style manager

About custom UI for Selector Manager: https://grapesjs.com/docs/modules/Selectors.html#customization

Links

lexoyo commented 1 year ago

Solution 4

Do as they do in webflow:

Add the ability to

Image Image Image Image

lexoyo commented 1 year ago

@ceubri

lexoyo commented 4 months ago

Solution 4 is good, it lets the user select a class among parents, but while we are at it, we should also let the user select among other CSS combinators such as "next sibling", which would mean we style the element when it is the next sibling of the 2nd selector

=> Replace "when nested in" with "when <select>"

Also why not support design tokens?

=> how?

lexoyo commented 1 month ago

Links