sanitize.css
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -0,1 +1,5 @@ | ||
## 2.1.0 (2015-10-05) | ||
- Added: CSS version | ||
## 2.0.0 (2015-09-03) | ||
@@ -2,0 +6,0 @@ |
@@ -1,20 +0,36 @@ | ||
var gulp = require('gulp'); | ||
var gulp = require('gulp'); | ||
var autoprefixer = require('autoprefixer'); | ||
var minifyCSS = require('gulp-minify-css'); | ||
var postcss = require('gulp-postcss'); | ||
var sass = require('gulp-sass'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
var processors = [ | ||
autoprefixer({browsers: ["Android >= 4.3", "Chrome >= 39", "Edge >= 12", "Firefox >= 34", "Explorer >= 9", "iOS >= 7", "Safari >= 7", "ExplorerMobile >= 10"]}) | ||
]; | ||
var rename = require('gulp-rename'); | ||
gulp.task('default', function () { | ||
var autoprefixer = require('autoprefixer-core'); | ||
var minifyCSS = require('gulp-minify-css'); | ||
var postcss = require('gulp-postcss'); | ||
var sass = require('gulp-sass'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
gulp.task('development', function() { | ||
return gulp.src('sanitize.scss') | ||
.pipe(sourcemaps.init()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded' | ||
})) | ||
.pipe(postcss(processors)) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('./dist')); | ||
}); | ||
gulp.task('minified', function() { | ||
return gulp.src('sanitize.scss') | ||
.pipe(sourcemaps.init()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded' | ||
})) | ||
.pipe(minifyCSS({ | ||
keepBreaks: true | ||
})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('./dist')); | ||
.pipe(sourcemaps.init()) | ||
.pipe(sass({ | ||
outputStyle: 'expanded' | ||
})) | ||
.pipe(minifyCSS()) | ||
.pipe(postcss(processors)) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('./dist')); | ||
}); | ||
gulp.task('default', ['minified', 'development']); |
{ | ||
"name": "sanitize.css", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Render elements consistently. Style with best practices.", | ||
@@ -29,3 +29,6 @@ "author": "Jonathan Neal", | ||
"gulp-sass": "^2.0.4", | ||
"gulp-sourcemaps": "^1.5.2" | ||
"gulp-sourcemaps": "^1.5.2", | ||
"autoprefixer": "^6.0.3", | ||
"gulp-postcss": "^6.0.0", | ||
"gulp-rename": "^1.2.2" | ||
}, | ||
@@ -32,0 +35,0 @@ "scripts": { |
@@ -38,9 +38,9 @@ # sanitize.css | ||
- CSS inheritance is universal so that styles are easier to control ([code](sanitize.scss#L96-L112)). | ||
- The box model is more intuitive with border-box ([reference](http://www.paulirish.com/2012/box-sizing-border-box-ftw/)) ([reference](https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/)) ([code](sanitize.scss#L139)). | ||
- Smaller font-sizes display consistently across browsers ([reference](https://github.com/servo/servo/issues/3423#issuecomment-56321664)) ([code](sanitize.scss#L76-L78)). | ||
- Monospace fonts render consistently ([reference](http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/)) ([code](sanitize.scss#L216-L221)). | ||
- Border styles work as expected ([reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style#Values)) ([code](sanitize.scss#L122-L127)). | ||
- Text selections containing a drop shadow remain legible ([reference](https://twitter.com/miketaylr/status/12228805301)) ([code](sanitize.scss#L260-L263)). | ||
- Content may be hidden from the screen but not screenreaders ([reference](http://www.paciellogroup.com/blog/2012/05/html5-accessibility-chops-hidden-and-aria-hidden/)) ([reference](https://www.drupal.org/node/897638)) ([code](sanitize.scss#L285-L293)). | ||
- CSS inheritance is universal so that styles are easier to control ([code](sanitize.scss#L96-L116)). | ||
- The box model is more intuitive with border-box ([reference](http://www.paulirish.com/2012/box-sizing-border-box-ftw/)) ([reference](https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/)) ([code](sanitize.scss#L143)). | ||
- Smaller font-sizes display consistently across browsers ([reference](https://github.com/servo/servo/issues/3423#issuecomment-56321664)) ([code](sanitize.scss#L80-L82)). | ||
- Monospace fonts render consistently ([reference](http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/)) ([code](sanitize.scss#L218-L225)). | ||
- Border styles work as expected ([reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style#Values)) ([code](sanitize.scss#L124-L131)). | ||
- Text selections containing a drop shadow remain legible ([reference](https://twitter.com/miketaylr/status/12228805301)) ([code](sanitize.scss#L262-L267)). | ||
- Content may be hidden from the screen but not screenreaders ([reference](http://www.paciellogroup.com/blog/2012/05/html5-accessibility-chops-hidden-and-aria-hidden/)) ([reference](https://www.drupal.org/node/897638)) ([code](sanitize.scss#L287-L297)). | ||
@@ -59,3 +59,3 @@ ## Differences | ||
// overwrite defaults in sanitize.scss | ||
$root-font-family: "Open Sans"; | ||
$root-font-family: "Open Sans", sans-serif; | ||
$root-text-rendering: optimizeSpeed; | ||
@@ -69,3 +69,3 @@ | ||
- **$root-font-family**: the default font family is `sans-serif`. | ||
- **$root-font-size**: the default font size `16px`. | ||
- **$root-font-size**: the default font size `100%`. | ||
- **$root-line-height**: the default line height is `1.5`. | ||
@@ -72,0 +72,0 @@ - **$root-text-rendering**: the default text-rendering is `optimizeLegibility`. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39571
11
235
7
1