mirror of
https://github.com/Chalarangelo/mini.css.git
synced 2025-04-16 02:12:07 +02:00
Button and button group documentation
This commit is contained in:
parent
365bde4392
commit
cf37f44d13
@ -616,3 +616,4 @@
|
||||
|
||||
- Documented `radio` and `checkbox` in the `input_control` doc page.
|
||||
- Tweaked all references of `$back-color` to now use `#fafafa` instead of the previous `#f5f5f5`. This will make contrast better and allow for better visibility of certain pieces of text.
|
||||
- Full documentation for `button`s and `button-group`s.
|
||||
|
@ -394,29 +394,76 @@
|
||||
</div>
|
||||
<div class="section row">
|
||||
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
|
||||
<!-- sample -->
|
||||
<button>Default button</button>
|
||||
<button class="primary">Primary button</button>
|
||||
<button class="secondary">Secondary button</button>
|
||||
<button class="tertiary">Tertiary button</button>
|
||||
<button class="inverse">Inverse button</button>
|
||||
<button class="small">Small button</button>
|
||||
<button class="large">Large button</button>
|
||||
<button disabled>Disabled button</button>
|
||||
<h4>Button group</h4>
|
||||
<div class="button-group">
|
||||
<button>Button</button>
|
||||
<button>Button</button>
|
||||
<button>Button</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
|
||||
<p></p>
|
||||
<p>All button types have been stylized by default, while maintaining accessiblity. Simply add any <code><button></code> or an <code><input></code> with a button <code><span class="secondary">type</span></code> (i.e. <code><span class="fore-primary">"button"</span></code>, <code><span class="fore-primary">"submit"</span></code> or <code><span class="fore-primary">"reset"</span></code>) and they will be styled accordingly. You can also use the <code>.button</code> class for links, labels and other elements of your choice to make them look like buttons.</p>
|
||||
<p>Color variants are available in the form of the <code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code> and <code>.inverse</code> classes. Size variants are available as well in the form of <code>.small</code> and <code>.large</code> classes.</p>
|
||||
<p>Finally, you can create responsive groups of buttons by wrapping them inside a <code><div></code> with the <code>.button-group</code> class.</p>
|
||||
<h3>Sample code</h3>
|
||||
<pre></pre>
|
||||
<pre><button>Default button</button>
|
||||
<input type="button" class="primary" value="Primary button">
|
||||
<input type="reset" class="secondary" value="Secondary button">
|
||||
<input type="submit" class="tertiary" value="Tertiary button">
|
||||
<button class="inverse">Inverse button</button>
|
||||
<button class="small">Small button</button>
|
||||
<button class="large">Large button</button>
|
||||
<button disabled>Disabled button</button>
|
||||
<a href="#" class="button">Link button</a>
|
||||
<label class="button">Label button</label>
|
||||
|
||||
<div class="button-group">
|
||||
<button>Button</button>
|
||||
<button>Button</button>
|
||||
<button>Button</button>
|
||||
</div></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h3>Notes</h3>
|
||||
<ul>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li>If you want more color or size variants for your buttons, check out the <a href="customization.html">customization</a> page.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<pre><!-- do code --></pre>
|
||||
<p class="do"><mark class="tertiary">Do:</mark> </p>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<pre><button class="inverse small">Small inverse button</button></pre>
|
||||
<p class="do"><mark class="tertiary">Do:</mark> You can mix and match button color and size variants to achieve the desired effect.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||
<pre><!-- don't code --></pre>
|
||||
<p class="dont"><mark class="secondary">Don't:</mark> </p>
|
||||
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||
<pre><button class="secondary inverse">Problematic button</button>
|
||||
<span class="fore-secondary"><!-- or --></span>
|
||||
<button class="small large">Problematic button</button></pre>
|
||||
<p class="dont"><mark class="secondary">Don't:</mark> Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<pre><div class="button-group">
|
||||
<button>Button</button>
|
||||
<input type="reset" class="secondary" value="Secondary button">
|
||||
<label class="button inverse">Label button</label>
|
||||
</div></pre>
|
||||
<p class="do"><mark class="tertiary">Do:</mark> You can use button color variants inside the same <code>.button-group</code>. You can also use any component styled like a button inside a <code>.button-group</code>.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||
<pre><div class="button-group">
|
||||
<button class="large">Button</button>
|
||||
<button>Button</button>
|
||||
<button class="small">Button</button>
|
||||
</div></pre>
|
||||
<p class="dont"><mark class="secondary">Don't:</mark> Avoid using button size variants inside a <code>.button-group</code>, as this might result in unexpected behavior.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -212,6 +212,22 @@
|
||||
<input type="reset" value="Tertiary reset button" class="tertiary">
|
||||
<input type="submit" value="Large submit button" class="large">
|
||||
<label disabled class="button small primary">Small primary disabled label button</label>
|
||||
<br><br>
|
||||
<button>Default button</button>
|
||||
<input type="button" class="primary" value="Primary button">
|
||||
<input type="reset" class="secondary" value="Secondary button">
|
||||
<input type="submit" class="tertiary" value="Tertiary button">
|
||||
<button class="inverse">Inverse button</button>
|
||||
<button class="small">Small button</button>
|
||||
<button class="large">Large button</button>
|
||||
<button disabled>Disabled button</button>
|
||||
<a href="#" class="button">Link button</a>
|
||||
<label class="button">Label button</label>
|
||||
<div class="button-group">
|
||||
<button>Button</button>
|
||||
<button>Button</button>
|
||||
<button>Button</button>
|
||||
</div>
|
||||
</div></main>
|
||||
<!-- End of page content-->
|
||||
<footer><strong>mini.css</strong> was designed and built by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||
|
Loading…
x
Reference in New Issue
Block a user