Skip to content

Implement conditional asset loading for CSS libraries#776

Open
jjroelofs wants to merge 7 commits into8.xfrom
jur/8.x/#771-conditional-asset-loading
Open

Implement conditional asset loading for CSS libraries#776
jjroelofs wants to merge 7 commits into8.xfrom
jur/8.x/#771-conditional-asset-loading

Conversation

@jjroelofs
Copy link
Collaborator

Linked issues

Solution

Load module-specific CSS libraries conditionally based on whether the corresponding Drupal module is installed, reducing unnecessary CSS payload on pages that don't need these styles.

  • drupal-webform CSS only loads when the Webform module is installed
  • dxpr-theme-builder CSS only loads when the DXPR Builder module is installed
  • dxpr-theme-header--side CSS only loads when Menu UI module is installed

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

github-actions bot and others added 7 commits October 1, 2025 10:11
Co-authored-by: jjroelofs <jjroelofs@users.noreply.github.com>
Primary tabs were being hidden for all users when admin_toolbar_tools
was configured to show local tasks, even for users without toolbar
permissions who couldn't see the tasks in the admin toolbar.

Fixes #609

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Jurriaan Roelofs <jur@dxpr.com>
Co-authored-by: Claude <noreply@anthropic.com>
Previously, tabs were positioned with translate(-50%, -100%) which caused them to be hidden below the header on pages without a page title. Changed to translate(-50%, 0) to fix this issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant