Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Buttons: Initial pass at buttons, covering sizes, options, disabled, active, focus, and hover states #97

Closed
wants to merge 17 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
"box-sizing": false,
"compatible-vendor-prefixes": false,
"duplicate-background-images": false,
"font-sizes": false,
"import": false,
"important": false,
"outline-none": false,
279 changes: 279 additions & 0 deletions demos/buttons.html
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>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</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">
Copy link
Contributor

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

<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>&lt;button&gt;</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>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</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>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@
"maintainers": [
{
"name": "Sarah Frisk",
"email": "sarah@sarahfrisk.net",
"url": "http://sarahfrisk.net"
"email": "sarah@sarahfrisk.com",
"url": "http://sarahfrisk.com"
},
{
"name": "Alexander Schmitz",
Loading