Skip to content
/ suit Public
forked from suitcss/suit

CSS for building self-contained, composable, configurable UI components

License

Notifications You must be signed in to change notification settings

fat/suit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SUIT CSS

CSS for building self-contained, composable, configurable UI components.

SUIT CSS aims to provide a reliable and testable styling solution for component-oriented approaches to web application development. It provides some pre-authored utilities and components, but using them is not required.

Documentation.

Installation

It's suggested that you depend on individual packages as and when you need them, however, you can install the standard library if you prefer.

Features

  • Simple methodology. Read the documentation.
  • Clear relationship between HTML and CSS.
  • Scope styles to the component they're intended for.
  • Utilities provide structural and component-independent traits.
  • Theming support is available via a limited subset of W3C-spec style variables.
  • Pick-and-choose pre-rolled utilities and structural components.
  • Supporting tools.

CSS packages

Each package is stand-alone, contains its own documentation and tests, and is written to follow a common set of naming conventions. Dependencies are best managed using Component or npm.

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

Complementary tools

Tools that work well with SUIT when building applications.

Plays well with…

Example

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">
      <a class="Button Button--secondary">{{button_text}}</a>
    </span>
  </div>
</article>

CSS:

/** @define Excerpt */

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

:root {
  var-padding-Excerpt: 20px;
  var-border-color-Excerpt-thumbnail: #000;
}

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

.Excerpt-thumbnail {
  border: 2px solid var(border-color-Excerpt-thumbnail);
  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;
}

Development

Install Node (comes with npm).

npm install

To generate a build:

npm run build

Browser support

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

About

CSS for building self-contained, composable, configurable UI components

Resources

License

Stars

Watchers

Forks

Packages

No packages published