PHPackages                             localgovdrupal/localgov\_base - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. localgovdrupal/localgov\_base

ActiveDrupal-theme[Templating &amp; Views](/categories/templating)

localgovdrupal/localgov\_base
=============================

The base theme for LocalGov Drupal websites.

2.2.5(6mo ago)13121.5k↓25.8%19[30 issues](https://github.com/localgovdrupal/localgov_base/issues)[7 PRs](https://github.com/localgovdrupal/localgov_base/pulls)4GPL-2.0-or-laterTwigCI passing

Since Jun 30Pushed 5mo ago8 watchersCompare

[ Source](https://github.com/localgovdrupal/localgov_base)[ Packagist](https://packagist.org/packages/localgovdrupal/localgov_base)[ Docs](https://github.com/localgovdrupal/localgov_base)[ RSS](/packages/localgovdrupal-localgov-base/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)DependenciesVersions (413)Used By (4)

   title LocalGov Base Theme  LocalGov Drupal Base Theme
==========================

[](#localgov-drupal-base-theme)

Welcome to the LocalGov Drupal base theme.

We developed this theme with scalability, ease of use, and ease of customisation in mind. Making this base theme a great start point for any website using the LocalGov Drupal distribution.

Supported releases
------------------

[](#supported-releases)

We now have a 2.x and a 1.x branch.

- All new feature development work will be against the 2.x branch
- The 1.x branch will continue to have bug fixes until the end of December 2025.

Everyone is encouraged to upgrade to the 2.x branch, but please see release notes regarding changes to the grid system layouts, moving from flex to css grids.

[https://github.com/localgovdrupal/localgov\_base/releases/tag/2.0.0](https://github.com/localgovdrupal/localgov_base/releases/tag/2.0.0)

Notes on upgrading from 1.x to 2.x
----------------------------------

[](#notes-on-upgrading-from-1x-to-2x)

In the 2.x branch, we have re-written our grid system to use CSS Grid instead of Flexbox.

This makes the CSS for the grid simpler. It should also fix lots of minor spacing issues (negative left/right margin on grid containers).

Important: We recommend testing your layouts before deploying.

In some cases, if you have made customisations to the layout in a child theme, removing these changes might be advisable.

In some cases, the changes needed in child themes are to change the width specification on grid child items from "width: calc(...) " to "grid-column: span 3" for example.

Inline Documentation
--------------------

[](#inline-documentation)

Instead of creating documentation for the theme and storing it in a wiki or something else that is likely to not be updated, we have written detailed comments inline with the code. This should make it easier to know exactly what code block any specific documentation item refers to.

The theme includes an automatically-generated list of all the CSS variables in [variables.md](./variables.md).

Sub-theme
---------

[](#sub-theme)

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_base/
  bash scripts/create_subtheme.sh
```

You need to enter two items when creating a sub-theme:

1. The name of the theme, this can be anything and can include spaces, e.g. Super Council
2. The machine name for the theme, this must start with a letter and use only lowercase letters and underscores, e.g. super\_council

Custom Styles
-------------

[](#custom-styles)

Hopefully most of the custom styles you will need are set via CSS custom properties in the `/css/base/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 overrides, you can create custom CSS files for these and then a library/libraries to attach them to your components.

Automated CSS Coding Standards
------------------------------

[](#automated-css-coding-standards)

To make sure we follow Drupal's CSS coding standards (without having to think about it), there is a handy `npm` script to automatically scan and fix any CSS coding standards violations.

Simply run `npm install` to get the necessary packages, then run one of the following commands to scan the files and fix any issues.

- "start": "npm run lint:css &amp;&amp; npm run lint:js",
- "start:fix": "npm run lint:css:fix &amp;&amp; npm run lint:js:fix",
- "lint:css": "stylelint "\*\*/\*.css"",
- "lint:css:fix": "stylelint "\*\*/\*.css" --fix",
- "lint:js": "eslint "\*\*/\*.js"",
- "lint:js:fix": "eslint "\*\*/\*.js" --fix",

### start

[](#start)

This command will run the linter on your CSS and JS files and give you are report in your terminal of any issues. found.

### start:fix

[](#startfix)

This command will do the same as `start` but will also attempt to fix any issues it finds, such as using correct quote marks, fixing indentation, etc.

It's advisable to run `start` after you run this command to see if there was anything the automated linter couldn't fix.

### lint:css

[](#lintcss)

This is the same as `start` except it only checks the CSS files.

### lint:css:fix

[](#lintcssfix)

This is the same as `start:fix` except it only affects the CSS files.

### lint:js

[](#lintjs)

This is the same as `start` except it only checks the JS files.

### lint:js:fix

[](#lintjsfix)

This is the same as `start:fix` except it only affects the JS files.

### Troubleshooting

[](#troubleshooting)

If you get an error, such as node not being able to find prettier, you might need to install the packages from Drupal core's `package.json`. All of our linting extends Drupal core's linting to make sure we are always following Drupal's exact coding standards. To do so, simply `cd web/core` and then `npm install`.

If you still cannot run the linter, make sure you are using the correct version of Node. We have a `.nvmrc` file to help you. Run `nvm use` from your theme directory to install the correct version.

Maintainers
-----------

[](#maintainers)

This project is currently maintained by:

- Mark Conroy
- Maria Young

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance50

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community37

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 65% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Total

108

Last Release

180d ago

Major Versions

1.9.1 → 2.0.02025-05-29

1.9.2 → 2.1.22025-08-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd550678a915c9a6d451d08851556a1c866f8cc7c0e3f864b498a45d4d930577?d=identicon)[stephen-cox](/maintainers/stephen-cox)

![](https://www.gravatar.com/avatar/c215b54edbf914998f6f63747814fd96f117c2c6e1bb5ea0c0a0db24fd9b3901?d=identicon)[finnlewis](/maintainers/finnlewis)

![](https://www.gravatar.com/avatar/848d88262b2f9d984d12b55bd4a2e2f0e1d3c7abe9c63fc5cc13ecbab75cd19e?d=identicon)[ekes](/maintainers/ekes)

![](https://www.gravatar.com/avatar/be000424009f296e0d88bf9cda3b6701aae827ea4a2773c0a5dbbd78b8429afb?d=identicon)[andybroomfieldBHCC](/maintainers/andybroomfieldBHCC)

![](https://www.gravatar.com/avatar/135fe190210b35fbde2ecd82d36b7babd12202595e4c5a705b57c9dc9c0eea6b?d=identicon)[markconroy](/maintainers/markconroy)

---

Top Contributors

[![markconroy](https://avatars.githubusercontent.com/u/2183332?v=4)](https://github.com/markconroy "markconroy (611 commits)")[![finnlewis](https://avatars.githubusercontent.com/u/326588?v=4)](https://github.com/finnlewis "finnlewis (106 commits)")[![msayoung](https://avatars.githubusercontent.com/u/3852805?v=4)](https://github.com/msayoung "msayoung (61 commits)")[![ctorgalson](https://avatars.githubusercontent.com/u/1063424?v=4)](https://github.com/ctorgalson "ctorgalson (40 commits)")[![stephen-cox](https://avatars.githubusercontent.com/u/7189914?v=4)](https://github.com/stephen-cox "stephen-cox (23 commits)")[![danchamp](https://avatars.githubusercontent.com/u/261421?v=4)](https://github.com/danchamp "danchamp (17 commits)")[![millnut](https://avatars.githubusercontent.com/u/8024370?v=4)](https://github.com/millnut "millnut (16 commits)")[![ekes](https://avatars.githubusercontent.com/u/237186?v=4)](https://github.com/ekes "ekes (9 commits)")[![rupertj](https://avatars.githubusercontent.com/u/326243?v=4)](https://github.com/rupertj "rupertj (9 commits)")[![Adnan-cds](https://avatars.githubusercontent.com/u/50206849?v=4)](https://github.com/Adnan-cds "Adnan-cds (6 commits)")[![bisd](https://avatars.githubusercontent.com/u/2633608?v=4)](https://github.com/bisd "bisd (5 commits)")[![alexburrows](https://avatars.githubusercontent.com/u/1036167?v=4)](https://github.com/alexburrows "alexburrows (4 commits)")[![tonypaulbarker](https://avatars.githubusercontent.com/u/4941711?v=4)](https://github.com/tonypaulbarker "tonypaulbarker (3 commits)")[![andrew-wallis](https://avatars.githubusercontent.com/u/43880760?v=4)](https://github.com/andrew-wallis "andrew-wallis (3 commits)")[![andybroomfield](https://avatars.githubusercontent.com/u/1467480?v=4)](https://github.com/andybroomfield "andybroomfield (3 commits)")[![AWearring](https://avatars.githubusercontent.com/u/95761929?v=4)](https://github.com/AWearring "AWearring (3 commits)")[![cjstevens78](https://avatars.githubusercontent.com/u/11304107?v=4)](https://github.com/cjstevens78 "cjstevens78 (3 commits)")[![justinepocock](https://avatars.githubusercontent.com/u/638213?v=4)](https://github.com/justinepocock "justinepocock (3 commits)")[![siliconmeadow](https://avatars.githubusercontent.com/u/158008?v=4)](https://github.com/siliconmeadow "siliconmeadow (2 commits)")[![anthonylindsay](https://avatars.githubusercontent.com/u/3294888?v=4)](https://github.com/anthonylindsay "anthonylindsay (2 commits)")

### Embed Badge

![Health badge](/badges/localgovdrupal-localgov-base/health.svg)

```
[![Health](https://phpackages.com/badges/localgovdrupal-localgov-base/health.svg)](https://phpackages.com/packages/localgovdrupal-localgov-base)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
