├── .editorconfig ├── .eslintrc ├── .gitignore ├── .npmignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── index.js ├── package.json └── test ├── fixtures ├── basic.css └── basic.expect.css └── test.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | 13 | [*.{json,yml}] 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-shadow-restricted-names": [2], 4 | "computed-property-spacing": [2], 5 | "no-empty-character-class": [2], 6 | "no-irregular-whitespace": [2], 7 | "no-unexpected-multiline": [2], 8 | "no-multiple-empty-lines": [2], 9 | "space-return-throw-case": [2], 10 | "no-constant-condition": [2], 11 | "no-extra-boolean-cast": [2], 12 | "no-inner-declarations": [2], 13 | "no-this-before-super": [2], 14 | "no-array-constructor": [2], 15 | "object-curly-spacing": [2, "always"], 16 | "no-floating-decimal": [2], 17 | "no-warning-comments": [2], 18 | "handle-callback-err": [2], 19 | "no-unneeded-ternary": [2], 20 | "operator-assignment": [2], 21 | "space-before-blocks": [2], 22 | "no-native-reassign": [2], 23 | "no-trailing-spaces": [2], 24 | "operator-linebreak": [2, "after"], 25 | "consistent-return": [2], 26 | "no-duplicate-case": [2], 27 | "no-invalid-regexp": [2], 28 | "no-negated-in-lhs": [2], 29 | "constructor-super": [2], 30 | "no-nested-ternary": [0], 31 | "no-extend-native": [2], 32 | "block-scoped-var": [2], 33 | "no-control-regex": [2], 34 | "no-sparse-arrays": [2], 35 | "no-throw-literal": [2], 36 | "no-return-assign": [2], 37 | "no-const-assign": [2], 38 | "no-class-assign": [2], 39 | "no-extra-parens": [2], 40 | "no-regex-spaces": [2], 41 | "no-implied-eval": [2], 42 | "no-useless-call": [2], 43 | "no-self-compare": [2], 44 | "no-octal-escape": [2], 45 | "no-new-wrappers": [2], 46 | "no-process-exit": [2], 47 | "no-catch-shadow": [2], 48 | "linebreak-style": [2], 49 | "space-infix-ops": [2], 50 | "space-unary-ops": [2], 51 | "no-func-assign": [2], 52 | "no-unreachable": [2], 53 | "accessor-pairs": [2], 54 | "no-empty-label": [2], 55 | "no-fallthrough": [2], 56 | "no-path-concat": [2], 57 | "no-new-require": [2], 58 | "no-spaced-func": [2], 59 | "no-unused-vars": [2], 60 | "spaced-comment": [2], 61 | "no-delete-var": [2], 62 | "comma-spacing": [2], 63 | "no-extra-semi": [2], 64 | "no-extra-bind": [2], 65 | "arrow-spacing": [2], 66 | "prefer-spread": [2], 67 | "no-new-object": [2], 68 | "no-multi-str": [2], 69 | "semi-spacing": [2], 70 | "no-lonely-if": [2], 71 | "dot-notation": [2], 72 | "dot-location": [2, "property"], 73 | "comma-dangle": [2, "never"], 74 | "no-dupe-args": [2], 75 | "no-dupe-keys": [2], 76 | "no-ex-assign": [2], 77 | "no-obj-calls": [2], 78 | "valid-typeof": [2], 79 | "default-case": [2], 80 | "no-redeclare": [2], 81 | "no-div-regex": [2], 82 | "no-sequences": [2], 83 | "no-label-var": [2], 84 | "comma-style": [2], 85 | "brace-style": [2], 86 | "no-debugger": [2], 87 | "quote-props": [0], 88 | "no-iterator": [2], 89 | "no-new-func": [2], 90 | "key-spacing": [2, { "align": "value" }], 91 | "complexity": [2], 92 | "new-parens": [2], 93 | "no-eq-null": [2], 94 | "no-bitwise": [0], 95 | "wrap-iife": [2], 96 | "no-caller": [2], 97 | "use-isnan": [2], 98 | "no-labels": [2], 99 | "no-shadow": [2], 100 | "camelcase": [2], 101 | "eol-last": [2], 102 | "no-octal": [2], 103 | "no-empty": [2], 104 | "no-alert": [2], 105 | "no-proto": [2], 106 | "no-undef": [2], 107 | "no-eval": [2], 108 | "no-with": [2], 109 | "no-void": [2], 110 | "new-cap": [2], 111 | "eqeqeq": [2], 112 | "no-new": [2], 113 | "quotes": [2, "single"], 114 | "indent": [2, "tab"], 115 | "semi": [2, "always"], 116 | "yoda": [2, "never"] 117 | }, 118 | "env": { 119 | "mocha": true, 120 | "node": true 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | test/fixtures/*.actual.css 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - stable 5 | - "0.12" 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.3.0 (2015-10-10) 2 | 3 | - Updated: PostCSS UnRGBA 1.1.0 (major) 4 | - Updated: PostCSS 5.0.9 (patch) 5 | 6 | ## 1.2.0 (2015-10-10) 7 | 8 | - Added: PostCSS UnRGBA 1.0.0 9 | - Updated: Documentation and tests 10 | 11 | ## 1.1.1 (2015-10-05) 12 | 13 | - Updated: Documentation 14 | 15 | ## 1.1.0 (2015-10-05) 16 | 17 | - Added: PostCSS UnNth 1.0.0 18 | 19 | ## 1.0.0 (2015-10-04) 20 | 21 | - Added: Initial release 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | You want to help? You rock! Now, take a moment to be sure your contributions make sense to everyone else. 2 | 3 | ## Reporting Issues 4 | 5 | Found a problem? Want a new feature? 6 | 7 | - See if your issue or idea has [already been reported]. 8 | - Provide a [reduced test case] or a [live example]. 9 | 10 | Remember, a bug is a _demonstrable problem_ caused by _our_ code. 11 | 12 | ## Submitting Pull Requests 13 | 14 | Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits. 15 | 16 | 1. To begin, [fork this project], clone your fork, and add our upstream. 17 | ```bash 18 | # Clone your fork of the repo into the current directory 19 | git clone https://github.com//oldie 20 | # Navigate to the newly cloned directory 21 | cd oldie 22 | # Assign the original repo to a remote called "upstream" 23 | git remote add upstream https://github.com/jonathantneal/oldie 24 | # Install the tools necessary for development 25 | npm install 26 | ``` 27 | 28 | 2. Create a branch for your feature or fix: 29 | ```bash 30 | # Move into a new branch for a feature 31 | git checkout -b feature/thing 32 | ``` 33 | ```bash 34 | # Move into a new branch for a fix 35 | git checkout -b fix/something 36 | ``` 37 | 38 | 3. Be sure your code follows our practices. 39 | ```bash 40 | # Test current code 41 | npm run test 42 | ``` 43 | 44 | 4. Push your branch up to your fork: 45 | ```bash 46 | # Push a feature branch 47 | git push origin feature/thing 48 | ``` 49 | ```bash 50 | # Push a fix branch 51 | git push origin fix/something 52 | ``` 53 | 54 | 5. Now [open a pull request] with a clear title and description. 55 | 56 | [already been reported]: issues 57 | [fork this project]: fork 58 | [live example]: http://codepen.io/pen 59 | [open a pull request]: https://help.github.com/articles/using-pull-requests/ 60 | [reduced test case]: https://css-tricks.com/reduced-test-cases/ 61 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # CC0 1.0 Universal License 2 | 3 | Public Domain Dedication 4 | 5 | The person(s) who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. 6 | 7 | You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. 8 | 9 | In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights. 10 | 11 | Unless expressly stated otherwise, the person(s) who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. 12 | 13 | When using or citing the work, you should not imply endorsement by the author or the affirmer. 14 | 15 | This is a [human-readable summary of the Legal Code](https://creativecommons.org/publicdomain/zero/1.0/) ([read the full text](https://creativecommons.org/publicdomain/zero/1.0/legalcode)). 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Oldie [![Build Status][ci-img]][ci] 2 | 3 | 4 | 5 | [Oldie] tranforms CSS to be compatible with old Internet Explorer. 6 | 7 | ```html 8 | 9 | 10 | ``` 11 | 12 | If you’re like me, you stopped supporting IE8 years ago. Yet, here you are, satisfying another client that somehow managed to get this requirement past you. 13 | 14 | ### Flatten Media Queries 15 | 16 | Resolve media queries for a desktop experience. 17 | 18 | ```css 19 | /* before */ 20 | 21 | body { 22 | font-size: 12px; 23 | } 24 | 25 | @media screen and (max-width: 767px) { 26 | body { 27 | font-size: 16px; 28 | } 29 | } 30 | 31 | @media screen and (min-width: 768px) { 32 | body { 33 | color: #444; 34 | } 35 | } 36 | 37 | /* after */ 38 | 39 | body { 40 | font-size: 12px; 41 | } 42 | 43 | body { 44 | color: #444; 45 | } 46 | ``` 47 | 48 | ### Replace :root 49 | 50 | Swap `:root` selectors with `html` selectors. 51 | 52 | ```css 53 | /* before */ 54 | 55 | :root { 56 | background-color: black; 57 | color: white; 58 | } 59 | 60 | /* after */ 61 | 62 | html { 63 | background-color: black; 64 | color: white; 65 | } 66 | ``` 67 | 68 | ### Reduce calc() 69 | 70 | Reduce `calc()` references whenever possible. 71 | 72 | ```css 73 | /* before */ 74 | 75 | .banner { 76 | font-size: calc(16px * 3); 77 | } 78 | 79 | /* after */ 80 | 81 | .banner { 82 | font-size: 48px; 83 | } 84 | ``` 85 | 86 | ### Resolve rem 87 | 88 | Resolve `rem` values as standard pixels. 89 | 90 | ```css 91 | /* before */ 92 | 93 | .container { 94 | margin-top: 2.5rem; 95 | } 96 | 97 | /* after */ 98 | 99 | .container { 100 | margin-top: 40px; 101 | } 102 | ``` 103 | 104 | ### Uphold opacity 105 | 106 | Swap `opacity` properties with IE8 compatible `filter` properties. 107 | 108 | ```css 109 | /* before */ 110 | 111 | .figure { 112 | opacity: .5; 113 | } 114 | 115 | /* after */ 116 | 117 | .figure { 118 | filter: alpha(opacity=50); 119 | } 120 | ``` 121 | 122 | ### Patch pseudo-elements 123 | 124 | Swap `::` selectors with IE8 compatible `:` selectors. 125 | 126 | ```css 127 | /* before */ 128 | 129 | a::after { 130 | content: " (" attr(href) ")"; 131 | } 132 | 133 | /* after */ 134 | 135 | a:after { 136 | content: " (" attr(href) ")"; 137 | } 138 | ``` 139 | 140 | ### Retain rgba colors 141 | 142 | Swap `rgba` values with IE8 compatible hex values and filter properties. 143 | 144 | ```css 145 | /* before */ 146 | 147 | .hero { 148 | background-color: rgba(153, 221, 153, .8); 149 | border: solid 1px rgba(100, 102, 103, .3); 150 | } 151 | 152 | /* after */ 153 | 154 | .hero { 155 | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8099dd99',endColorstr='#8099dd99'); 156 | border: solid 1px #646667; 157 | } 158 | ``` 159 | 160 | ### Forget :not 161 | 162 | Remove `:not()` selectors while preserving the other selectors in a rule. 163 | 164 | ```css 165 | /* before */ 166 | 167 | .a, .b:not(.c), d { 168 | color: red; 169 | } 170 | 171 | /* after */ 172 | 173 | .a, .d { 174 | color: red; 175 | } 176 | ``` 177 | 178 | ### Salvage :nth-child 179 | 180 | Swap `:nth-child` selectors with `:first-child`. 181 | 182 | ```css 183 | /* before */ 184 | 185 | .container > p:nth-child(4).specific > span { 186 | font-weight: bold; 187 | } 188 | 189 | /* after */ 190 | 191 | .container > :first-child + * + * + p.specific > span { 192 | font-weight: bold; 193 | } 194 | ``` 195 | 196 | ## Plugins 197 | 198 | [Oldie] is powered by the following plugins: 199 | 200 | - [PostCSS Calc](https://github.com/postcss/postcss-calc) 201 | - [PostCSS UnMQ](https://github.com/jonathantneal/postcss-unmq) 202 | - [PostCSS UnRoot](https://github.com/jonathantneal/postcss-unroot) 203 | - [PostCSS UnNth](https://github.com/jonathantneal/postcss-unnth) 204 | - [PostCSS UnNot](https://github.com/jonathantneal/postcss-unnot) 205 | - [PostCSS UnOpacity](https://github.com/jonathantneal/postcss-unopacity) 206 | - [PostCSS UnRGBA](https://github.com/jonathantneal/postcss-unrgba) 207 | - [PostCSS Pixrem](https://github.com/robwierzbowski/node-pixrem) 208 | - [PostCSS Pseudo Elements](https://github.com/axa-ch/postcss-pseudoelements) 209 | 210 | Some of these plugins have more features than are described here. Visit their project pages to learn more about them individually. 211 | 212 | ## Usage 213 | 214 | Follow these steps to use [Oldie]. 215 | 216 | Add [Oldie] to your build tool: 217 | 218 | ```bash 219 | npm install oldie --save-dev 220 | ``` 221 | 222 | #### Node 223 | 224 | ```js 225 | require('oldie')({ /* options */ }).process(YOUR_CSS); 226 | ``` 227 | 228 | #### PostCSS 229 | 230 | Add [PostCSS] to your build tool: 231 | 232 | ```bash 233 | npm install postcss --save-dev 234 | ``` 235 | 236 | Load [Oldie] as a PostCSS plugin: 237 | 238 | ```js 239 | postcss([ 240 | require('oldie')({ /* options */ }) 241 | ]); 242 | ``` 243 | 244 | #### Gulp 245 | 246 | Add [Gulp PostCSS] to your build tool: 247 | 248 | ```bash 249 | npm install gulp-postcss --save-dev 250 | ``` 251 | 252 | Enable [Oldie] within your Gulpfile: 253 | 254 | ```js 255 | var postcss = require('gulp-postcss'); 256 | 257 | gulp.task('css', function () { 258 | return gulp.src('./css/src/*.css').pipe( 259 | postcss([ 260 | require('oldie')({ /* options */ }) 261 | ]) 262 | ).pipe( 263 | gulp.dest('./css') 264 | ); 265 | }); 266 | ``` 267 | 268 | #### Grunt 269 | 270 | Add [Grunt PostCSS] to your build tool: 271 | 272 | ```bash 273 | npm install grunt-postcss --save-dev 274 | ``` 275 | 276 | Enable [Oldie] within your Gruntfile: 277 | 278 | ```js 279 | grunt.loadNpmTasks('grunt-postcss'); 280 | 281 | grunt.initConfig({ 282 | postcss: { 283 | options: { 284 | processors: [ 285 | require('oldie')({ /* options */ }) 286 | ] 287 | }, 288 | dist: { 289 | src: 'css/*.css' 290 | } 291 | } 292 | }); 293 | ``` 294 | 295 | ## Options 296 | 297 | Each plugin’s options may be configured by targeting the plugin’s namespace. Any plugins may be disabled by giving them a `disable` property. 298 | 299 | Example: 300 | ```js 301 | require('oldie')({ 302 | rgba: { 303 | filter: true 304 | }, 305 | rem: { 306 | replace: false 307 | }, 308 | unmq: { 309 | disable: true 310 | } 311 | }) 312 | ``` 313 | 314 | [ci]: https://travis-ci.org/jonathantneal/oldie 315 | [ci-img]: https://travis-ci.org/jonathantneal/oldie.svg 316 | [Gulp PostCSS]: https://github.com/postcss/gulp-postcss 317 | [Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss 318 | [PostCSS]: https://github.com/postcss/postcss 319 | [Oldie]: https://github.com/jonathantneal/oldie 320 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var assign = require('object-assign'); 2 | var postcss = require('postcss'); 3 | 4 | var processors = [ 5 | { 6 | plugin: require('postcss-calc'), 7 | namespace: 'calc', 8 | defaults: {} 9 | }, 10 | { 11 | plugin: require('postcss-unmq'), 12 | namespace: 'media', 13 | defaults: {} 14 | }, 15 | { 16 | plugin: require('postcss-unroot'), 17 | namespace: 'root', 18 | defaults: {} 19 | }, 20 | { 21 | plugin: require('postcss-unnth'), 22 | namespace: 'nth', 23 | defaults: {} 24 | }, 25 | { 26 | plugin: require('postcss-unnot'), 27 | namespace: 'not', 28 | defaults: {} 29 | }, 30 | { 31 | plugin: require('postcss-unopacity'), 32 | namespace: 'opacity', 33 | defaults: {} 34 | }, 35 | { 36 | plugin: require('postcss-unrgba'), 37 | namespace: 'rgba', 38 | defaults: {} 39 | }, 40 | { 41 | plugin: require('pixrem'), 42 | namespace: 'rem', 43 | defaults: { 44 | replace: true 45 | } 46 | }, 47 | { 48 | plugin: require('postcss-pseudoelements'), 49 | namespace: 'pseudo', 50 | defaults: {} 51 | } 52 | ]; 53 | 54 | module.exports = postcss.plugin('oldie', function (opts) { 55 | opts = assign({}, opts); 56 | 57 | var instance = postcss(); 58 | 59 | processors.forEach(function (processor) { 60 | var namespaceOptions = processor.namespace in opts ? opts[processor.namespace] : opts; 61 | var processorOptions = {}; 62 | 63 | processorOptions = assign({}, processor.defaults, namespaceOptions); 64 | 65 | if (namespaceOptions && !processorOptions.disable) { 66 | instance.use(processor.plugin(processorOptions)); 67 | } 68 | }); 69 | 70 | return instance; 71 | }); 72 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oldie", 3 | "version": "1.3.0", 4 | "description": "Transform CSS into something compatible with older Internet Explorer", 5 | "keywords": [ 6 | "postcss", 7 | "css", 8 | "postcss-plugin", 9 | "mqs", 10 | "medias", 11 | "query", 12 | "queries", 13 | "opacity", 14 | "opacities", 15 | "filters", 16 | "-ms-filters", 17 | "ms", 18 | "prefixes", 19 | "pixels", 20 | "rems", 21 | "nots", 22 | "selectors" 23 | ], 24 | "author": "Jonathan Neal ", 25 | "license": "CC0-1.0", 26 | "repository": { 27 | "type": "git", 28 | "url": "https://github.com/jonathantneal/oldie.git" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/jonathantneal/oldie/issues" 32 | }, 33 | "homepage": "https://github.com/jonathantneal/oldie", 34 | "dependencies": { 35 | "object-assign": "^4.0.1", 36 | "pixrem": "^3.0.0", 37 | "postcss": "^5.0.9", 38 | "postcss-calc": "^5.0.0", 39 | "postcss-pseudoelements": "^3.0.0", 40 | "postcss-unmq": "^1.0.0", 41 | "postcss-unnot": "^1.0.1", 42 | "postcss-unnth": "^1.0.1", 43 | "postcss-unopacity": "^1.0.0", 44 | "postcss-unrgba": "^1.1.0", 45 | "postcss-unroot": "^1.0.0" 46 | }, 47 | "devDependencies": { 48 | "eslint": "^1.6.0", 49 | "tap-spec": "^4.1.0", 50 | "tape": "^4.2.1" 51 | }, 52 | "scripts": { 53 | "lint": "eslint . --ignore-path .gitignore", 54 | "test-fixtures": "tape test/*.js | tap-spec", 55 | "test": "npm run lint && npm run test-fixtures" 56 | }, 57 | "engines": { 58 | "iojs": ">=2.0.0", 59 | "node": ">=0.12.0" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /test/fixtures/basic.css: -------------------------------------------------------------------------------- 1 | :root body { 2 | background-color: rgba(0, 0, 0, .9); 3 | color: white; 4 | } 5 | 6 | @media screen and (max-width: 767px) { 7 | :root body { 8 | font-size: 1rem; 9 | } 10 | } 11 | 12 | @media screen and (min-width: 768px) { 13 | :root body { 14 | font-size: .75rem; 15 | } 16 | 17 | .header:not(header), header::after { 18 | content: ""; 19 | opacity: calc(1 / 2); 20 | } 21 | 22 | p:nth-child(2) { 23 | font-weight: bold; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/fixtures/basic.expect.css: -------------------------------------------------------------------------------- 1 | html body { 2 | background-color: #000000; 3 | color: white; 4 | } 5 | 6 | html body { 7 | font-size: 12px; 8 | } 9 | 10 | header:after { 11 | content: ""; 12 | filter: alpha(opacity=50); 13 | } 14 | 15 | :first-child + p { 16 | font-weight: bold; 17 | } 18 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | var tests = { 2 | 'oldie': { 3 | 'basic': { 4 | message: 'supports basic usage' 5 | } 6 | } 7 | }; 8 | 9 | var debug = false; 10 | var dir = './test/fixtures/'; 11 | 12 | var fs = require('fs'); 13 | var path = require('path'); 14 | var plugin = require('../'); 15 | var test = require('tape'); 16 | 17 | Object.keys(tests).forEach(function (name) { 18 | var parts = tests[name]; 19 | 20 | test(name, function (t) { 21 | var fixtures = Object.keys(parts); 22 | 23 | t.plan(fixtures.length * 2); 24 | 25 | fixtures.forEach(function (fixture) { 26 | var message = parts[fixture].message; 27 | var options = parts[fixture].options; 28 | var warning = parts[fixture].warning || 0; 29 | var warningMsg = message + ' (# of warnings)'; 30 | 31 | var baseName = fixture.split(':')[0]; 32 | var testName = fixture.split(':').join('.'); 33 | 34 | var inputPath = path.resolve(dir + baseName + '.css'); 35 | var expectPath = path.resolve(dir + testName + '.expect.css'); 36 | var actualPath = path.resolve(dir + testName + '.actual.css'); 37 | 38 | var inputCSS = fs.readFileSync(inputPath, 'utf8'); 39 | var expectCSS = fs.readFileSync(expectPath, 'utf8'); 40 | 41 | plugin.process(inputCSS, options).then(function (result) { 42 | var actualCSS = result.css; 43 | 44 | if (debug) fs.writeFileSync(actualPath, actualCSS); 45 | 46 | t.equal(actualCSS, expectCSS, message); 47 | 48 | t.equal(result.warnings().length, warning, warningMsg); 49 | }); 50 | }); 51 | }); 52 | }); 53 | --------------------------------------------------------------------------------