Repository navigation
Split bootstrap.scss into optional and required counterparts (#22891) - #24802
steven-pribilinskiy wants to merge 2 commits into
Conversation
andresgalante
left a comment
There was a problem hiding this comment.
Hi @pribilinskiy thanks for your PR. This is an intresting idea.
I think it adds a layer of unnecessary abstraction and complexity and we end up with the same result, a user would have to choose from the "optional" components anyway.
I rather see a comment on _variables.scss splitting up the settings, files that don't generate code, from the components, that generate code.
It's up to @mdo, but I would pass on this idea.
|
Yeah, I'd pass on this too. |
|
It's not an idea, it's a solution to a problem that many could face after switching from LESS to SCSS. Don't confuse "layers of complexity" with splitting long files (a.k.a spaghetti code). In v3 LESS implementation it wasn't an issue to reference an existing variable from // _my-bootstrap.scss
/*
* Bootstrap v4.0.0-beta.2
*/
@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import 'custom-variables';
@import '~bootstrap/scss/mixins';
@import '~bootstrap/scss/root';
@import '~bootstrap/scss/print';
...Now after every update one will have to compare the
Wrong. @import "~bootstrap/scss/bootstrap-required";
@import "custom-variables";
@import "~bootstrap/scss/bootstrap-optional";In case of a small project, when there's no need to reference existing variables, the user can go with the old way, leveraging the @import "custom-variables";
@import "~bootstrap/scss/bootstrap";It will be a win-win solution for any kind of projects Btw, in the Getting started with theming section of the documentation, there's already a clear separation between Required and Optional stylesheets. |
|
@pribilinskiy thanks for the clarification. It'll be up to @mdo if he wants to introduce this reorganization. |
|
Thanks, but we'll pass. |
Reasons behind this PR are described in #22891