Closed (fixed)
Project:
Bootstrap 5 - SASS Starter Kit
Version:
8.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 May 2018 at 15:36 UTC
Updated:
26 Feb 2019 at 16:49 UTC
Jump to comment: Most recent
Comments
Comment #2
hatuhay commentedHi,
To use this starterkit proceed exactly as in any other subtheme.
Non-Drupal components work based on relative address of the subtheme's path
Comment #3
hatuhay commentedComment #5
vood002 commentedThank you. For anyone else who may stumble upon this, I just renamed all files from bootstrap_sass* to [my_theme_name]*, and did a string find-and-replace for bootstrap_sass to [mytheme_name] and everything is working fine.
Comment #6
luukyb commentedHi,
The subtheme should inherit the files from the base theme @vood002.
I am trying to set the subtheme, and if this can help, here are the links I am using:
- official documentation on the creation of sub-theme: https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-t...
- creation of the gulpfile.js, which is documented here: https://www.drupal.org/docs/8/themes/bootstrap-4-sass-barrio-starter-kit...
Is there any other links I should use?
Thanks,
Luc
Comment #7
luukyb commentedHi,
I think I understand a bit more now.
The main theme Barrio has a subtheme folder, which can be used to create a subtheme. This is standard, the subtheme will inherit the main base theme.
However in the case of the Barrio SASS Starter Kit, it sounds like we need to copy all the files and rename them, as mentioned by @vood002. The downside is that it's difficult to get future updates from Barrio SASS Starter Kit in the future, but I was not able to find another solution.
Thanks,
Luc
Comment #8
hatuhay commentedHello,
Not completely true.
You can subtheme over a subtheme.The subtheme inherits from base theme or subtheme.
Just be aware that you should never use directly a theme or subtheme without renaming, because updates will wipe out customization.
Creating a subtheme from a subthem
Comment #9
gillesbailleuxHi all,
Using the Barrio 8.x-4.17 theme with the renamed Barrio Starter Kit 8.x-1.6 sub-theme (let us say mythemename), there is no risk that the sub-theme customisations will be wiped out at the next update.
The only thing which bothers me is that the installation procedure generates the sub-theme in the ../themes/contrib folder, which now has the following structure:
../themes/contrib
- bootstrap_barrio
- bootstrap_sass
- mythemename
It would be nice if the Barrio Starter Kit renamed sub-theme could be installed in ../themes/custom folder, for instance.
All the best,
Gilles
Edit: just added a feature request about the file structure of the theme and sub-theme
Comment #10
woldtwerk commentedHi,
I'm a little confused here. I installed Barrio and the sass starter and got following structure:
../themes/contrib
- bootstrap_barrio
- bootstrap_sass
next step is "From the subtheme folder: do some npm stuff"
What is the subtheme folder? Is it the folder named subtheme inside bootstrap_barrio? Or am I supposed to copy bootstrap_sass and rename it to mytheme? Or do I need to make a subtheme from bootstrap_sass?
I would greatly appreciate, if someone could clarify the installation procedure.
I'm kinda new to setting up projects and frontend :/
Thx in advance
Comment #11
rayfun commented@hatuhay
So instead of renaming the module (bootstrap_sass > mytheme), which I suppose would break the composer requirement and status of the module itself in Drupal, it would be really great to have a prepared subtheme inside the bootstrap_sass in order to avoid manually creating a new sub-theme from scratch.
Currently if wanting to stay uptodate with bootstrap_sass one would need to keep the original theme name.
If one would want to do custom naming it's necessary to create a sub-theme of the sub-theme from scratch. :-/
Comment #12
Nkendall commentedSo, I similarly had issues with the subthemeing process, and I have to say the published docs are very unclear. Bootstrap_barrio has a subtheme folder, Bootstrap_sass does not. The install instructions for the non-sass theme tell you to copy the subtheme folder, the starter kit instructions are very vague in telling you to jump into the subtheme and run the gulp commands. Unofficial documentation suggests just modifying the subtheme altogether!
The problem I have had is that any time I copied the folder and tried to rename the theme files, it would break my D8 install until I removed the subtheme. No visible errors, just broken.
A slightly clearer explanation of how to get started would be really useful for any noobs like myself.
Comment #13
Anonymous (not verified) commentedI feel this issue has not been resolved and I believe the main problem has to do with the installation steps mentioned in the documentation. Some of the things that in my opinion need clarification:
Comment #14
ccshannon commented@hatuhay your hard work is appreciated but the documentation is unclear. What are the full steps to create an actual subtheme with this project? Are we expected to make a copy of the 'bootstrap_sass' folder after composer installs it? Should I be creating a custom subtheme folder from scratch? Should I create the Barrio custom subtheme as per Barrio instructions and then change the 'parent' theme in that custom subtheme's *.info.yml file to point to bootstrap_sass subtheme instead?
I really think that adding a few simple steps to the online documentation will make it much easier for users to adopt this subtheme and start using it.
Thanks.
Comment #15
gillesbailleux@ccshannon: the documentation section will be updated, hopefully in the coming week, with the agreement of the theme maintainer who will read its content before publication (by the way, you are more than welcome to contribute).
Comment #16
hatuhay commented@gillesbailleux thanks, the magic of the community please go ahead, no need to any previous agreement.
Comment #17
hatuhay commented@Igsu
npm install. THIS WILL LOAD DEPENDENCIES FROM PACKAGE.JASONgulp. THIS WILL PROCESS THE GULPFILE.JSMore details on what happens on the last two steps can be found on the documentation or researching on both commands.
Hopefully the community will help to fill the gaps.
Comment #18
ccshannon commentedThanks, @hatuhay, that's what was missing, for me. Looking forward to using it! :)
Also, to @gillesbailluex's point, let me know if you need any assistance writing the docs for this. I'm happy to contribute to the README.
Cheers.
Comment #19
gillesbailleux@ccshannon: more than delighted to read you want to help for the documentation. There are also other users of the Barrio theme and Barrio SASS subtheme who have contacted me to join efforts for the documentation and @hatuhay, the project maintainer, supports the initiative. As always, it is a matter of time.
So, it would be nice that we organise ourselves in a structured manner on the two nodes dedicated to the documentation of the two projects:
Comment #20
ndf commentedA comment from jurgenhaas in #3030844: Script for creating a bootstrap sub-theme got me thinking recently.
Currently we recommend either
In both cases, every time this module has a bugfix, the custom theme will not be updated. And that is not good.
In my opinion the following approach is better:
- bootstrap_sass (this module) stays in
/themes/contriband will be updated by composer/drush.- The subtheme inherits all sass-files from bootstrap_sass, like it inherits all sass files from bootstrap.
- The subtheme doesn't override sass-files unless needed. Overriding is a responsibility of the frontend-themer.
The subtheme then will have 2 types of sass-files:
frontpage-hero.scss)The subtheme's main sass file is style.scss
It should then look like this:
The subtheme's scss folder will look like this:
What do you think about this approach?
Comment #21
perke@ndf +1 that sounds like the only logical way of customising this theme.
Comment #22
ndf commented@hatuhay Can you please re-open this issue so it is visible to everyone?
Comment #23
danthorne@ndf Wouldn't it be:
@import "../../contrib/bootstrap_sass/scss/barrio";instead of:
@import "../../contrib/bootstrap_sass/scss/components";Please correct me if i'm missing something.