A sub-theme of LocalGov Base. Please read the README there also.
A Microsite Admin has the permission to set a number of css variables through the UI. These override the default variables set in /css/variables.css
We recommend creating a sub-theme of LocalGov Microsites Base in order to create a custom theme for one or more of your microsites. A Microsite controller is able to install and set a new theme for a microsite.
To create a sub-theme, you simply need to run the sub-theme creation script that is in the /scripts
directory, like so:
cd web/themes/contrib/localgov_microsites_base/
bash scripts/create_subtheme.sh
You need to enter two items when creating a sub-theme:
Hopefully most of the custom styles you will need are set via CSS custom properties in the /css/variables.css
file in your sub-theme.
This is where you set your colours, fonts, spacing, etc. Then you "apply" these variables where needed, like so:
:root {
/* Set/Override Variables */
--color-accent: red;
--spacing-largest: 5rem;
/* Apply Variables */
--color-link: var(--color-accent);
--breadcrumbs-background-color: var(--color-accent);
--section-spacing-vertical-header: var(--spacing-largest);
}
If you need to add any CSS overides, you can create custom CSS files for these and then a library/libraries to attach them to your components.
This project is currently maintained by: