Open thenewguy opened 3 years ago
This is a good idea, but would be really difficult to implement. You'd have to somehow parse all of the site's CSS, most likely as part of the deployment process, to determine which CSS class names are available to be suggested in the field. I don't think it would be practical to implement, but many people have brought it up as an idea.
I think a better approach would be to move away from relying on custom CSS classes, and add fields for common properties such as alignment, color, position, etc. And to improve the custom template experience for developers.
It would be up to the editors to add the tags for "custom" css. They would be addable from the snippet model.
What I meant for the "default" would be bootstrap's default tags. Like text-center
, m-3
, p-3
, etc that are common among all bootstrap sites
-- Edit --
The benefit would be documenting available tags and also autocomplete from the tag widget
I agree it would be nice to have some clicky options for common things on certain blocks - like centered text - but the custom css classes is pretty powerful. I would hate to see it go as it would take a tremendous number of clickies to replace all of the options. This handles a nice catch-all for those few blocks that need to be different
It would be helpful if the tags input was a curated tag list. Could be controlled with django taggit and a snippet model. Ideally preloaded with bootstrap style classes