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
  • Issues
  • #35896
Closed
Open
Issue created Feb 24, 2022 by Administrator@rootContributor2 of 2 checklist items completed2/2 checklist items

Form field sizing

Created by: WinterSilence

Prerequisites

  • I have searched for duplicate or closed feature requests
  • I have read the contributing guidelines

Proposal

  1. checkbox/switch, radio, range inputs and textareas don't have sizing classes as form-control-sm and form-control-lg. grouply:
<div class="form-check form-check-sm mb-3">
  <!-- + "form-check-input-sm" -->
  <input class="form-check-input" type="checkbox" id="remember-me">
  <!-- + "form-check-label-sm" -->
  <label class="form-check-label" for="remember-me">Remember me</label>
</div>

or directly:

<div class="form-check mb-3">
  <input class="form-check-input form-check-input-sm" type="checkbox" id="remember-me">
  <label class="form-check-label form-check-label-sm" for="remember-me">Remember me</label>
</div>
  1. input color with sizing class form-control-* have wrong height: <input type="color" class="form-control form-control-sm form-control-color"> - 35px, <input type="text" class="form-control form-control-sm"> - 31px
  2. input width (css width, min-width and max-width) by attributes minlength, maxlength or size: if maxlength="250" is width:100%, then maxlength="100" is width:40% i.e. 100 / (250 / 100) or by size(step size: 10): input[size="10"] is input{min-width:10em;}, input[size="20"] is input{min-width:20em;}
  3. There are no classes that allow to set size for all controls, labels and buttons in form/fieldset by default like as:
<!-- class "form-sm" similar to adding classes to elements: -->
<form class="form-sm">
  <div class="row mb-3">
    <!-- + "col-form-label-sm" -->
    <label for="email" class="col-2 col-form-label">Email</label>
    <div class="col-10">
      <!-- + "form-control-sm" -->
      <input type="email" class="form-control" id="email">
    </div>
  </div>
  <div class="row mb-3">
    <!-- + "col-form-label-sm" -->
    <label for="password" class="col-2 col-form-label">Password</label>
    <div class="col-10">
      <!-- + "form-control-sm" -->
      <input type="password" class="form-control" id="password">
    </div>
  </div>
  <!-- + "btn-sm" -->
  <button type="submit" class="btn btn-primary">Sign in</button>
</form>

Motivation and context

  1. Setting size for any control, label or button in form
  2. Setting size for inner controls, labels and buttons by container(form/fieldset/row) class
Assignee
Assign to
Time tracking