Starterkit: split Bootstrap CSS per component

Created on 6 July 2023, 12 months ago

Problem/Motivation

Try to split Bootstrap CSS per component, so only the required CSS is loaded on the page.

πŸ“Œ Task
Status

Postponed

Version

5.0

Component

Code

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Grimreaper
  • @grimreaper opened merge request.
  • Issue was unassigned.
  • Status changed to Postponed 12 months ago
  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Here is a POC with table.

    It works but as discussed on Slack, the problem is that now table CSS will not be present if the pattern is not used on the page.

    So if in a RTE you put Bootstrap classes in it, as it will not call the pattern, the CSS will not be present.

    I gave a quick look to other CSS. There will be the same problem for buttons: adding btn classes without calling the button pattern is quite common (RTE, menu links, forms) and so button CSS will not be loaded on the page.

    So I wonder what we can do about that?

    Maybe splitting CSS only for stuff we know it is only usable by calling the pattern or are in presenter template which could easily load the new libraries.

Production build 0.69.0 2024