Twitter bootstrap 使用NPM在引导4中启用Flexbox网格
我刚刚测试了Bootstrap4,由于某些原因,我无法启用Flexbox网格 以下是我的基本SCSS项目结构,以备不时之需:Twitter bootstrap 使用NPM在引导4中启用Flexbox网格,twitter-bootstrap,npm,sass,flexbox,Twitter Bootstrap,Npm,Sass,Flexbox,我刚刚测试了Bootstrap4,由于某些原因,我无法启用Flexbox网格 以下是我的基本SCSS项目结构,以备不时之需: styles ├── framework │ ├── vendor │ │ ├── _bootstrap.scss │ │ │ ├── _custom.scss │ ├── main.scss 我正在将我的所有引导SASS文件从NPM导入一个基本的\u Bootstrap.scss文件: /*! * Bootstrap v4.0.0-alpha.4
styles
├── framework
│ ├── vendor
│ │ ├── _bootstrap.scss
│ │
│ ├── _custom.scss
│
├── main.scss
我正在将我的所有引导SASS文件从NPM导入一个基本的\u Bootstrap.scss
文件:
/*!
* Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com)
* Copyright 2011-2016 The Bootstrap Authors
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
// Core variables and mixins
@import "../../../../node_modules/bootstrap/scss/custom";
@import "../../../../node_modules/bootstrap/scss/variables";
@import "../../../../node_modules/bootstrap/scss/mixins";
// Reset and dependencies
@import "../../../../node_modules/bootstrap/scss/normalize";
@import "../../../../node_modules/bootstrap/scss/print";
// Core CSS
@import "../../../../node_modules/bootstrap/scss/reboot";
@import "../../../../node_modules/bootstrap/scss/type";
@import "../../../../node_modules/bootstrap/scss/images";
@import "../../../../node_modules/bootstrap/scss/code";
@import "../../../../node_modules/bootstrap/scss/grid";
@import "../../../../node_modules/bootstrap/scss/tables";
@import "../../../../node_modules/bootstrap/scss/forms";
@import "../../../../node_modules/bootstrap/scss/buttons";
// Components
@import "../../../../node_modules/bootstrap/scss/animation";
@import "../../../../node_modules/bootstrap/scss/dropdown";
@import "../../../../node_modules/bootstrap/scss/button-group";
@import "../../../../node_modules/bootstrap/scss/input-group";
@import "../../../../node_modules/bootstrap/scss/custom-forms";
@import "../../../../node_modules/bootstrap/scss/nav";
@import "../../../../node_modules/bootstrap/scss/navbar";
@import "../../../../node_modules/bootstrap/scss/card";
@import "../../../../node_modules/bootstrap/scss/breadcrumb";
@import "../../../../node_modules/bootstrap/scss/pagination";
@import "../../../../node_modules/bootstrap/scss/tags";
@import "../../../../node_modules/bootstrap/scss/jumbotron";
@import "../../../../node_modules/bootstrap/scss/alert";
@import "../../../../node_modules/bootstrap/scss/progress";
@import "../../../../node_modules/bootstrap/scss/media";
@import "../../../../node_modules/bootstrap/scss/list-group";
@import "../../../../node_modules/bootstrap/scss/responsive-embed";
@import "../../../../node_modules/bootstrap/scss/close";
// Components w/ JavaScript
@import "../../../../node_modules/bootstrap/scss/modal";
@import "../../../../node_modules/bootstrap/scss/tooltip";
@import "../../../../node_modules/bootstrap/scss/popover";
@import "../../../../node_modules/bootstrap/scss/carousel";
// Utility classes
@import "../../../../node_modules/bootstrap/scss/utilities";
我还有一个\u custom.scss
,它位于放置引导的供应商文件夹之外:
// Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
$enable-flex: true;
如您所见,\u custom.scss
文件包含$enable flex
变量,并设置为true
然后,我有一个main.scss
文件,它将所有内容连接在一起,如下所示:
// Bootstrap Vendor Imported From NPM
@import "framework/vendor/bootstrap";
// Custom Variables For Bootstrap
@import "framework/custom";
当我尝试使用网格时,所有内容仍然设置为浮动,并且我的_custom.scss文件没有启用flex网格
如果我更改NPM引导包文件夹中的\u custom.scss
,网格将启用,但是我不能将其用作解决方案,就像其他人使用我的项目并运行NPM一样,这将被覆盖
任何关于这可能不起作用的建议都将非常感谢