supple-css

Supple CSS | utilities.offset

Utility which provides a offset custom property for use in objects or components which can handle those offsets eg. object.layout.

Read more about Supple CSS.

Table of contents

Features

Use

<div class="o-layout">
  <div class="u-offset-3">starts a column 3</div>
  <div class="u-offset-7">starts a column 7</div>
</div>

Available classes

By default we generate classes for 12 columns but it can be configured with the $columns setting.

Configurable variables

SCSS variables

You can overwrite the SCSS variables the following ways:

// in your manifest file, eg. `styles.scss`
@use 'node_modules/@supple-kit/supple-css/utilities/offset' with (
  $columns: 10,
  $in-query: (
    lap,
    desk,
  )
);

or

// in your own variable file, eg. `_vars.scss`
@use 'node_modules/@supple-kit/supple-css/utilities/offset/variables' with (
  $in-query: (
    lap,
    desk,
  )
);

// in your manifest file, eg. `styles.scss`
@use 'node_modules/@supple-kit/supple-css/utilities/offset';

Installation

Make sure you’ve installed/downloaded the Supple CSS library: Supple CSS installation

Browser support