All Projects → suitcss → Suit

suitcss / Suit

Licence: mit
Style tools for UI components

Programming Languages

HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Suit

Cessie
Transpile your CSS bundle to support CSS variables, calc, and future CSS for legacy browsers.
Stars: ✭ 81 (-97.85%)
Mutual labels:  postcss, preprocessor
Preprocessor
A future-facing CSS preprocessor (used by SUIT CSS)
Stars: ✭ 132 (-96.49%)
Mutual labels:  postcss, preprocessor
Poststylus
PostCSS adapter for Stylus
Stars: ✭ 279 (-92.59%)
Mutual labels:  postcss, preprocessor
Postcss Utilities
PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for your CSS
Stars: ✭ 293 (-92.21%)
Mutual labels:  postcss
Front End
Operation Code's website
Stars: ✭ 301 (-92%)
Mutual labels:  postcss
Axis
terse, modular & powerful css library
Stars: ✭ 317 (-91.58%)
Mutual labels:  postcss
React Mobx Typescript Boilerplate
A bare minimum frontend boilerplate with React 16.7, Typescript 3.2 and Webpack 4
Stars: ✭ 378 (-89.95%)
Mutual labels:  postcss
Webpack Blocks
📦 Configure webpack using functional feature blocks.
Stars: ✭ 2,992 (-20.49%)
Mutual labels:  postcss
Nuxt Purgecss
Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js
Stars: ✭ 356 (-90.54%)
Mutual labels:  postcss
Electron React Webpack Boilerplate
Minimal Electron, React, PostCSS and Webpack boilerplate to help you get started with building your next app.
Stars: ✭ 312 (-91.71%)
Mutual labels:  postcss
Kratos Boilerplate
🔥 A simple boilerplate for creating statics PWA using Webpack, Pug, PostCSS and CSS Modules
Stars: ✭ 308 (-91.82%)
Mutual labels:  postcss
React Director Admin Template
ReactJS version of Director Responsive Admin Template Free
Stars: ✭ 304 (-91.92%)
Mutual labels:  postcss
Babel Plugin Css Modules Transform
Extract css class names from required css module files, so we can render it on server.
Stars: ✭ 318 (-91.55%)
Mutual labels:  preprocessor
Docpad
Empower your website frontends with layouts, meta-data, pre-processors (markdown, jade, coffeescript, etc.), partials, skeletons, file watching, querying, and an amazing plugin system. DocPad will streamline your web development process allowing you to craft powerful static sites quicker than ever before.
Stars: ✭ 3,035 (-19.35%)
Mutual labels:  preprocessor
Awesome Postcss
A curate list about PostCSS
Stars: ✭ 360 (-90.43%)
Mutual labels:  postcss
Reshape
💠 transform html with javascript plugins
Stars: ✭ 314 (-91.66%)
Mutual labels:  postcss
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (-90.62%)
Mutual labels:  postcss
React Redux Boilerplate
Awesome React Redux Workflow Boilerplate with Webpack 4
Stars: ✭ 307 (-91.84%)
Mutual labels:  postcss
Support
JS.coach is a manually curated list of packages related to React, Webpack, Babel and PostCSS
Stars: ✭ 305 (-91.89%)
Mutual labels:  postcss
Gulp Tutorial
Code examples for my Gulp.js tutorial series
Stars: ✭ 383 (-89.82%)
Mutual labels:  postcss

SUIT CSS

Gitter

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.

Quick start

Install the SUIT package and preprocessor with npm:

npm install suitcss --save
npm install suitcss-preprocessor --save-dev

Create an index.css that will import the SUIT packages. Add values for the custom media queries and any custom properties that you wish to override:

@import "suitcss";

@custom-media --sm-viewport (min-width: 320px) and (max-width: 640px);
@custom-media --md-viewport (min-width: 640px) and (max-width: 960px);
@custom-media --lg-viewport (min-width: 960px);

:root {
  --Grid-gutterSize: 25px;
}

Packages can also be installed independently for a more modular build:

npm install suitcss-utils-size suitcss-components-grid --save
@import "suitcss-components-grid";
@import "suitcss-utils-size";

Add an entry to the scripts object in package.json that will run the preprocessor:

"scripts": {
  "build": "suitcss index.css build/build.css"
}

Now run npm run build on the command line to output the built packages to build/build.css. The preprocessor can also watch for file changes by passing the -w flag e.g. npm run build -- -w.

Refer to the SUIT theme for a more thorough example.

Community Packages

Components

Utilities

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 */

@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-highlightColor: orange;
}

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

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

  • npm: npm install suitcss

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, offers minification and allows additional PostCSS plugins to be added. A CLI and Node API are available

The preprocessor makes use of:

Packages are linted with postcss-bem-linter and minification is provided by cssnano.

Complementary tools and libraries

Libraries / frameworks for component-based development:

Tools and dependency managers:

  • npm: package manager.
  • html-inspector: test HTML templates for SUIT CSS conformance.

Development

Install Node (comes with npm).

To generate a build:

npm run build

Browser support

  • Google Chrome (latest)
  • Opera (latest)
  • Firefox 4+ (28+ for flex)
  • Safari 5+ (6.1+ for flex)
  • Internet Explorer 9+ (10+ for flex)

Refer to the caniuse page for flexbox.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].