lintel-contrib-buttons
Buttons for lintel.
Getting Started
This module requires Lintel.
If you haven't used Lintel before, be sure to check out the Getting Started guide, as it explains how to install and use this module. Once you're familiar with that process, you may install this module with this command:
bower install lintel-contrib-buttons --save
Once the module has been installed, you will have to load it in your main SASS file:
You can use wiredep or grunt-wiredep to automatically inject files in your build process.
Variables
Check the vars file in the sass
folder to see the full list of variables you can customize.
$btn-include-inverse
Type: Boolean
Default value: true
Include styles for inverse buttons (light background)?
$btn-include-block-all
Type: Boolean
Default value: true
Include .btn-block-*-max
where *
is the prefix for each breakpoint max-resolution? (ex. .btn-block-sm-max
)
$btn-include-block-all
Type: Boolean
Default value: true
Include .btn-block-sm-max
? Assumed true if $btn-include-block-all
is true.
Mixins
Check the mixins file in the sass
folder to see how you can extend this module.
make-btn($bg[, $border, $text, $bg-inverse, $border-inverse, $text-inverse])
Default $border: darken($bg, 10%)
Default $text: #fff
Default $bg-inverse: $bg
Default $border-inverse: $border
Default $text-inverse: $text
Provide at least:
$bg
If using inverse styles, also include:
$bg-inverse
$border-inverse
$text-inverse
.btn-primary
make-btn-block($screen-size, $class)
Create a btn-block-*-max class for a new max-resolution.
Example Buttons
Default
Hello World
Link
Be sure to include role="button"
for accessibility if the button does not link to a page.
Hello World
Primary
Hello World
Inverse Primary
Hello World
Disabled Button
Hello World
Active Button
Hello World
Always Block
Hello World
Block on $screen-sm-max and below
Hello World
Smaller Button
Hello World
Example Button Groups
Button Group
1 2 3
With Hidden Buttons
Use the .first
and .last
classes to fix the border-radius where appropriate.
.first
- first visually visible button that's not:first-child
.last
- last visually visible button that's not:last-child
.
1 2 3
Example Dropdowns
Single Dropdown
Dropdown
Open Dropdown
...
Split Dropdown
Split Dropdown
Nested Button Groups
Split Dropdown Button Button
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
License
Copyright (c) 2014 Marius Craciunoiu. Licensed under the MIT license.