Coder Social home page Coder Social logo

yerffejytnac / sanitize.css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csstools/sanitize.css

0.0 0.0 0.0 80 KB

Render elements consistently. Style with best practices.

Home Page: http://jonathantneal.github.io/sanitize.css/

License: Other

CSS 90.56% JavaScript 9.44%

sanitize.css's Introduction

sanitize.css

Render elements consistently. Style with best practices.

Installation

Bower

bower install --save sanitize-css

NPM

npm install sanitize.css

Sass

@import 'vendors/sanitize.scss';

CSS

@import url(vendors/sanitize.css);

Highlights

  • CSS inheritance is universal so that styles are easier to control (code).
  • The box model is more intuitive with border-box (reference) (reference) (code).
  • Smaller font-sizes display consistently across browsers (reference) (code).
  • Monospace fonts render consistently (reference) (code).
  • Border width works as expected (reference) (code).
  • Text selections containing a drop shadow remain legible (reference) (code).
  • Content may be hidden from the screen but not screenreaders (reference) (reference) (code).

To give you even more control, sanitize.scss allows you to define your own defaults for box-sizing, font family, monospace font family, text rendering, selection background color, and smaller font size - all without over-declaring them later.

// overwrite defaults in sanitize.scss
$default-font-family: "Open Sans";
$default-text-rendering: optimizeSpeed;

import 'vendors/sanitize.scss';
  • $default-box-sizing: the default box-sizing is border-box.
  • $default-font-family: the default font family is sans-serif.
  • $default-text-rendering: the default text-rendering is optimizeLegibility.
  • $default-monospace-font-family: the default monospace font is monospace.
  • $default-selection-background-color: the default selection background color is #B3D4FC.
  • $default-small-font-size: the default small font size is 75%.

Support

At present, we support the current and previous major releases of popular web browsers. When a new version is released, we begin supporting that version and stop supporting the third most recent version.

These browsers currently include Android 4.3-4.4+, Chrome 39-40+, Firefox 34-35+, Internet Explorer 10-11+, iOS 7-8+, Safari 7-8+, Windows Phone 8.1+.

License

sanitize.css is dedicated to the public domain.

sanitize.css's People

Contributors

jonathantneal avatar kittygiraudel avatar pascalduez 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.