Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CiviCRM Core CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 1.1k
    • Issues 1.1k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • DevelopmentDevelopment
  • CiviCRM CoreCiviCRM Core
  • Issues
  • #378
Closed
Open
Issue created Sep 05, 2018 by jensschuppe@jensschuppe

Add a configuration setting for when to load custom CSS

When debugging a Shoreditch issue with overridden fonts, we began to wonder why CiviCRM's core and custom styles are being added to every page (at least whenever civicrm_initialize() gets called), instead of only on CiviCRM pages. A generic switch for that turned out to be non-trivial, as sometimes we do want CiviCRM styles on non-CiviCRM pages (e.g. when using profiles), sometimes we want them on public CiviCRM pages, and sometimes we don't.

This led to a POC for a configuration setting for when to load CiviCRM's custom CSS (in that special case Shoreditch's CSS), allowing administrators to choose between

  • "always" (current and default behavior)
  • "all CiviCRM pages"
  • "all CiviCRM pages except public CiviCRM pages".

Simply adding all styles on every page may be useless on sites with more functionality than just CiviCRM. With shoreditch, that behaviour is just prone to destroying your CMS theme styles.

Patch: customCSSMode.patch

Any thoughts?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking