Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !8611

Updated BS3 form classes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge bs3_form_classes into 3.0.0-wip Jul 26, 2013
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 5

Once more I'm looking to update our approach to forms in BS3. Overall the goals here are:

  • simplicity (in code and presentation)
  • flexibility (not tying ourselves too close to specific HTML)
  • consistency (using the same patterns as elsewhere in the project)

To that end, I've made the following changes:

  • Use .form-control for styling form controls instead of list of input types. Fewer lines of code, less specific (meaning easier overrides as input[type="text"] is more specific than .input), less intrusive, and more performant.
  • Adds new .form-group class to space out groups of form controls when in vertical mode. (Horizontal forms will continue to use the predefined grid classes.)
  • Updates form validation classes to separate HTML and CSS. While not directly applicable to individual inputs, the markup is very flexible given the classes we use.

Still needs refinement I think, but overall I like it.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bs3_form_classes