coderedcms icon indicating copy to clipboard operation
coderedcms copied to clipboard

Curated Tag List for Styles

Open thenewguy opened this issue 4 years ago • 3 comments

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

thenewguy avatar Nov 09 '20 20:11 thenewguy

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.

vsalvino avatar Nov 10 '20 16:11 vsalvino

It would be up to the editors to add the tags for "custom" css. They would be addable from the snippet model.

Like this: https://docs.wagtail.io/en/v2.11.1/reference/pages/model_recipes.html?highlight=tag#disabling-free-tagging

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

thenewguy avatar Nov 10 '20 16:11 thenewguy

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

thenewguy avatar Nov 10 '20 16:11 thenewguy