-
Notifications
You must be signed in to change notification settings - Fork 66
New Component: Inputs #164
base: main
Are you sure you want to change the base?
Changes from 4 commits
416f942
6bcf58e
fa7a0ff
df186fc
5946e34
73d9452
ad6dd09
796c302
aa81f47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,295 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>CSS Chassis - Inputs</title> | ||
| <meta name="description" content="Button skeleton for styling"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <link rel="stylesheet" href="../dist/css/chassis.css"> | ||
| <link rel="stylesheet" href="demos.css"> | ||
| </head> | ||
| <body> | ||
|
|
||
| <h2>Inputs - (Size: Default)</h2> | ||
|
|
||
| <h3>Checkboxes</h3> | ||
| <!-- Custom check boxes --> | ||
|
|
||
| <input id="check1" type="checkbox" class="checkbox"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need a fieldset with a legend for this group of checkboxes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need 'name' and 'value' attributes for checkboxes |
||
| <label for="check1" class="checkbox-label">Choose this</label> | ||
|
|
||
| <input id="check2" type="checkbox" class="checkbox"> | ||
| <label for="check2" class="checkbox-label">And this</label> | ||
|
|
||
| <input id="check3" type="checkbox" class="checkbox"> | ||
| <label for="check3" class="checkbox-label">And this too</label> | ||
|
|
||
| <!-- Custom Radio button --> | ||
|
|
||
| <h3>Radio buttons</h3> | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need a fieldset with a legend for this group of radio inputs |
||
| <div> | ||
|
||
| <input id="radio-1" class="radiobutton" name="radio-group" type="radio" checked> | ||
|
||
| <label for="radio-1" class="radiobutton-label">Second Choice</label> | ||
| </div> | ||
|
|
||
| <div> | ||
| <input id="radio-2" class="radiobutton" name="radio-group" type="radio" checked> | ||
| <label for="radio-2" class="radiobutton-label">Third Choice</label> | ||
| </div> | ||
|
|
||
| <div> | ||
| <input id="radio-3" class="radiobutton" name="radio-group" type="radio" checked> | ||
| <label for="radio-3" class="radiobutton-label">Fourth Choice</label> | ||
| </div> | ||
|
|
||
| <div> | ||
| <input id="radio-4" class="radiobutton" name="radio-group" type="radio" checked> | ||
| <label for="radio-4" class="radiobutton-label">Fifth Choice</label> | ||
| </div> | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need label for new section |
||
| <label class="input-label">Name: </label> | ||
| <input class="input" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
|
||
| <input class="input" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input" type="number" placeholder="XX"> | ||
| <h2>Inputs (Disabled) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input disabled" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input disabled" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input disabled" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input disabled" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input disabled" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input disabled" type="number" placeholder="XX"> | ||
| <h2>Inputs (Focus) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input focus" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input focus" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input focus" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input focus" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input focus" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input focus" type="number" placeholder="XX"> | ||
| <h2>Inputs (Active) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input active" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input active" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input active" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input active" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input active" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input active" type="number" placeholder="XX"> | ||
| <h2>Inputs (Error) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input error" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input error" type="password" placeholder="Choose a password"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input error" type="color"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input error" type="email" placeholder="name@example.com"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input error" type="date"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input error" type="number" placeholder="XX"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <h2>Inputs - (Size: Small)</h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input input-sm" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input input-sm" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input input-sm" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input input-sm" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input input-sm" type="number" placeholder="XX"> | ||
| <h2>Inputs (Disabled) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input disabled input-sm" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input disabled input-sm" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input disabled input-sm" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input disabled input-sm" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input disabled input-sm" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input disabled input-sm" type="number" placeholder="XX"> | ||
| <h2>Inputs (Focus) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input focus input-sm" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input focus input-sm" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input focus input-sm" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input focus input-sm" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input focus input-sm" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input focus input-sm" type="number" placeholder="XX"> | ||
| <h2>Inputs (Active) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input active input-sm" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input active input-sm" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input active input-sm" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input active input-sm" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input active input-sm" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input active input-sm" type="number" placeholder="XX"> | ||
| <h2>Inputs (Error) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input error input-sm" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input error input-sm" type="password" placeholder="Choose a password"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input error input-sm" type="color"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input error input-sm" type="email" placeholder="name@example.com"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input error input-sm" type="date"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input error input-sm" type="number" placeholder="XX"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <h2>Inputs - (Size: Large)</h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input input-lg" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input input-lg" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input input-lg" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input input-lg" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input input-lg" type="number" placeholder="XX"> | ||
| <h2>Inputs (Disabled) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input disabled input-lg" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input disabled input-lg" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input disabled input-lg" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input disabled input-lg" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input disabled input-lg" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input disabled input-lg" type="number" placeholder="XX"> | ||
| <h2>Inputs (Focus) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input focus input-lg" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input focus input-lg" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input focus input-lg" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input focus input-lg" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input focus input-lg" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input focus input-lg" type="number" placeholder="XX"> | ||
| <h2>Inputs (Active) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input active input-lg" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input active input-lg" type="password" placeholder="Choose a password"> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input active input-lg" type="color"> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input active input-lg" type="email" placeholder="name@example.com"> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input active input-lg" type="date"> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input active input-lg" type="number" placeholder="XX"> | ||
| <h2>Inputs (Error) </h2> | ||
| <label class="input-label">Name: </label> | ||
| <input class="input error input-lg" type="text" placeholder="Enter your Name"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <label class="input-label">Password: </label> | ||
| <input class="input error input-lg" type="password" placeholder="Choose a password"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <!-- <label class="input-label">Color: </label> | ||
| <input class="input error input-lg" type="color"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| --> | ||
| <label class="input-label">Email: </label> | ||
| <input class="input error input-lg" type="email" placeholder="name@example.com"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| <!-- <label class="input-label">Date: </label> | ||
| <input class="input error input-lg" type="date"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| --> | ||
| <label class="input-label">Amount: </label> | ||
| <input class="input error input-lg" type="number" placeholder="XX"> | ||
| <label class="input-label error">We were unable to process your input.</label> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * ========================================================================== | ||
| * Inputs | ||
| * ========================================================================== | ||
| */ | ||
|
|
||
| @import | ||
| "dist/chassis", | ||
| "mixins"; | ||
|
|
||
| .input { | ||
| @include input(); | ||
| } | ||
|
|
||
| .input-label { | ||
| @include input-label(); | ||
| } | ||
|
|
||
| /* Input Sizes */ | ||
|
||
|
|
||
| .input-lg { | ||
| @include input-lg(); | ||
| } | ||
|
|
||
| .input-sm { | ||
| @include input-sm(); | ||
| } | ||
|
|
||
| /* Checkboxes and RadioButtons (IDK why radiobuttons remind me of radiohead yo!) */ | ||
|
||
|
|
||
| .radiobutton { | ||
|
||
| @include radiobutton(); | ||
| } | ||
|
|
||
| .checkbox { | ||
| @include checkbox(); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these inline but radio buttons aren't?