Code Monkey home page Code Monkey logo

css-utilities's Introduction

Creates a css file with css utility classes

Installation

Clone & run npm install.

Source is css-utilities.js

Uses string templates as the code was original in a Styled Components component.

Run generate to create the css-utilities.css file.

Settings in css-utilties.js

  • Breakpoints

  • Prefixes for breakpoint classes

    • mobile: no prefix
    • 576: sm:
    • 768: md:
    • 992: lg:
    • 1200: xl:
  • Default spacing (code actually uses rems)

    • 0: 0
    • 1: 4px
    • 2: 8px
    • 3: 16px;
    • 4: 24px;
    • 5: 48px
    • 6: 64px

e.g. p-0 no padding

pt-3 md:pt-0 Top padding of 16px for mobile. No padding at 768 & above.

m-x: left & right

m-y: top & bottom

  • Display & flex

    • d-none
    • d-flex
    • d-block
    • d-inline
    • d-inline-block
    • flex-row
    • flex-column
    • flex-row-reverse
    • flex-column-reverse
    • flex-wrap
    • flex-nowrap
    • justify-between
    • justify-start
    • justify-center
    • justify-end
    • align-content-start
    • align-content-center
    • align-content-end
    • align-items-stretch
    • align-items-start
    • align-items-center
    • align-items-end
    • align-self-start
    • align-self-center
    • align-self-end

    eg visible on desktop: d-none lg:d-flex visible on mobile only: sm:d-none

  • Some typography

    • text-left
    • text-center
    • text-right
    • text-bold
    • text-normal
    • text-italic
    • text-lowercase
    • text-uppercase
  • Width & height percentages

    • 25, 33, 50, 66, 75, 100
    • eg w-75, mh-100
  • Responsive images

    • img-responsive
    • img-height-full
    • img-height-auto
    • img-contain

css-utilities's People

Contributors

peterorum avatar dependabot[bot] avatar

Watchers

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