Giter Site home page Giter Site logo

walterbichi / less-space Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eomerx/less-space

0.0 2.0 0.0 27 KB

Responsive CSS Positioning classes built with LESS & SASS compatible with (or without) Bootstrap.

Home Page: http://aslanbakan.com/en/blog/less-space-responsive-css-margin-and-padding-helper-classes/

License: MIT License

JavaScript 9.35% CSS 90.65%

less-space's Introduction

LESS SPACE

Responsive CSS Spacing (Margin and Padding) classes built with LESS & SASS compatible with / without Bootstrap. It's 13kb minified and 1.3kb gzipped.

Download

Install via bower

bower install less-space

Clone via git

git clone //github.com/Eomerx/less-space.git

Installation

Add less-space.css or less-space.min.css to your html.


Changing responsive breakpoints

First, you must install npm dependencies

npm install

Then, compile stylesheets with Grunt

grunt

###Example Usage This code block means; holder class has margin-top: 20px for medium and large screens (above 768px width default),

and margin-top: 40px for extra small and small screens (up to 768px width)

<div class="container">
  <div class="row">
    <div class="col-sm-6">
      <div class="holder xs-mt-40 md-mt-20 ">
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel nemo facere veritatis molestias harum eveniet, eius modi?
        </p>
      </div><!-- "holder" -->
    </div><!-- "col-sm-6" -->
  </div><!-- "row" -->
</div><!-- "container" -->

Using with Bootstrap

copy src/less-space.less file to your Bootstrap less folder.

Then, import it in boostrap.less anywhere after variables.less

@import "less-space.less";

Comment out this lines, to get already defined variables from boostrap's variables.less

@screen-sm: 480px;
@screen-md: 768px;
@screen-lg: 992px;

Demo from CodePen


Version 1.1.1

1.0 First init

1.1.1 Added SASS support

License

MIT License

less-space's People

Contributors

eomerx avatar

Watchers

James Cloos avatar Walter Bichi 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.