Restyle the buttons according to a defined hierarchy.
Changes will include:
* Create styles for several button variants: primary, secondary (default), danger, link and large. * Support SVG icons within buttons. * Clean up some techinical debt: stop using YUI button CSS, consolidate button CSS used in core.
h3.CSS API
Buttons, hyperlinks and submit inputs can be styled as buttons. The CSS API for these is a bit different:
h4.Buttons For compatibility reasons, the button API stays the same. Buttons are not styled by default and need to be wrapped within a _span_ tag with a _.yui-button_ class. {code:html} <span class="yui-button primary"> <button>primary button</button> </span>
<span class="yui-button link-button"> <button>transparent link button</button> </span>
h4.Hyperlinks Hyperlinks can be styled as buttons just by adding the `.yui-button` class to them. Examples: {code:html} <a href="#" class="yui-button">hyperlink button</a> <a href="#" class="yui-button danger disabled">hyperlink button</a> {code}
h4.Submit inputs Inputs with the _type_ attribute equal to _submit_, _button_ or _reset_ have button styles applied by default. Examples:
Button types: * *Primary:* add the _.primary_ class to the _.yui-button_ element or input. * *Secondary:* default state. * *Danger:* add the _.danger_ class to the _.yui-button_ element or input. * *Link button:* transparent button. Add the _.link-button_ class to the _.yui-button_ element or input.
Modifiers: * *Large:* add the _.large-button_ class to the _.yui-button element or input.
Button types: * *Primary:* add the _.primary_ class to the _.yui-button_ element or input. * *Secondary:* default state. * *Danger:* add the _.danger_ class to the _.yui-button_ element or input. * *Link button:* transparent button. Add the _.link-button_ class to the _.yui-button_ element or input.
Modifiers: * *Large:* add the _.large-button_ class to the _.yui-button element or input.
h4* *Disabled:* add the _disabled_ attribute to the _<button>_ or _<input>_, or the _. Modifiersdisabled_ class to the _<a>_ element.
Restyle the buttons according to a defined hierarchy.
Changes will include: * Create styles for several button variants: primary, secondary (default), danger, link and large. * Support SVG icons within buttons. * Clean up some techinical debt: stop using YUI button CSS, consolidate button CSS used in core.
h3. CSS API
Buttons, hyperlinks and submit inputs can be styled as buttons. The CSS API for these is a bit different: h4. Buttons
For compatibility reasons, the button API stays the same. Buttons are not styled by default and need to be wrapped within a _span_ tag with a _.yui-button_ class. {code}
Button types: * *Primary:* add the _.primary_ class to the _.yui-button_ element or input. * *Secondary:* default state. * *Danger:* add the _.danger_ class to the _.yui-button_ element or input. * *Link button:* transparent button. Add the _.link-button_ class to the _.yui-button_ element or input.
Modifiers:
* *Large:* add the _.large-button_ class to the _.yui-buttonbutton_ element or input. * *Disabled:* add the _disabled_ attribute to the _<button>_ or _<input>_, or the _.disabled_ class to the _<a>_ element.