GithubHelp home page GithubHelp logo

样式初始化中的box-sizing about vant HOT 6 CLOSED

youzan avatar youzan commented on April 30, 2024
样式初始化中的box-sizing

from vant.

Comments (6)

llk2yq avatar llk2yq commented on April 30, 2024

@leftstyle 在自己项目的reset.css中设置一下 border-box即可。不过官方能改是最好的。

from vant.

leftstyle avatar leftstyle commented on April 30, 2024

@YYQ8023 直接覆盖会不会影响vant组件的样式?

from vant.

llk2yq avatar llk2yq commented on April 30, 2024

@leftstyle 我目前的项目覆盖了没有产生影响,我之前用的一个UI组件库的resetCss里也是
* { box-sizing: border-box; }

from vant.

leftstyle avatar leftstyle commented on April 30, 2024

@YYQ8023 OK,多谢。希望官方能回应一下这个问题。

from vant.

chenjiahan avatar chenjiahan commented on April 30, 2024

@leftstyle Vant 的所有组件都是不依赖 reset.css 中的样式的,因此在项目中使用 border-box 还是 content-box 完全取决于使用者,对组件样式不会产生影响。

目前只存在一种方式会引入 vant 中 reset.css,就是直接在项目中完整地引入 vant-css。对于这种情况,建议将引入方式改为按需引入,减少不必要的代码引入。vant-css 这边也会在下个大版本中移除对 reset.css 的默认引用。

from vant.

leftstyle avatar leftstyle commented on April 30, 2024

@chenjiahan I see.谢谢。

from vant.

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.