-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add classes globally to inputs #316
Comments
Today passing a class to any component creates a wrapper. I believe if we need to implement this, it shuold be done with a configuration instead of an argument to the wrapper. |
Yeah! I saw that here trying to implement this. We can go with the configuration option. |
Thinking about this feature, after implement it, I don't know if is a good idea allow the user to set an class globally. This can make more difficult to change the default class on the inputs. Something like this:
Or if we have to do this, we need a better implementation. |
I think that this is not a really common case, I don't see a big problem on that. |
I will use this option to set as default class |
Well, that's a drawback you'll have if you want to use the default. At. On Monday, September 26, 2011 at 10:58 PM, Rafael Mendonça França wrote:
|
I wonder what happened to this, I can't seem to find this commit in master? |
@nashby ah thanks! |
Bootstrap 3 RC1 I believe makes this feature very necessary and an extremely common use-case. Currently Bootstrap only styles inputs that use the 'form-control' class, considering how widely Bootstrap is used I think adding in the option to apply this class globally without having to specify the default of every single form in your web application is pretty much required if you want to keep simple_form simple. |
+1 what @herregroen said |
I need this! I am going to create a bootstrap3 wrapper, but I can't find a easy way to add "form-control" class to all input. I found I don't want to extend input component and add class handy for each input. |
Closes heartcombo#316 Conflicts: lib/simple_form.rb
It looks like this was added in 262c554, which came between 3.0.0.rc and 3.0.0. I'm not sure why the date on the commit is from 2 years ago. |
Backport of fix for #316 - Add configuration to add class globally to inputs.
Closes heartcombo#316 Conflicts: lib/simple_form.rb
Something like this:
The text was updated successfully, but these errors were encountered: