GithubHelp home page GithubHelp logo

trowel / trowel Goto Github PK

View Code? Open in Web Editor NEW
82.0 10.0 4.0 558 KB

⚠️ DEPRECATED. Trowel is a Sass toolkit that allows you to create and use CSS frameworks with the most flexible pattern ever designed.

Home Page: http://trowel.github.io/

License: MIT License

JavaScript 2.69% CSS 96.41% HTML 0.90%
trowel sass sass-framework sass-mixins sass-functions

trowel's Introduction

Trowel

Trowel

CircleCI Bower npm

The most evolving way to write scss code

Download

# with bower
bower install trowel-core --save

# with npm
npm install trowel-core --save

# with yarn
yarn add trowel-core

What is Trowel ?

Trowel is made for helping you to create and customize visual components.

The frameworks state of play

CSS frameworks like Bootstrap or Foundation are great to start projets because they provide solid bases to your front-end design. Sass and less versions of thoses librairies are even better because they allow you to customize the UI through variables like below :

// typical way to customize a framework with scss variables.
$button-primary-bg: rgb(31, 13, 51) !default;
$button-success-bg: rgb(55, 211, 189) !default;
$button-warning-bg: rgb(255, 176, 0) !default;
$button-danger-bg: rgb(253, 65, 100) !default;

But maybe you just need two themes for you button component or maybe you need to create a fith theme. Today you cannot do this easily and quickly with variables and it makes framework painful to use when you need deep changes from your design.

The Trowel way

Trowel is a Sass extension designed to create framework easier and quicker to customize. The key feature provided by Trowel is a new way to write scss variables : we will defined into a single variable all the variants for a property.

If we translate in Trowel variable the previous example we will need a single variable :

// the trowel variable for button backgrounds
$button-bg: (
  '-primary': rgb(31, 13, 51),
  '-success': rgb(55, 211, 189),
  '-warning': rgb(255, 176, 0),
  '-danger': rgb(253, 65, 100),
) !default;

Then Trowel will loop over the map $button-bg and generate css declaration for each button variant.

You don't need .btn--danger button variant ? Just redefine the $button-bg variable without the '-danger' and you won't find it into your style.

You want to add an 'info' variant for your button component ? Rewrite the $button-bg map by adding a new entry with '-info'' as entry and the color you want as value.

Learn Trowel

If you want to learn how to use a Trowel component and create your own, check out our getting started tutorial.

Contribution

A contribution guide is coming soon

trowel's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trowel's Issues

Setting up visual constants shared to all trowel components

In order to provide by default, a coherent and consistent UI through all the friends of trowel components or even the non-official components. We need to set up inside trowel-core library some constants that will be common and not overwritten like

  • font-sizes
  • colors
  • font-family
  • spacings

Provide them as answer to this issue.

Once those constants setted up by the @Trowel/design-team , we will materialize them into code that will be easily used and overwritten through configuration.

Forbid some flags to a variable

Add the possibility to add a new param to the declaration mixin, that will not allow the usage of some setted flags for the variable associated to the mixin

Better config pattern

Make possible to overwrite a config map that contains all relatives config params (selector basic options or media-queries)

Make some declaration required

Add the possibility to add a new param to the declaration mixin, that will be a bool describing if the variable passed can be null or not.

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.