Git Product home page Git Product logo

suit's Introduction

SUIT CSS

Style tools for component-based UI development.

SUIT CSS provides a reliable and testable styling solution for component-based web application development. The project includes:

Each of these modules are made up of smaller modules, making it easy to customize your setup and build pipeline.

Documentation.

Example

SUIT CSS makes use of variables, custom media queries, and dependency resolution for CSS.

HTML:

<article class="Excerpt u-cf">
  <img class="Excerpt-thumbnail u-sizeFit" src="{{src}}" alt="">
  <div class="u-sizeFill">
    <h1 class="Excerpt-title"><a href="{{url}}">{{title}}</a></h1>
    <p class="Excerpt-text u-textBreak">{{description}}</p>
    <span class="Excerpt-readMore">
      <!-- BUTTON COMPONENT -->
    </span>
  </div>
</article>

CSS:

/** @define Excerpt; use strict */

@import "suitcss-utils-layout";
@import "suitcss-utils-size";
@import "suitcss-utils-text";
@import "./Button";

/**
 * Content excerpts. Agnostic of image size, and with a clear call to action.
 */

:root {
  --Excerpt-padding: 20px;
  --Excerpt-highlight-color: orange;
}

.Excerpt {
  padding: var(--Excerpt-padding);
}

.Excerpt-thumbnail {
  border: 2px solid var(--Excerpt-highlight-color);
  border-radius: 3px;
  margin-right: 10px;
}

.Excerpt-title {
  border-bottom: 1px solid #ccc;
  margin: 0 0 15px;
  padding-bottom: 5px;
}

.Excerpt-readMore {
  display: inline-block;
  margin-top: 10px;
}

CSS packages

Each CSS package can be installed with npm, Component(1), or Bower. It's suggested that you depend on individual packages as and when you need them, however, you can install all the CSS packages at once if you prefer:

Each package is stand-alone, contains its own documentation and tests, and is written to follow a common set of naming conventions.

You can also download pre-built bundles to try things out without setting up a build process:

Build and test tools

The suitcss-preprocessor runs CSS through a build pipeline. It performs per-file tests for conformance to the SUIT CSS naming conventions, and per-bundle tests for the IE selector limit. CSS build and test tools.

The preprocessor makes use of:

Complementary tools and libraries

Libraries / frameworks for component-based development:

Tools and dependency managers:

Development

Install Node (comes with npm).

npm install

To generate a build:

npm run build

Browser support

  • Chrome
  • Opera
  • Firefox
  • Safari 6+
  • Internet Explorer 9+

suit's People

Contributors

necolas avatar antontrollback avatar simonsmith avatar jakebresnehan avatar leevigraham avatar teddybradford avatar donnieberg avatar ruedap avatar

Watchers

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