Remove Bootstrap Barrio dependency from bootstrap sass starterkit

Created on 16 April 2024, 12 months ago
Updated 22 April 2024, 12 months ago

Boostrap Barrio is a Drupal theme that provides heavy customisation on top of the Bootstrap framework.

Barrio provides a lot of flexibility in terms of where Bootstrap is loaded from e.g.

1. Bootstrap can be loaded from vendor folder
2. Bootstrap can be loaded from cdn

Furthermore it provides customisations around the UI that allow site admins to control the layout, colours used and lots more from the theme UI. The state is often managed using Drupal's state and config apis.

It is also possible to create a subtheme of barrio and provide overrides and put your customisations there.

bootstrap_sass though has a different use case. If is used as a starter kit for creating your own base theme. However one of the main complications here is that it is still a sub theme of bootstrap barrio!?

While I can see there are some benefits in this approach, it also has drawbacks. Some of these are:

- Creates added complexity to an already complex theme e.g. adding its own abstraction for handling layout and colours
- Uses config to manage classes, colour and layout etc from base theme as opposed to just managing with scss and templates
- creates a situation where I have to worry about constantly overriding the base theme
- Complicates making fixes when developers are unsure if changes are in starter kit or base theme

My feeling is there is no reason to have a dependency on Bootstrap Barrio. This is especially true when we are compiling the scss to suit our needs. It would be far easier to just to have a starter kit without the subtheme, as this also includes all our dependencies.

In fact the starter kit does not even have to be a theme, although it should contain components, templates, css, js, tooling and other tools to facilitate with setting up our own theme.

Feature request
Status

Closed: works as designed

Version

5.0

Component

Code

Created by

🇬🇧United Kingdom 2dareis2do

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

Comments & Activities

  • Issue created by @2dareis2do
  • 🇮🇳India ravi kant Jaipur

    @2dareis2do
    If wants to remove "bootstrap barrio" dependency then need to clone "All sass files which have custom work according Bootstrap Barrio" and "Theme settings".

  • 🇬🇧United Kingdom 2dareis2do

    Yes, there are some things (not everything) worth keeping from Barrio. These can be copied across if needed. My feeling is this can be slimmed down and simplified considerably.

    To start with it is probably easier to as you say, clone everything.

    I would also look to simplify and possibly remove:

    1. colour scheme settings from UI and overrides
    2. option to load via cdn
    3. installation of twitter bootstrap via composer
    4. setting classes by region (keep this is templates)

    We can still use sed to create the new theme from the starter-kit similar to how we are doing with bootstrap_sass.

    Ultimately I believe it should be much easier to get started with creating, customising and creating your own custom theme.

  • 🇬🇧United Kingdom 2dareis2do

    Ok I have decided to create https://www.drupal.org/project/bootstrap_sass_starter_kit

    This is a turnkey that allows you to set up and start using a custom theme in 5 minutes. The difference from "bootstrap sass" is it allows you to create a new custom theme that utilises bootstrap sass without having to depend on a base theme.

    @ravi, feel free to check it out and see what you think.

  • Status changed to Closed: works as designed 12 months ago
Production build 0.71.5 2024