This repository was archived by the owner on Dec 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Buttons: Initial pass at buttons, covering sizes, options, disabled, active, focus, and hover states #97
Closed
+1,225
−5
Closed
Buttons: Initial pass at buttons, covering sizes, options, disabled, active, focus, and hover states #97
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
88a4de6
Buttons: Initial pass at buttons, covering sizes, options, and states
sfrisk b672e22
Buttons: Spaces to Tabs fix for buttons.html
sfrisk 889e914
Buttons: Switched to Mixins
sfrisk 10efba1
Buttons: Removing box-sizing
sfrisk 12be9ed
Buttons: Adding reset demo
sfrisk f425e31
Buttons: IE=edge and adding a type=button example
sfrisk ff413db
Buttons: Added classes for each state, demos, cleaned up variable names
sfrisk 765b19b
Buttons: bug fix
sfrisk 5fa9d3c
Buttons: Fixed Typos
sfrisk b88bbbd
Buttons: Removing # of background declarations per selector
sfrisk 5c0a7ec
Buttons: Fixing typos in demo file
sfrisk ccc4bf9
Buttons: Fixing css linting breaking the build
sfrisk e23fde7
Buttons: Pull in jsass-vars into button variables
sfrisk 3cb1565
Buttons: Adding Success/Info/Warning/Danger buttons
sfrisk e74e4db
Buttons: Adjusting rounded corner variable
sfrisk 005be5e
Buttons: linking to min file
sfrisk 435dd5e
Buttons: Add pointer cursor to buttons
sfrisk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,279 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>CSS Chassis - Buttons</title> | ||
<meta name="description" content="Typography skeleton for styling"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../dist/css/chassis.min.css"> | ||
<link rel="stylesheet" href="demos.css"> | ||
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,400italic,700italic" rel="stylesheet"> | ||
</head> | ||
<body> | ||
|
||
<h1>CSS Chassis</h1> | ||
|
||
<h2>Button Classes</h2> | ||
|
||
<p>Use the button classes on an <code><a></code>, <code><button></code>, or <code><input></code> element. | ||
|
||
|
||
<form> | ||
<a class="ui-button--default" href="#" role="button">Link</a> | ||
<button class="ui-button--default" type="button">Button</button> | ||
<button class="ui-button--default" type="submit">Submit Button</button> | ||
<input class="ui-button--default" type="button" value="Input"> | ||
<input class="ui-button--default" type="submit" value="Submit"> | ||
<input class="ui-button--default" type="reset" value="Reset"> | ||
</form> | ||
|
||
<h2>Options</h2> | ||
|
||
<form> | ||
<button class="ui-button--default" type="submit">Default</button> | ||
<button class="ui-button--primary" type="submit">Primary</button> | ||
<button class="ui-button--success" type="submit">Success</button> | ||
<button class="ui-button--info" type="submit">Info</button> | ||
<button class="ui-button--warning" type="submit">Warning</button> | ||
<button class="ui-button--danger" type="submit">Danger</button> | ||
|
||
|
||
</form> | ||
|
||
<h3>Sizes</h3> | ||
|
||
<form> | ||
<p> | ||
<button class="ui-button--default--large" type="submit">Large</button> | ||
<button class="ui-button--primary--large" type="submit">Large</button> | ||
<button class="ui-button--success--large" type="submit">Large</button> | ||
<button class="ui-button--info--large" type="submit">Large</button> | ||
<button class="ui-button--warning--large" type="submit">Large</button> | ||
<button class="ui-button--danger--large" type="submit">Large</button> | ||
</p> | ||
<p> | ||
<button class="ui-button--default" type="submit">Default</button> | ||
<button class="ui-button--primary" type="submit">Default</button> | ||
<button class="ui-button--success" type="submit">Default</button> | ||
<button class="ui-button--info" type="submit">Default</button> | ||
<button class="ui-button--warning" type="submit">Default</button> | ||
<button class="ui-button--danger" type="submit">Default</button> | ||
</p> | ||
<p> | ||
<button class="ui-button--default--small" type="submit">Small</button> | ||
<button class="ui-button--primary--small" type="submit">Small</button> | ||
<button class="ui-button--success--small" type="submit">Small</button> | ||
<button class="ui-button--info--small" type="submit">Small</button> | ||
<button class="ui-button--warning--small" type="submit">Small</button> | ||
<button class="ui-button--danger--small" type="submit">Small</button> | ||
</p> | ||
<p> | ||
<button class="ui-button--default--extra-small" type="submit">Extra Small</button> | ||
<button class="ui-button--primary--extra-small" type="submit">Extra Small</button> | ||
<button class="ui-button--success--extra-small" type="submit">Extra Small</button> | ||
<button class="ui-button--info--extra-small" type="submit">Extra Small</button> | ||
<button class="ui-button--warning--extra-small" type="submit">Extra Small</button> | ||
<button class="ui-button--danger--extra-small" type="submit">Extra Small</button> | ||
</p> | ||
</form> | ||
|
||
|
||
<h2>Disabled State</h2> | ||
|
||
<h3>Button Element</h3> | ||
|
||
<p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p> | ||
|
||
<form> | ||
<p> | ||
<button class="ui-button--default--large" disabled="disabled" type="submit">Large</button> | ||
<button class="ui-button--primary--large" disabled="disabled" type="submit">Large</button> | ||
<button class="ui-button--success--large" disabled="disabled" type="submit">Large</button> | ||
<button class="ui-button--info--large" disabled="disabled" type="submit">Large</button> | ||
<button class="ui-button--warning--large" disabled="disabled" type="submit">Large</button> | ||
<button class="ui-button--danger--large" disabled="disabled" type="submit">Large</button> | ||
</p> | ||
<p> | ||
<button class="ui-button--default" disabled="disabled" type="submit">Default</button> | ||
<button class="ui-button--primary" disabled="disabled" type="submit">Default</button> | ||
<button class="ui-button--success" disabled="disabled" type="submit">Default</button> | ||
<button class="ui-button--info" disabled="disabled" type="submit">Default</button> | ||
<button class="ui-button--warning" disabled="disabled" type="submit">Default</button> | ||
<button class="ui-button--danger" disabled="disabled" type="submit">Default</button> | ||
</p> | ||
<p> | ||
<button class="ui-button--default--small" disabled="disabled" type="submit">Small</button> | ||
<button class="ui-button--primary--small" disabled="disabled" type="submit">Small</button> | ||
<button class="ui-button--success--small" disabled="disabled" type="submit">Small</button> | ||
<button class="ui-button--info--small" disabled="disabled" type="submit">Small</button> | ||
<button class="ui-button--warning--small" disabled="disabled" type="submit">Small</button> | ||
<button class="ui-button--danger--small" disabled="disabled" type="submit">Small</button> | ||
</p> | ||
<p> | ||
<button class="ui-button--default--extra-small" disabled="disabled" type="submit">Extra Small</button> | ||
<button class="ui-button--primary--extra-small" disabled="disabled" type="submit">Extra Small</button> | ||
<button class="ui-button--success--extra-small" disabled="disabled" type="submit">Extra Small</button> | ||
<button class="ui-button--info--extra-small" disabled="disabled" type="submit">Extra Small</button> | ||
<button class="ui-button--warning--extra-small" disabled="disabled" type="submit">Extra Small</button> | ||
<button class="ui-button--danger--extra-small" disabled="disabled" type="submit">Extra Small</button> | ||
</p> | ||
</form> | ||
|
||
|
||
<h3>Setting Button Appearance Via Classes</h3> | ||
|
||
<p>Sometimes you might need to set the class of a ui-button to display a state. This code works with <code><a></code>, <code><button></code>, or <code><input></code> elements.</p> | ||
|
||
<h3>Disabled Class</h3> | ||
<p>Add <code>--disabled</code> to the end of the button class.</p> | ||
<form> | ||
<p> | ||
<a class="ui-button--default--large--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--primary--large--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--success--large--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--info--large--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--warning--large--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--danger--large--disabled" href="#" role="button">Disabled</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--primary--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--success--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--info--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--warning--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--danger--disabled" href="#" role="button">Disabled</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--primary--small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--success--small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--info--small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--warning--small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--danger--small--disabled" href="#" role="button">Disabled</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--extra-small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--primary--extra-small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--success--extra-small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--info--extra-small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--warning--extra-small--disabled" href="#" role="button">Disabled</a> | ||
<a class="ui-button--danger--extra-small--disabled" href="#" role="button">Disabled</a> | ||
</p> | ||
</form> | ||
|
||
<h3>Active Class</h3> | ||
<p>Add <code>--active</code> to the end of the button class.</p> | ||
<form> | ||
<p> | ||
<a class="ui-button--default--large--active" href="#" role="button">Active</a> | ||
<a class="ui-button--primary--large--active" href="#" role="button">Active</a> | ||
<a class="ui-button--success--large--active" href="#" role="button">Active</a> | ||
<a class="ui-button--info--large--active" href="#" role="button">Active</a> | ||
<a class="ui-button--warning--large--active" href="#" role="button">Active</a> | ||
<a class="ui-button--danger--large--active" href="#" role="button">Active</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--active" href="#" role="button">Active</a> | ||
<a class="ui-button--primary--active" href="#" role="button">Active</a> | ||
<a class="ui-button--success--active" href="#" role="button">Active</a> | ||
<a class="ui-button--info--active" href="#" role="button">Active</a> | ||
<a class="ui-button--warning--active" href="#" role="button">Active</a> | ||
<a class="ui-button--danger--active" href="#" role="button">Active</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--primary--small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--success--small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--info--small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--warning--small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--danger--small--active" href="#" role="button">Active</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--extra-small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--primary--extra-small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--success--extra-small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--info--extra-small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--warning--extra-small--active" href="#" role="button">Active</a> | ||
<a class="ui-button--danger--extra-small--active" href="#" role="button">Active</a> | ||
</p> | ||
</form> | ||
|
||
<h3>Focus Class</h3> | ||
<p>Add <code>--focus</code> to the end of the button class.</p> | ||
<form> | ||
<p> | ||
<a class="ui-button--default--large--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--primary--large--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--success--large--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--info--large--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--warning--large--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--danger--large--focus" href="#" role="button">Focus</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--primary--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--success--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--info--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--warning--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--danger--focus" href="#" role="button">Focus</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--primary--small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--success--small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--info--small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--warning--small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--danger--small--focus" href="#" role="button">Focus</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--extra-small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--primary--extra-small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--success--extra-small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--info--extra-small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--warning--extra-small--focus" href="#" role="button">Focus</a> | ||
<a class="ui-button--danger--extra-small--focus" href="#" role="button">Focus</a> | ||
</p> | ||
</form> | ||
|
||
<h3>Hover Class</h3> | ||
<p>Add <code>--hover</code> to the end of the button class.</p> | ||
<form> | ||
<p> | ||
<a class="ui-button--default--large--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--primary--large--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--success--large--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--info--large--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--warning--large--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--danger--large--hover" href="#" role="button">Hover</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--primary--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--success--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--info--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--warning--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--danger--hover" href="#" role="button">Hover</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--primary--small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--success--small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--info--small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--warning--small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--danger--small--hover" href="#" role="button">Hover</a> | ||
</p> | ||
<p> | ||
<a class="ui-button--default--extra-small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--primary--extra-small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--success--extra-small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--info--extra-small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--warning--extra-small--hover" href="#" role="button">Hover</a> | ||
<a class="ui-button--danger--extra-small--hover" href="#" role="button">Hover</a> | ||
</p> | ||
</form> | ||
|
||
|
||
|
||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Missing a
type="reset"
example