4.1.0 • Published 7 years ago

@getbase/forms v4.1.0

Weekly downloads
11
License
MIT
Repository
github
Last release
7 years ago

Base Forms

Base Forms is designed in a way where you can add it on top of the Base CSS framework or to your own custom project.

Travis Build Status David Dependencies Status


Table of contents


Overview

Base Forms contains styles for inputs, textarea, radios, checkboxes and other form elements.


Installation

If you have an existing project and would like to include the Base forms module, run the following command:

npm install --save @getbase/forms

Once you have the forms module installed, you can include it in your CSS/LESS/SCSS file with one of the following ways:

CSS Import:

@import url("https://unpkg.com/@getbase/forms/index.css");

SCSS Import:

/* Import Base Forms */
@import "~@getbase/forms/scss/index";
/* Your Other Styles */
@import "main"

LESS Import:

/* Import Base Forms */
@import "~@getbase/forms/less/index";
/* Your Other Styles */
@import "main"

Documentation

Base Forms includes styles for inputs, textarea, radios, checkboxes and other form elements.

Helpers (Applies to SCSS/LESS)

Helper ClassPurposeExampleOutcome
.fieldApplies a width of 100%<input class="field" />Applies a width of 100% to a field element
.disabledApplies a class of disabled<input class="disabled" />Applies disabled state to a field element

SCSS

Variables

VariablePurposeDefault
$base-input-heightHeight applied to all inputs36px
$base-input-placeholder-colorColor applied to placeholder copy#999
$base-input-border-sizeBorder size applied to all inputs1px
$base-input-border-radiusBorder radius applied to all inputs0px
$base-input-colorColor applied to all inputs#000
$base-input-background-colorBackground color applied to all inputs#fff
$base-input-border-colorBorder color applied to all inputs#ccc
$base-input-border-focus-colorBorder color applied to all inputs on active#000
$base-select-box-heightHeight applied to select boxes36px

LESS

Variables

VariablePurposeDefault
@base-input-heightHeight applied to all inputs36px
@base-input-placeholder-colorColor applied to placeholder copy#999
$base-input-border-sizeBorder size applied to all inputs1px
@base-input-border-radiusBorder radius applied to all inputs0px
@base-input-colorColor applied to all inputs#000
@base-input-background-colorBackground color applied to all inputs#fff
@base-input-border-colorBorder color applied to all inputs#ccc
@base-input-border-focus-colorBorder color applied to all inputs on active#f7c723
@base-select-box-heightHeight applied to select boxes36px

Demo

View page example with the forms stylesheet applied.


Support

  • IE10+ and all other modern browsers.
  • Please specify browsers you need to support in package.json according to browserslist docs.

Authors

Matthew Hartman


License

Code released under the MIT Open Source license.

4.1.0

7 years ago

4.0.8

7 years ago

4.0.7

7 years ago

4.0.6

7 years ago

4.0.5

7 years ago

4.0.4

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago