- Sass CSS with auto-prefixing.
- TypeScript for ES2015+ JavaScript, and TypeScript support.
- webpack-dev-server for autoreloading.
- Webpack for module bundling.
- With
ts-loaderto process JavaScript and TypeScript. - With
css-loader,postcss-loader, andsass-loaderto process stylesheets.
- With
- CSS linting with
stylelint - JS linting with
eslint
- To start the development environment, follow instruction in README.md in the project root
- Source files for developing your project are in
staticand the distribution folder for the compiled assets isstatic_compiled. Don't make direct changes to thestatic_compileddirectory as they will be overwritten.
The site uses Django Pattern Library which can be found at http://localhost:8000/pattern-library. We encourage keeping this populated and up to date. Along with a Components and Pages directory there is also a Style Guide directory which contains templates that are intended to be used to showcase available patterns and styles.
The site uses icons throughout the build, a comprehensive list can be found in the Pattern Library. SVG optimsation is encouraged before being added to build - one library for doing this is SVGO.
Prefer SVGs over raster images wherever possible. SVGs are easier to theme for dark mode support and scale without quality loss. For example, favicons should use SVG format where browser support allows.
For any raster images that must be kept, optimise them manually using Squoosh or equivalent before committing.
The site uses a grid system across 3 breakpoints:
- Large: 2 gutter columns, 5 main columns
- Medium: 2 gutter columns, 3 main columns
- Small: 2 gutter columns, 2 main columns
To use the system wrap a component in <div class="grid"> and then align your component accordingly.