Coder Social home page Coder Social logo

关于bootstrap4 about react-ui HOT 6 OPEN

zhangqhzz avatar zhangqhzz commented on July 17, 2024
关于bootstrap4

from react-ui.

Comments (6)

zhangqhzz avatar zhangqhzz commented on July 17, 2024

我是指install 的bootstrap4与您项目中的styles下的scss如何协调工作

from react-ui.

Lobos avatar Lobos commented on July 17, 2024

bootstrap 只是使用了 mixins 和 variables 体系,css部分是自己按bootstrap的设计实现的,如果只是换肤的话,用这个loader替换掉 variables 就好了

{
      loader: 'rctui-theme-loader',
      options: {
        // 少量的变量可以通过string传入
        variables: '$brand-primary: blue;',
        // 大量变量可以传入文件
        files: ['src/_variables.scss']
      }
    }

如果fork了,在styles/themes 下面加一个 主题也可以

from react-ui.

zhangqhzz avatar zhangqhzz commented on July 17, 2024

我对比了一下,虽然我知道bootstrap使用了 mixins 和 variables 体系,但install的和你的在文件及目录结构 上存在不少差别,不知道是什么原因?是因为install的是最新正式版的原因吗?我的意思是我已经install了,能否不用组件styles目录中的scss,而从组件包中拿出我需要的某组件js文件,并将类似import _tables from '../styles/_tables.scss'去掉,因为我在我项目index.js已经有整体引入我install的bootstrap

from react-ui.

zhangqhzz avatar zhangqhzz commented on July 17, 2024

我的index.js中有
...
import '../scss/style.scss'
...
而style.scss中有@import "node_modules/bootstrap/scss/bootstrap";
如果不用你组件中的css,我担心组件中有用到className的地方,在我install的bootstrap中没有

from react-ui.

zhangqhzz avatar zhangqhzz commented on July 17, 2024

我又看了,你用的是Bootstrap4的Alpha版本,我用的是Beta版本的Bootstrap4,甚至是更新的,相比于Alpha版本已经往前迈了一大步,告别了传统盒模型的布局方式,拥抱flexbox,同时删去了很多以前的残余代码,很想你能用新的V4重整一下

from react-ui.

Lobos avatar Lobos commented on July 17, 2024

应该不会在beta版的基础上改了,因为几乎是要把整个库样式重写一遍,有点性价比不高。等出正式版再考虑这个问题了。

from react-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.