You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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;}
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: --><formclass="form-sm"><divclass="row mb-3"><!-- + "col-form-label-sm" --><labelfor="email" class="col-2 col-form-label">Email</label><divclass="col-10"><!-- + "form-control-sm" --><inputtype="email" class="form-control" id="email"></div></div><divclass="row mb-3"><!-- + "col-form-label-sm" --><labelfor="password" class="col-2 col-form-label">Password</label><divclass="col-10"><!-- + "form-control-sm" --><inputtype="password" class="form-control" id="password"></div></div><!-- + "btn-sm" --><buttontype="submit" class="btn btn-primary">Sign in</button></form>
Motivation and context
Setting size for any control, label or button in form
Setting size for inner controls, labels and buttons by container(form/fieldset/row) class
The text was updated successfully, but these errors were encountered:
I see what you're going for, but using we'll stick to explicit width dimensions for sizing inputs. minlength and maxlength affect the number of characters within an input, not it's size. size is interesting, but going by character count when variable fonts across browsers and devices is a recipe for some difficult inconsistencies.
why? set form size(.form-sm) and customize some controls(.form-control-md) are shortest and easy than sets sizes for all controls in form(.form-control-sm/.form-control-md, .form-label-sm/.form-label-md)
Sorry, I missed your answers. When you have a design, it is (usually) the same for the whole form. When you have a form with 50 inputs/labels, it would be better to have a general style in the form tag. This was just an idea, but if it doesn't please anyone...sorry for the inconvenience.
Prerequisites
Proposal
form-control-sm
andform-control-lg
.grouply:
or directly:
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">
- 31pxwidth
,min-width
andmax-width
) by attributesminlength
,maxlength
orsize
: ifmaxlength="250"
iswidth:100%
, thenmaxlength="100"
iswidth:40%
i.e.100 / (250 / 100)
or by size(step size: 10):input[size="10"]
isinput{min-width:10em;}
,input[size="20"]
isinput{min-width:20em;}
Motivation and context
The text was updated successfully, but these errors were encountered: