--- template: simple.tpl name: Introduction ---

Our pattern library comes as a easily distributed package, ready to use in multiple programming environments. It contains our basic CSS components and correct usage, as well as JavaScript components that are widely used across the website.

View on github

Distribution methods

Ruby logo

Ruby gem

uStyle was initially created as a gem. Some of the Sass functions rely on Ruby to run. You can install it via any Gemfile and it will install the required dependencies.

gem 'ustyle', git: "git@github.com:uswitch/ustyle.git"
Bower logo

Bower package

Install is as a bower package. This will pull down the original .scss files and compiled static CSS + JS.


        "dependencies": {
          "ustyle": "git@github.com:uswitch/ustyle.git#~0.19.1"
        }
      
Cloudfront logo

Cloudfront

Every time uStyle gets a new version, the version gets updated across our Cloudfront distributions.


        <!-- get latest -->
        <link href='//assets0.uswitch.com/s3/uswitch-assets-eu/ustyle/ustyle-latest.css' media='all' rel='stylesheet' type='text/css' />
        <!-- get versioned -->
        <link href='//assets0.uswitch.com/s3/uswitch-assets-eu/ustyle/VERSION/ustyle-latest.css' media='all' rel='stylesheet' type='text/css' />
      
NPM logo

NPM Package


        "devDependencies": {
          "ustyle": "git@github.com:uswitch/ustyle.git#~0.19.1"
        }
      

Browser support

We use Autoprefixer + Browserlist to decide what vendor prefixes to apply to our Sass files. We have a slightly wider browser support than the default (here). Currently we support all the way to IE8.

Below is what we support. Each line is the minimum version or % use based on CanIUse metrics

Browser Minimum version supported
Safari, Chrome Last 5 versions
Firefox 22
Opera 12.1
Internet Explorer 8 (unless stated)
Global usage > 1%

Installation

See our github for documentation on installing this across applications.