Implement CDN as default method for using bulma in base theme.
https://cdnjs.com/libraries/bulma

Add two different subthemes (CDN and local SCSS)

Comments

valic created an issue. See original summary.

nedjo’s picture

A possible approach using a single theme would be: default to CDN, but if Bulma is downloaded to libraries/bulma, use that instead. To do this, swap in the local version using hook_library_info_alter(), which the patch at #2901948: Support Bulmaswatch custom themes is already introducing, or else remove the bulma CSS from .libraries.yml and instead use hook_library_info_build().

In any case, probably, we should break the existing bulma/global library into two libraries: one for bulma and one for overrides and customizations. That way a subtheme can easily remove base theme overrides without having to assume responsibility for the bulma CSS file.

Part of introducing a CDN is version handling. Probably this is a new theme setting, version. The Bootstrap theme has some fairly involved code for selecting a CDN provider.

nedjo’s picture

Enabling work was encluded in #2901948: Support Bulmaswatch custom themes.

  • nedjo committed d45b37f on 8.x-1.x
    Issue #2902353 by nedjo: Implement CDN
    

  • nedjo committed cd02cf2 on 8.x-1.x
    Issue #2902353 by nedjo: Remove bulma code from starterkit
    
nedjo’s picture

  • nedjo committed 58d4b7a on 8.x-1.x
    Issue #2902353 by nedjo: Fix local Bulma CSS path
    

  • nedjo committed 3c3e912 on 8.x-1.x
    Issue #2902353 by nedjo: Update config schema for CDN changes
    

  • nedjo committed 5b418da on 8.x-1.x
    Issue #2902353 by nedjo: Remove obsolete hook_library_info_alter() from...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.