Code Monkey home page Code Monkey logo

better-bourbon-buttons's Introduction

Better Bourbon Buttons

Better button mixins for [Bourbon scss framework].

Demo

For a look at how everything looks, check out this page with code samples and rendered buttons.

Usage

Include the mixins into your SCSS declarations.

button.purple {
    // This will create a purple button
    @include bbb_flat_style(#e310eb, white); // Ooooh flat style OTB!
    @include bbb_size(2); // I would like it bigger than usual please
}

Available styles

This is a list with the available mixin styles and their usage.

  • 3D Style: @include bbb_3D_style($background-color, $color, $shadow-size);
  • Bordered Style: @include bbb_bordered_style($border-color, $color);
  • Flat Style: @include bbb_flat_style($background-color, $color);
  • Simple Style: @include bbb_simple_style($background-color, $color);

You can also change the size of the button with the size mixin. It is not obligatory, but it is a very easy way to set button size.

@include bbb_size(1);  # you can use multipliers to define size
@include bbb_size(10px);  # or pass the size you want with units

Expandability / Alternative styles

As Bourbon framework is itself designed to be expanded, the same logic applies to to these mixins. You will find it rather easy to create your own stylings and modify the already defined styles.

Lets create a pill button.

button.pill {
  @include bbb_simple_style();
  @include bbb_size();
  border-radius: 100px;
}

Installation

For now, just copy/paste the files into a directory and @import("better-bourbon-buttons/bbb");. There will be a better way in the near future.

Contributions

Contributions are welcome! Please create a pull request.

better-bourbon-buttons's People

Contributors

jayroh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

better-bourbon-buttons's Issues

Example screenshots of the buttons

For a piece of sass/bourbon work saying that it's better than the default - the best way to convey that would be to show (in addition to tell).

Therefore, screenshots would be pretty great :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.