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. university-of-denver/pl\_drupal

ActiveDrupal-custom-theme

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

Fork of Standard Edition of Pattern Lab for Drupal.

1537001185.x-dev(1y ago)15.9k↓37.5%2[3 PRs](https://github.com/DU-University-Relations/pl_drupal/pulls)GPL-2.0+CSS

Since Oct 31Pushed 2mo ago1 watchersCompare

[ 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 Synced 1mo ago

READMEChangelog (5)DependenciesVersions (44)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

Development Workflow
--------------------

[](#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

37

—

LowBetter than 83% of packages

Maintenance65

Regular maintenance activity

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity37

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

Recently: every ~5 days

Total

9

Last Release

67d 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 (49 commits)")[![joelsteidl](https://avatars.githubusercontent.com/u/67734?v=4)](https://github.com/joelsteidl "joelsteidl (42 commits)")[![joshua-mcgehee](https://avatars.githubusercontent.com/u/166567243?v=4)](https://github.com/joshua-mcgehee "joshua-mcgehee (10 commits)")[![tsheu2](https://avatars.githubusercontent.com/u/144848543?v=4)](https://github.com/tsheu2 "tsheu2 (2 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

[composer/installers

A multi-framework Composer library installer

1.4k136.0M6.0k](/packages/composer-installers)[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[palantirnet/drupal-rector

Instant fixes for your Drupal code by using Rector.

1544.2M20](/packages/palantirnet-drupal-rector)[drupal/drupal-driver

A collection of reusable Drupal drivers

6715.8M18](/packages/drupal-drupal-driver)[aleksip/plugin-data-transform

Data Transform Plugin for Pattern Lab PHP

34897.4k3](/packages/aleksip-plugin-data-transform)

PHPackages © 2026

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