Code Monkey home page Code Monkey logo

jss's Introduction

JSS

Codeship ![Gitter](https://badges.gitter.im/Join Chat.svg) bitHound Score

JSS is a higher level abstraction over CSS. It allows you to describe styles in JSON and leverage the power of JavaScript. It generates style sheets at runtime or server-side and solves a number of CSS issues.

You can use JSS with React, or with any other js library. It is small, modular and extensible via plugins API.

Links

Installation and setup

Full documentation

Playground

Online examples.

Official plugins

External projects

When should I use it?

  • You build a JavaScript heavy application.
  • You use components based architecture.
  • You build a reusable UI library.
  • You need a conflict free CSS (external content, third-party UI components ...).
  • You need code sharing between js and css.
  • Minimal download size is important to you.
  • Robustness and code reuse is important to you.
  • Ease of maintenance is important to you.

Example

export default {
  headline: {
    fontSize: 20
  },
  title: {
    extend: 'headline',
    position: 'absolute',
    zIndex: 10,
    '&:hover': {
      background: 'red'
    }
  },
  button: {
    width: 100
  },
  '@media (min-width: 1024px)': {
    button: {
      width: 200
    }
  }
}

Converts to:

.headline-jss-0 {
  font-size: 20px;
}
.title-jss-1 {
  font-size: 20px;
  position: absolute;
  z-index: 10;
}
.title-jss-1:hover {
  background: red;
}
.button-jss-2 {
  width: 100px;
}
@media (min-width: 1024px): {
  .button-jss-2 {
    width: 200px;
  }
}

License

MIT

Thanks

Thanks to BrowserStack for providing the infrastructure that allows us to run our build in real browsers and to all awesome contributors.

jss's People

Contributors

0xr avatar alexkuz avatar allain avatar gcallaghan avatar gitter-badger avatar greenkeeperio-bot avatar joshgillies avatar kof avatar markdalgleish avatar nikgraf avatar nkbt avatar qimingweng avatar timothykrell avatar urbantumbleweed avatar wldcordeiro avatar

Watchers

 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.