Starterkit: split Bootstrap CSS per component

Created on 6 July 2023, over 1 year ago

Problem/Motivation

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

📌 Task
Status

Active

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 over 1 year 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.

  • 🇫🇷France Grimreaper France 🇫🇷
Production build 0.71.5 2024