@servicensw/base

Base styles and variables

Usage no npm install needed!

<script type="module">
  import servicenswBase from 'https://cdn.skypack.dev/@servicensw/base';
</script>

README

@servicensw/base

Base CSS for all of Service NSW.

Service NSW package documentation and examples
(Login credentials required)

Installation

npm install @servicensw/base --save-dev

How to use

CSS

  • PostCSS workflow: @import '@servicensw/base';
  • Sass/Eyeglass: @import 'servicensw-base';
  • Native CSS: @import url('dist/base.css');
  • Link tag: <link href="dist/base.css" rel="stylesheet" type="text/css">

Vanilla JS

  • Vanilla JS / ES6: import '@servicensw/base';
  • Script tag: <script src="dist/base.js" type="text/javascript"></script>

A variety of functions are provided by base.js including:

  1. Required polyfills for all SNSW packages.
  2. Required Utils for all SNSW packages.
  3. SmoothScrolling functionality.
  4. Keyboard navigation functionality.

It is recommended to use base.js if you are using any of the JS packages. Errors or warnings will be thrown if missing functionality is detected.