The SASS starterkits imports all Bootstrap stylesheets (there are about 40 scss files and 30 mixin scss files):

// Default variables.
@import 'default-variables';

// Bootstrap Framework.
@import '../bootstrap/assets/stylesheets/bootstrap';

// Base-theme overrides.
@import 'overrides';

But which stylesheet import files are needed? The Drupal Bootstrap Theme needs all of them?

Is it possible to avoid imorting all stylesheet files?
How to find out if some or many of the stylesheet files can be omitted? How can this be done and is there any tutorial?
Thank you.

Comments

drupalfan2 created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (works as designed)

Closing per: https://drupal-bootstrap.org/api/bootstrap/docs%21Contributing.md/group/...

Reason: subjective to site, precompiler question

drupalfan2’s picture

Status: Closed (works as designed) » Active

My question concerns the Drupal Bootstrap modul:

@import '../bootstrap/assets/stylesheets/bootstrap';

Why all of the Bootstrap stylesheets are imported and not only the really needed?

How to find out which of the Bootstrap stylesheets are needed in the Bootstrap module? And how to use the stylesheets selective (not all of them)?
Thank you.

markhalliwell’s picture

Status: Active » Closed (works as designed)

Why all of the Bootstrap stylesheets are imported and not only the really needed?

Because that's just the default for the SASS the starterkit.

How to find out which of the Bootstrap stylesheets are needed in the Bootstrap module?

That entirely depends on your needs. If you don't need modals, for instance, don't include that component.

And how to use the stylesheets selective (not all of them)?

You include the components you want, instead of all of them.

---

That all being said, I wouldn't recommend using something you clearly don't understand. Please do not re-open this issue. This isn't an issue with this project.

drupalfan2’s picture

Status: Closed (works as designed) » Active

How to find out which of the Bootstrap stylesheets are needed in the Bootstrap theme?

This is related to the Bootstrap theme.

Which of the stylesheets are needed in the Bootstrap theme https://www.drupal.org/project/bootstrap and wich not? This question is only related the the Bootstrap theme and I am not asking about my additional needs.

This question is indeed only related the the Bootstrap theme.
I am sure, there is an answer. If you do not want to answer it, maybe somebody else can answer the question, so please let the issue open until is is explained.

Thank you.

markhalliwell’s picture

Status: Active » Closed (works as designed)

This is related to the Bootstrap theme.

No, the source files are related to the Bootstrap Framework, not this project which simply provides a bridge between that external framework and Drupal.

I am not asking about my additional needs.

That is exactly what you are asking. This project is just a base theme.

The starter kits are just what they sound like: to have something to start with. Nothing more.

Every site is different and has different needs.

If you don't want to include all the files, then only include the ones you want.

This isn't rocket science. It's a preprocessor. Please learn how includes work first.

Do not re-open this issue.

drupalfan2’s picture

Status: Closed (works as designed) » Active

No, the source files are related to the Bootstrap Framework, not this project which simply provides a bridge between that external framework and Drupal.

But I am not talking about the source files, am am talking about this line as you can see above:

@import '../bootstrap/assets/stylesheets/bootstrap';

And this line is a part of the bootstrap theme! Please do not deny this, it is true.

The Bootstrap theme imports all css files.

But I want to find out:
Which of the css files are really needed within(!) the Bootrap theme(!)?

When you or somebody else can tell me which of the css files are really needed I can then only include those and not all.

So please do not close this issue until somebody answers the question:

Which of the css files are really needed within(!) the Bootrap theme(!)?

Once this questions is answered I can change this line in the Bootrap theme sub-theme:
@import '../bootstrap/assets/stylesheets/bootstrap';

And then I will only import the needed css files and not all!

So please do not close this issue until this question is answered.

markhalliwell’s picture

Status: Active » Closed (works as designed)