Giter Club home page Giter Club logo

antcssreset's Introduction

AntUI Reset

原文链接

虽然文件名为reset,其实只是精简版的reset。

reset和normalize的区别可以看出,一个是控制倾向,一个是自然倾向。

精简版reset中,主要保留的是一些布局类reset(如margin:0),去掉了控制倾向比较强的部分。

同时,一些不常用的html5标签,也被去除。

特性

  • 最低控制 用户没有重置类样式时,也能保证基本显示
  • 自由兼容 使用者可以自由额外引入reset or normalize,而不用担心冲突
  • 节约代码 去掉一些不必要的代码,节约是良好的美德
*, *:before, *:after {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
  
  body, div, dl, dt, dd, ul, ol, li, h1, h2, h3,
  h4, h5, h6, form, fieldset, legend,
  input, textarea, p, blockquote, th, td {
    margin: 0;
    padding: 0;
  }
  
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
  
  fieldset, img {
    border: 0;
  }
  
  li {
    list-style: none;
  }
  
  caption, th {
    text-align: left;
  }
  
  q:before,
  q:after {
    content: "";
  }
  
  input:password {
    ime-mode: disabled;
  }
  
  /* A11Y:移除了 outline 样式,注意设置其他 :focus 样式,方便残障人士识别焦点 */
  *:focus {
    outline: none;
  }

antcssreset's People

Contributors

befriend1314 avatar

Watchers

 avatar

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.