formbuilder icon indicating copy to clipboard operation
formbuilder copied to clipboard

Add a way to theme a bit the resulting form

Open almet opened this issue 9 years ago • 2 comments

for instance, it could be great to specify the background image and maybe a few colors.

almet avatar Jun 01 '16 12:06 almet

Bootstrap sass integration

The easiest way to add theme could be :

  1. Use sass version of bootstrap
  2. Get rid of unused bootstrap parts to provide the smallest file possible
  3. Provide a interface to build variables file.
  4. Add formbuilder's variable like $background colors and so on.

This would start by playing with webpack.

Formbuilder theme components

Otherwise we could found a way get rid of bootstrap dependency in order to plug whatever css framework. May be by a set of formbuilder's components and adapters that's extends bootstrap, marerial design, fondation or whatever components.

I have no idea how to do it, it's the point of a other open issus #155


We may need a distinct ux project that include webpack and design tasks.

rlecellier avatar Oct 19 '16 12:10 rlecellier

Hey, I think the path of least resistance is to let the dependency to bootstrap intact. That's what @n1k0 did for RJSF and I think it's a wise choice.

There are few things we might want to do:

  • Let the user chose an image to use as a background,
  • let the user specify some CSS when they create the form, so they can theme the form the way they want. I'm a bit concerned about the security implications of this, as it opens a wide range of CSS attacks (@magopian could probably help us to see more clearly the problems of this approach), but I like the possibilities it opens for the end user.

Bottom-line being: I don't think we should try to change completely the way CSS is handled, and get rid of the bootstrap dependency (as it's a dependency of RJSF, that we use intensively here).

almet avatar Oct 19 '16 13:10 almet