Skip to content

CSS/JS from localgov_base is not removed if it comes from an SDC component #280

@JohnAlbin

Description

@JohnAlbin

Right now there are 2 components in localgov_base that have CSS and JS:

  • add-to-calendar
  • prev-next

When the sub-theme uses the localgov_base_remove_css or localgov_base_remove_js theme setting, those components' CSS and JS are not removed.

In regular templates in localgov_base, you have to manually add libraries to get the CSS/JS added to Drupal, so those templates simply check those settings before adding the libraries.

With components, no library definitions are needed. Drupal core's SDC will automatically create a library and auto add the library when the component is used.

That means we need a hook to check the theme settings and then remove the libraries if present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions