#less.style-library() v2.0.0Documentation
Form mixins
Improves default browser form input, label, select and textarea styles
1#form.form-element(options);- Useful to use as a starting point when designing the element styles
- Form elements currently supported are label, input, select and textarea
- Options may vary depending on the form element
Label
To style a label element use the following mixin. This mixin accepts 3 parameters with the following default values:
1font-size: 1.2rem;
2font-weight: 700;
3color: @color[primary];1#form.label(@size, @weight, @color);To customize adjust the values, for example:
1#form.label(18px, 400, @color[secondary]);Input
1#form.input(@type);This library currently includes 4 types of text input styles:
- Default
- Rounded
- Dark
- Dark Rounded
1#form.input();1#form.input(rounded);1#form.input(dark);1#form.input(dark-rounded);Select
Select Element default style:
1#form.select();Select Element style with radius:
1#form.select(rounded);Textarea
Browser default textarea styles are plain and unatractive. Using the mixin below, you can instatly size it so it's more visible.
1#form.textarea();