PHPackages                             university-of-denver/pl\_drupal - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. university-of-denver/pl\_drupal

ActiveDrupal-custom-theme[Utility &amp; Helpers](/categories/utility)

university-of-denver/pl\_drupal
===============================

Fork of Standard Edition of Pattern Lab for Drupal.

1537001185.x-dev(1y ago)17.0k↓12.1%2[9 issues](https://github.com/DU-University-Relations/pl_drupal/issues)GPL-2.0+CSS

Since Oct 31Pushed 4d agoCompare

[ Source](https://github.com/DU-University-Relations/pl_drupal)[ Packagist](https://packagist.org/packages/university-of-denver/pl_drupal)[ Docs](http://patternlab.io)[ RSS](/packages/university-of-denver-pl-drupal/feed)WikiDiscussions main-build Synced 2d ago

READMEChangelog (10)DependenciesVersions (50)Used By (0)

PL Drupal D10 Theme
===================

[](#pl-drupal-d10-theme)

**Drupal 10 compatible theme** - Pattern Lab dependencies removed as of January 2026.

This theme previously used Pattern Lab for component development but has been migrated to a standard Drupal 10 theme. See [D10\_UPGRADE.md](D10_UPGRADE.md) for complete migration details.

Prerequisites
-------------

[](#prerequisites)

- Node.js v24 (use `nvm use` to switch to the correct version)
- npm

Installation
------------

[](#installation)

1. Clone this repository into your Drupal `themes/custom/` directory
2. Install Node dependencies: ```
    nvm use
    npm install
    ```
3. Build the theme assets: ```
    npm run build
    ```
4. Enable the theme in Drupal

Pull Requests MUST Target main Branch for Packagist Integration
---------------------------------------------------------------

[](#pull-requests-must-target-main-branch-for-packagist-integration)

main-build has to be the default branch to use the free version of Packagist, but PRs should target main. Merging to main will trigger a GitHub Action to run through the same build process documented below. Once that process sucessfully runs, a new dev release of the theme to show up on [https://packagist.org/packages/university-of-denver/pl\_drupal](https://packagist.org/packages/university-of-denver/pl_drupal). Targeting the main branch instead of the main-build branch requires editing the PR in GitHub. The D10 Upstream is now configured to allow either the supported release or the dev release, but will default to the supported release unless the dev release is specified in the root, site-specific composer.json. To temporarily move a site to the current dev version of the theme run `composer require university-of-denver/pl_drupal:dev-main-build`. Removing that dependency from the root, site-specific composer.json will cause the build to use the supported version as specified in the upstream-configuration/composer.json.

Local Development Workflow
--------------------------

[](#local-development-workflow)

### Build Commands

[](#build-commands)

**Production build:**

```
npm run build
```

Compiles SCSS, copies npm libraries to `dest/libraries/`, and bundles images.

**Development build with watch:**

```
npm run watch
```

Watches for SCSS changes and recompiles automatically with sourcemaps.

**Extract DU customizations from sparkle.css:**

```
npm run extract-customizations
```

Regenerates `_du-customizations-only.scss` by extracting DU-specific styles from sparkle.css and removing Foundation library code.

**Extract unit theme customizations (pl\_unit):**

```
npm run extract-unit-customizations
```

Extracts pl\_unit theme-specific styles to `../pl_unit/dest/sparkle-unit.css` by comparing against pl\_drupal base theme.

### Making Style Changes

[](#making-style-changes)

**⚠️ IMPORTANT: Most style changes should be made to `scss/_du-customizations-only.scss`**

This file contains all DU-specific customizations (21,954 lines) extracted from production sparkle.css. This is where you should make changes for:

- Component styling (buttons, cards, navigation, etc.)
- Custom layouts and overrides
- DU-specific design implementations
- Production hotfixes and manual edits

**Other SCSS files:**

- `scss/_variables.scss` - DU brand colors and fonts (edit carefully)
- `scss/_settings.scss` - Foundation framework configuration (rarely change)
- `scss/foundation.scss` - Foundation framework entry point (don't edit)
- `scss/style.scss` - Imports for DU customizations (don't edit unless adding new files)

**Workflow for style changes:**

1. Edit `scss/_du-customizations-only.scss`
2. Run `npm run watch` to see changes live
3. Test in browser
4. Commit changes

### Build Output

[](#build-output)

- **CSS**: `dest/style.css` (DU customizations) and `dest/foundation.css` (Foundation framework)
- **Libraries**: npm packages copied to `dest/libraries/` (Foundation, Motion UI, Slick, etc.)
- **Images**: Copied to `dest/images/`
- **Sourcemaps**: Generated during development builds

Theme Structure
---------------

[](#theme-structure)

```
pl_drupal/
├── dest/                    # Build output
│   ├── style.css           # DU customizations (compiled)
│   ├── foundation.css      # Foundation framework (compiled)
│   └── libraries/          # npm libraries copied here
├── scss/                    # Source SCSS
│   ├── _variables.scss     # DU brand colors & fonts
│   ├── _settings.scss      # Foundation 6.9.0 config
│   ├── _du-customizations-only.scss  # All DU custom styles (21,954 lines)
│   ├── foundation.scss     # Foundation entry point
│   └── style.scss          # DU customizations entry point
├── js/                      # Custom JavaScript behaviors
├── templates/               # Twig templates
├── source/_patterns/        # Component directories (for Drupal Components module)
└── gulpfile.js             # Build configuration

```

Dependencies
------------

[](#dependencies)

### Theme Dependencies

[](#theme-dependencies)

- **Drupal Modules**:

    - `drupal:components` (provides Twig namespaces for source/\_patterns/)
    - `drupal:twig_field_value`
    - `drupal:twig_tweak`
- **Core Libraries**:

    - `core/jquery`
    - `core/drupal`
    - `core/jquery.cookie`
    - `core/once` (Drupal.once API)

### Front-end Dependencies (npm)

[](#front-end-dependencies-npm)

- foundation-sites: ^6.9.0
- motion-ui: ^2.0.8
- slick-carousel: ^1.8.1
- clipboard: ^2.0.11
- isotope-layout: ^3.0.6
- jquery.scrollto: ^2.1.3

All libraries are copied to `dest/libraries/` during build and served from the theme (no CDN dependencies).

Migration from Pattern Lab
--------------------------

[](#migration-from-pattern-lab)

This theme was migrated from Drupal 9 with Pattern Lab to Drupal 10 without Pattern Lab. Key changes:

- Pattern Lab infrastructure completely removed
- Build system updated to Gulp 5 + Dart Sass
- Foundation upgraded to 6.9.0
- jQuery.once API replaced with Drupal.once
- Node.js v24 required
- All front-end libraries managed via npm (no Composer npm-asset or CDN)
- Production sparkle.css customizations migrated to Foundation 6.9.0 base

For complete migration details, see [D10\_UPGRADE.md](D10_UPGRADE.md).

Troubleshooting
---------------

[](#troubleshooting)

**Build fails with Sass errors:**

- Ensure you're using Node v24: `nvm use`
- Delete `node_modules` and `package-lock.json`, then run `npm install`

**jQuery errors in console:**

- Verify `core/once` is loaded in libraries.yml
- Check that Drupal.once is being used instead of jQuery.once

**Foundation components not working:**

- Check that Foundation JS is at `dest/libraries/foundation-sites/dist/js/foundation.min.js`
- Verify library paths in `pl_drupal.libraries.yml`

**Missing libraries after npm install:**

- Run `npm run build` to execute copy-libs and copy-images tasks

Contributing
------------

[](#contributing)

When making style changes:

1. Create a feature branch
2. **Edit `scss/_du-customizations-only.scss`** (this is where most changes go)
3. Run `npm run watch` during development
4. Test thoroughly in a Drupal environment
5. Run `npm run build` to verify production build succeeds
6. Commit with clear, descriptive messages

**Note:** Avoid editing Foundation framework files (`_settings.scss`, `foundation.scss`) unless you're intentionally changing the framework configuration.

Support
-------

[](#support)

For questions or issues related to the Drupal 10 migration, see [D10\_UPGRADE.md](D10_UPGRADE.md).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance53

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~54 days

Recently: every ~31 days

Total

12

Last Release

4d ago

Major Versions

3.0.0-alpha1 → 1537001185.x-dev2025-01-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/642d9f07988f3fcb767c14d632a9de84d745f44d9078d557cb4011220579aa88?d=identicon)[DU-Automation](/maintainers/DU-Automation)

---

Top Contributors

[![kreynen-du](https://avatars.githubusercontent.com/u/178853103?v=4)](https://github.com/kreynen-du "kreynen-du (77 commits)")[![joelsteidl](https://avatars.githubusercontent.com/u/67734?v=4)](https://github.com/joelsteidl "joelsteidl (55 commits)")[![joshua-mcgehee](https://avatars.githubusercontent.com/u/166567243?v=4)](https://github.com/joshua-mcgehee "joshua-mcgehee (16 commits)")[![tsheu2](https://avatars.githubusercontent.com/u/144848543?v=4)](https://github.com/tsheu2 "tsheu2 (3 commits)")[![alexfinnarn](https://avatars.githubusercontent.com/u/3640707?v=4)](https://github.com/alexfinnarn "alexfinnarn (2 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

drupalpattern lab

### Embed Badge

![Health badge](/badges/university-of-denver-pl-drupal/health.svg)

```
[![Health](https://phpackages.com/badges/university-of-denver-pl-drupal/health.svg)](https://phpackages.com/packages/university-of-denver-pl-drupal)
```

###  Alternatives

[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3793.0M11](/packages/lullabot-amp)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5445.2M565](/packages/drupal-core-composer-scaffold)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1465.4M62](/packages/mnsami-composer-custom-directory-installer)[aleksip/plugin-data-transform

Data Transform Plugin for Pattern Lab PHP

34905.8k3](/packages/aleksip-plugin-data-transform)[pattern-lab/edition-drupal-standard

Standard Edition of Pattern Lab for Drupal.

12419.1k](/packages/pattern-lab-edition-drupal-standard)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)

PHPackages © 2026

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