0.3.0 • Published 3 years ago

@studyportals/styles-base v0.3.0

Weekly downloads
458
License
BSD-3-Clause
Repository
github
Last release
3 years ago

styles-base

Studyportals base styling for use within Portals or microservices to provide a base on top of which other styling can be used. This basis contains "reset" styling, but also other fundamental styling that doesn't fit well with the other styling categories.

References: Sass Guidelines > Architecture > Base folder

Styles packages structure

The Styles - Abstracts package is created as part of restructuring Studyportals styling. This structure is based on a combination of SMACCS and the 7-1 pattern.

More information about how we use the patterns, can be found in the Knowledge Vault.

Getting started

Installing the package

Install the package

npm install --save-dev @studyportals/styles-base

Publishing the package on the GitHub Package Registry

  1. Ensure you are authenticated to the GitHub Package Registry. This section explains how.
  2. Run npm run pre-publish-only. This will compile the styling to css resources inside the dist folder. These resources are necessary for UniversityAdmin and some client & internal-facing microservices when they are run stand-alone. The circumstances under which the resources are needed for those prevent the scss code from being used directly, so compiled css is necessary.
  3. Run npm publish

Usage of functionality

To use the package, you can import the base.scss file from the package into your project.

// Import the entire abstracts package
@import '~@studyportals/styles-base/base.scss';

// Importing using the full url
@import './node_modules/@studyportals/styles-base/base.scss';

The ~ is an alias for node_modules. You might need to set this up in your project. Otherwise you can use the full url.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago