@studyportals/styles-base
v0.3.0
Published
Studyportals base styling for use within Portals or microservices to provide a base on top of which other styling can be used
Downloads
4,168
Maintainers
Keywords
Readme
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
- Ensure you are authenticated to the GitHub Package Registry. This section explains how.
- Run
npm run pre-publish-only
. This will compile the styling to css resources inside thedist
folder. These resources are necessary forUniversityAdmin
and some client & internal-facing microservices when they are run stand-alone. The circumstances under which the resources are needed for those prevent thescss
code from being used directly, so compiledcss
is necessary. - 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.