From 13bc74b636f4a9905010df84fc07790ccced0c93 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 25 Jul 2013 18:29:51 -0700 Subject: [PATCH] Refactor forms styles * Reorganize forms.less * Change from attribute selectors to `.form-control`. Few lines, less specific (meaning easier overrides as `element[type=""]` is more specific than a class), less intrusive, and more performant. * Add `.form-group` for basic spacing in vertical forms. * Remove (unnecessary?) `margin: 0;` from `form` element (as far as I can tell no browser sets that anyway). --- css.html | 190 ++++++++++++++++++++----------------- dist/css/bootstrap.css | 182 +++++++++-------------------------- dist/css/bootstrap.min.css | 2 +- less/forms.less | 186 ++++++++++++++++++------------------ 4 files changed, 239 insertions(+), 321 deletions(-) diff --git a/css.html b/css.html index 06b4f53451..6cc9735ddc 100644 --- a/css.html +++ b/css.html @@ -1162,17 +1162,23 @@ For example, <section> should be wrapped as inline.

Basic example

-

Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements are set to width: 100%; by default.

+

Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements are set to width: 100%; by default. Wrap labels and controls in .form-group for optimum spacing.

Legend - - - - - - -

Example block-level help text here.

+
+ + +
+
+ + +
+
+ + +

Example block-level help text here.

+