Giter Site home page Giter Site logo

puzzle-sass's Introduction

Puzzle sass

This package provides composable (atomic) css classes wich are grouped to related modules. We provide consistent APIs across the modules including "conditional parameters" which are awesome and handy for responsive designs. You can configure whole project from within one javascript file and use its power in your scss files.

Configuration

By default puzzle-sass searching for puzzleSass.config.js in working directory.

Terminology

Module - Set of css classes which operates on related css properties eg. font, flex padding margin etc.. So APIs are divided into modules. modules are prefixed with mod- keyword.

Submodule - Targets on spacific css property. There is point where atomicity is created.

.mod-flex-align /* Submodule of flex which target on align-content css property */
.mod-flex-justify /* Submodule of flex which target on justify-content css property */

.mod-grid-container /* Submodule of grid which creates container */
.mod-grid-item /* Submodule of grid which creates item */

Submodule params - Are class names with module name prefix which acts as values for css properties.

.mod-flex-align .flex-center /* Parameter of submodule flex-align which tells where to align items */
.mod-flex-justify .flex-center /* Parameter of submodule flex-justify which tells where to justify content */

Conditional params - Are class names very similar to "submodule params" with one exception. They ends with breakpoint value.

.mod-flex-align .flex-center-md .flex-bottom-lg .flex-start-xl /* conditionaly pass parameters to flex-align css property*/

Rules of css class APIs

  1. Each module class name begins with mod followed by module name eg. .mod-flex, .mod-grid
  2. Each module namespace its arguments eg. .mod-grid-container .grid-align-top, .mod-flex-align .flex-center
  3. Each module supports breakpoints modificators (aka. conditional parameters) eg. .flex-center-xs .flex-top-md

Usage

We can divide usage on two parts:

  1. class inheritance approach
  2. using sass functions approach (they are backed by javascript under the hood ๐Ÿ‘๐Ÿ‘)

We can achive best usage comfort with combined together.

Usa case of "class inheritance approach"

todo

Build process

todo

Modules

todo

puzzle-sass's People

Contributors

martinkreizl avatar

Watchers

 avatar

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.