From c252723dd31aa9d758e10c50c7d719179072e540 Mon Sep 17 00:00:00 2001 From: Anton Podviaznikov Date: Fri, 29 Jul 2011 17:03:15 +0200 Subject: [PATCH 001/254] added box-flex-group to vendor.styl and tests --- lib/nib/vendor.styl | 7 +++++++ test/cases/vendor.css | 5 +++++ test/cases/vendor.styl | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 7ecb7a1c..2946efbb 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -178,6 +178,13 @@ box-orient() box-flex() vendor('box-flex', arguments) +/* + * Vendor "box-flex-group" support. + */ + +box-flex-group() + vendor('box-flex-group', arguments) + /* * Vendor "box-align" support. */ diff --git a/test/cases/vendor.css b/test/cases/vendor.css index b4d09f07..47bef3b5 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -24,6 +24,11 @@ section div { -moz-box-flex: 1; box-flex: 1; } +section div { + -webkit-box-flex-group: 1; + -moz-box-flex-group: 1; + box-flex-group: 1; +} section { -webkit-box-align: center; -moz-box-align: center; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 0e4cb629..a947f5ff 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -19,6 +19,10 @@ section div box-flex: 1; +section + div + box-flex-group: 1; + section box-align: center; box-pack: center; From fa7f5c15f21cb2178b58fdb3e50e72f2db4686a4 Mon Sep 17 00:00:00 2001 From: Anton Podviaznikov Date: Fri, 5 Aug 2011 00:05:29 +0200 Subject: [PATCH 002/254] added box style utility. added few tests. --- lib/nib/box.styl | 22 ++++++++++++++++++++++ lib/nib/index.styl | 1 + lib/nib/vendor.styl | 7 +++++++ test/cases/box.styl | 9 +++++++++ test/cases/vendor.css | 17 +++++++++++++++++ test/cases/vendor.styl | 7 +++++++ 6 files changed, 63 insertions(+) create mode 100644 lib/nib/box.styl create mode 100644 test/cases/box.styl diff --git a/lib/nib/box.styl b/lib/nib/box.styl new file mode 100644 index 00000000..38493fe3 --- /dev/null +++ b/lib/nib/box.styl @@ -0,0 +1,22 @@ +/* + * + * Synopsis: + * + * box: orient direction + * + * Examples: + * + * box: horizontal + * box: horizontal reverse + * + */ + +box(args) + for prefix in vendor-prefixes + if official == prefix + {display}: box + else + {display}: unquote('-') + prefix + '-box' + box-orient: arguments[0] + if arguments[1] + box-direction: arguments[1] diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 1cef9476..e26d7624 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -7,3 +7,4 @@ @import 'https://github.com/iconic' @import 'https://github.com/gradients' @import 'https://github.com/buttons' +@import 'https://github.com/box' diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 2946efbb..27c7d10a 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -77,6 +77,13 @@ column-rule-width() column-rule-style() vendor('column-rule-style', arguments) +/* + * Vendor "column-width" support. + */ + +column-width() + vendor('column-width', arguments) + /* * Vendor "background-size" support. */ diff --git a/test/cases/box.styl b/test/cases/box.styl new file mode 100644 index 00000000..20c0c81c --- /dev/null +++ b/test/cases/box.styl @@ -0,0 +1,9 @@ + +@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/box' + +section + box: horizontal + +section + box: horizontal reverse diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 47bef3b5..d3af6db7 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -79,6 +79,23 @@ section { -moz-column-gap: 2em; column-gap: 2em; } +section { + -webkit-column-count: 2; + -moz-column-count: 2; + column-count: 2; + -webkit-column-rule-width: 1px; + -moz-column-rule-width: 1px; + column-rule-width: 1px; + -webkit-column-rule-style: solid; + -moz-column-rule-style: solid; + column-rule-style: solid; + -webkit-column-rule-color: #bbb; + -moz-column-rule-color: #bbb; + column-rule-color: #bbb; + -webkit-column-width: 200px; + -moz-column-width: 200px; + column-width: 200px; +} section { -webkit-column-count: 2; -moz-column-count: 2; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index a947f5ff..6d4cecb3 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -45,6 +45,13 @@ section column-rule: 1px solid #bbb; column-gap: 2em; +section + column-count: 2; + column-rule-width: 1px; + column-rule-style: solid; + column-rule-color: #bbb; + column-width: 200px; + section column-count: 2; column-rule-width: 1px; From 9ade70e7b39d7df98d43108078307f67f71f6081 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 4 Aug 2011 16:11:08 -0700 Subject: [PATCH 003/254] Release 0.1.0 --- History.md | 11 +++++++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 96a378d0..b0c3a3d9 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,15 @@ +0.1.0 / 2011-08-04 +================== + + * Added `box` style mixin [podviaznikov] + * Added `box-flex-group` to vendor.styl [podviaznikov] + * Added `box-direction` support [podviaznikov] + * Added `backface-visibility` [podviaznikov] + * Added `columns` support [podviaznikov] + * Added animations into vendor [podviaznikov] + * Lowered text-indent to a moderate -99999em, since my browser (Chromium 13.0.767.1 on Linux amd64) won't hide text if text-indent is below -6990506em. + 0.0.8 / 2011-05-24 ================== diff --git a/lib/nib.js b/lib/nib.js index 0d3c14c4..0ef65701 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -30,7 +30,7 @@ try { * Library version. */ -exports.version = '0.0.8'; +exports.version = '0.0.9'; /** * Stylus path. diff --git a/package.json b/package.json index 05a073a4..b69b0a4a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.0.8", + "version": "0.1.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From d50f8a9e7262c3eb9297c296be7a14fe47e45a64 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:30:37 -0700 Subject: [PATCH 004/254] Removed unneeded gradient global (Canvas was unused, we use that instead for checks). --- lib/nib.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nib.js b/lib/nib.js index 0ef65701..6f46c105 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -12,8 +12,7 @@ var stylus = require('stylus') , nodes = stylus.nodes , utils = stylus.utils - , gradient - , Canvas; + , Canvas exports = module.exports = plugin; From 9e557ae99860e3c985aed275851f8c55d8825e25 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:31:25 -0700 Subject: [PATCH 005/254] Added color-images as an exposed canvas API. Use `Canvas` instead of `gradient` for our feature-detection. --- lib/nib.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/nib.js b/lib/nib.js index 6f46c105..cfcee48e 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -16,11 +16,13 @@ var stylus = require('stylus') exports = module.exports = plugin; -// conditionally expose gradient api +// conditionally expose canvas-based APIs. try { - require('canvas'); - gradient = require('./nodes/gradient'); + Canvas = require('canvas'); + + var gradient = require('./nodes/gradient') + , colorImage = require('./nodes/color-image') } catch (err) { // ignore } From 5db36082de8adcb2e73b5b01491c82cc929456b9 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 26 Aug 2011 12:31:47 -0700 Subject: [PATCH 006/254] Fixed gitignored css test cases --- .gitignore | 1 + test/cases/box.css | 19 +++++++++++++++++++ test/cases/relative.css | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 test/cases/box.css create mode 100644 test/cases/relative.css diff --git a/.gitignore b/.gitignore index 8c102d75..f769b91a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.css +!test/cases/*.css .DS_Store node_modules diff --git a/test/cases/box.css b/test/cases/box.css new file mode 100644 index 00000000..8e413eb3 --- /dev/null +++ b/test/cases/box.css @@ -0,0 +1,19 @@ +section { + display: -webkit-box; + display: -moz-box; + display: box; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + box-orient: horizontal; +} +section { + display: -webkit-box; + display: -moz-box; + display: box; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + box-orient: horizontal; + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + box-direction: reverse; +} \ No newline at end of file diff --git a/test/cases/relative.css b/test/cases/relative.css new file mode 100644 index 00000000..389aa3b6 --- /dev/null +++ b/test/cases/relative.css @@ -0,0 +1,5 @@ + +#login { + position: relative; + left: 10px; +} \ No newline at end of file From f77f55faa3214ad50a568e783bf89566a24fb27a Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:32:11 -0700 Subject: [PATCH 007/254] Added exposed color-image related functions. Improved style. --- lib/nib.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/nib.js b/lib/nib.js index cfcee48e..62528881 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -49,13 +49,20 @@ exports.path = __dirname; function plugin() { return function(style){ style.include(__dirname); - if (gradient) { + + if (Canvas) { + style.define('has-canvas', nodes.true); + + // gradients style.define('create-gradient-image', gradient.create) style.define('gradient-data-uri', gradient.dataURL) style.define('add-color-stop', gradient.addColorStop) - style.define('has-canvas', nodes.true); + + // color images + style.define('create-color-image', colorImage.create) + style.define('color-data-uri', colorImage.dataURL); } else { style.define('has-canvas', nodes.false); } } -} \ No newline at end of file +} From 1f061cd910fdd5318329b3a79b8ec81c09aca2ff Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:33:20 -0700 Subject: [PATCH 008/254] Updated stylus version for tests (required for `#hexa` and `#hexhexa`). --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b69b0a4a..f0ce758c 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "devDependencies": { "connect": "1.4.1" , "jade": "0.11.0" - , "stylus": "0.13.x" + , "stylus": "0.15.x" , "canvas": ">= 0.0.1" }, "author": "TJ Holowaychuk ", "main": "lib/nib.js", "engines": { "node": "*" } -} \ No newline at end of file +} From 54e4286554590c096ba867f42375038aba43536a Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:33:59 -0700 Subject: [PATCH 009/254] Added color-image to list of nib imports. --- lib/nib/index.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nib/index.styl b/lib/nib/index.styl index e26d7624..e83d6163 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -8,3 +8,4 @@ @import 'https://github.com/gradients' @import 'https://github.com/buttons' @import 'https://github.com/box' +@import 'https://github.com/color-image' From 6d9f88bf2c14e15d3abe9046ce3ff843e8c066f5 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:34:13 -0700 Subject: [PATCH 010/254] Added `color-image` stylus function. --- lib/nib/color-image.styl | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/nib/color-image.styl diff --git a/lib/nib/color-image.styl b/lib/nib/color-image.styl new file mode 100644 index 00000000..c799b455 --- /dev/null +++ b/lib/nib/color-image.styl @@ -0,0 +1,5 @@ + +color-image(color) + error('node-canvas is required for color-image()') unless has-canvas + colorImage = create-color-image(color) + 'url(https://github.com/%s)' % color-data-uri(colorImage) From cb4d6d96cc5a05ba09043238e6475651b40a5ac3 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:34:37 -0700 Subject: [PATCH 011/254] Added `ColorImage` node. --- lib/nodes/color-image.js | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 lib/nodes/color-image.js diff --git a/lib/nodes/color-image.js b/lib/nodes/color-image.js new file mode 100644 index 00000000..bcaf8b22 --- /dev/null +++ b/lib/nodes/color-image.js @@ -0,0 +1,84 @@ + +/** + * Module dependencies. + */ + +var stylus = require('stylus') + , Canvas = require('canvas') + , nodes = stylus.nodes + , utils = stylus.utils + +/** + * Expose `ColorImage`. + */ + +exports = module.exports = ColorImage; + +/** + * Create a new `ColorImage` node with the given `color`. + * + * @param {Color} color node + * @return {ColorImage} + * @api public + */ + +exports.create = function(color){ + utils.assertColor(color); + return new ColorImage(color); +}; + +/** + * Return the data URI for `colorImage`. + * + * @param {ColorImage} colorImage + * @return {String} + * @api public + */ + +exports.dataURL = function(colorImage){ + utils.assertType(colorImage, 'colorimage'); + return new nodes.String(colorImage.toDataURL()); +}; + +/** + * Initialize a new `ColorImage` node with the given arguments. + * + * @param {Color} color node + * @api private + */ + +function ColorImage(color) { + this.color = color; + this.canvas = new Canvas(1, 1); + this.ctx = this.canvas.getContext('2d'); + this.ctx.fillStyle = color.toString(); + this.ctx.fillRect(0, 0, 1, 1); +}; + +/** + * Inherit from `nodes.Node.prototype`. + */ + +ColorImage.prototype.__proto__ = nodes.Node.prototype; + +/** + * Inspect the color. + * + * @return {String} + * @api private + */ + +ColorImage.prototype.toString = function(){ + return 'ColorImage(' + this.color.toString() + ')'; +}; + +/** + * Return data URI string. + * + * @return {String} + * @api private + */ + +ColorImage.prototype.toDataURL = function(){ + return this.canvas.toDataURL(); +}; From 25712c88855820c96e60aa6c0e1055e3b7419645 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:35:04 -0700 Subject: [PATCH 012/254] Added color-images to server tests. --- test/index.jade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/index.jade b/test/index.jade index 773d061f..e1ede3de 100644 --- a/test/index.jade +++ b/test/index.jade @@ -5,6 +5,7 @@ html link(rel='stylesheet', href='https://github.com/gradients.css') link(rel='stylesheet', href='https://github.com/buttons.css') link(rel='stylesheet', href='https://github.com/clearfix.css') + link(rel='stylesheet', href='https://github.com/color-images.css') script(src='https://github.com/jquery.min.js') script $(function(){ @@ -21,6 +22,13 @@ html tr td td + h2 Color images + #color-images + .rgba rgba() + .hexa-short #0003 + .hexa #ffffff80 + .rgb rgb() + .hex #fff h2 Buttons table#buttons tbody From ce94daff781067eee064a004167c671a5fa2d2ae Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:35:23 -0700 Subject: [PATCH 013/254] Added non-specific color-images test styles. --- test/test.styl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test.styl b/test/test.styl index 296d6fa7..07aaddc7 100644 --- a/test/test.styl +++ b/test/test.styl @@ -23,3 +23,22 @@ table tr:nth-child(4n+1) td padding-top: 15px + +#color-images + width: 400 + height: 300 + background: url(http://f.cl.ly/items/0W1R2J2L3g2C2L3p1l1e/Image%202011.08.26%2011:42:20%20AM.png) center + box-sizing: border-box + padding-top: 130px + text-align: center + + div + display: inline-block + width: 50px + height: 50px + margin: 0 15px + box-sizing: border-box + padding-top: 18px + border: 1px solid #fff + font: 9px Lucida Grande + color: #666 From 0a718b12f44be71c8a710ded25559e21c3a07d10 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:36:07 -0700 Subject: [PATCH 014/254] Added color-images stylus test file. --- test/color-images.styl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/color-images.styl diff --git a/test/color-images.styl b/test/color-images.styl new file mode 100644 index 00000000..4bb17fe6 --- /dev/null +++ b/test/color-images.styl @@ -0,0 +1,18 @@ + +@import 'https://github.com/nib/color-image' + +#color-images + .rgba + background: color-image(rgba(blue, 0.3)) + + .rgb + background: color-image(rgb(200, 150, 150)) + + .hex + background: color-image(#fff) + + .hexa + background: color-image(#ffffff80) + + .hexa-short + background: color-image(#0005) From fdc4f0eadf3ae7856379d87cc7c623416d7ba43c Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 26 Aug 2011 12:36:28 -0700 Subject: [PATCH 015/254] Added test case. --- test/cases/color-images.css | 15 +++++++++++++++ test/cases/color-images.styl | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/cases/color-images.css create mode 100644 test/cases/color-images.styl diff --git a/test/cases/color-images.css b/test/cases/color-images.css new file mode 100644 index 00000000..4690511b --- /dev/null +++ b/test/cases/color-images.css @@ -0,0 +1,15 @@ +#color-images .rgba { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAADUlEQVQImWNgYPjvAwACTwFMRXzF1AAAAABJRU5ErkJggg=="); +} +#color-images .rgb { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABmJLR0QA/wD/AP+gvaeTAAAADElEQVQImWM4MW0aAAQeAfUNjvNdAAAAAElFTkSuQmCC"); +} +#color-images .hex { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABmJLR0QA/wD/AP+gvaeTAAAADElEQVQImWP4//8/AAX+Av5Y8msOAAAAAElFTkSuQmCC"); +} +#color-images .hexa { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAADUlEQVQImWP4//9/PQAJewN9ztoxKwAAAABJRU5ErkJggg=="); +} +#color-images .hexa-short { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAADUlEQVQImWNgYGAIAQAAWQBV/QTdygAAAABJRU5ErkJggg=="); +} \ No newline at end of file diff --git a/test/cases/color-images.styl b/test/cases/color-images.styl new file mode 100644 index 00000000..4bb17fe6 --- /dev/null +++ b/test/cases/color-images.styl @@ -0,0 +1,18 @@ + +@import 'https://github.com/nib/color-image' + +#color-images + .rgba + background: color-image(rgba(blue, 0.3)) + + .rgb + background: color-image(rgb(200, 150, 150)) + + .hex + background: color-image(#fff) + + .hexa + background: color-image(#ffffff80) + + .hexa-short + background: color-image(#0005) From 3dfa3b1c4c1949adaf0ba35f76ccc5346a655429 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 26 Aug 2011 13:32:43 -0700 Subject: [PATCH 016/254] Release 0.2.0 --- History.md | 5 +++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index b0c3a3d9..adefb592 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.2.0 / 2011-08-26 +================== + + * Added `color-image` stylus function [guillermo] + 0.1.0 / 2011-08-04 ================== diff --git a/lib/nib.js b/lib/nib.js index 62528881..8a2e264d 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.0.9'; +exports.version = '0.2.0'; /** * Stylus path. diff --git a/package.json b/package.json index f0ce758c..b20cfa7e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.1.0", + "version": "0.2.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 6cb97a9a2e5c632102b354f816c5988784f318c4 Mon Sep 17 00:00:00 2001 From: Anton Podviaznikov Date: Fri, 2 Sep 2011 15:28:41 +0200 Subject: [PATCH 017/254] added hyphens vendor support. --- lib/nib/vendor.styl | 8 ++++++++ test/cases/vendor.css | 6 ++++++ test/cases/vendor.styl | 5 ++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 27c7d10a..454f6308 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -284,6 +284,14 @@ animation-fill-mode() border-image() vendor('border-image', arguments) +/* + * Vendor "hyphens" support. + */ + +hyphens() + vendor('hyphens', arguments) + + /* * Helper for border-radius(). */ diff --git a/test/cases/vendor.css b/test/cases/vendor.css index d3af6db7..21b3da55 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -152,4 +152,10 @@ section { -webkit-border-image: url("https://github.com/image.png") 20% stretch stretch; -moz-border-image: url("https://github.com/image.png") 20% stretch stretch; border-image: url("https://github.com/image.png") 20% stretch stretch; +} +p { + -o-hyphens: auto; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; } \ No newline at end of file diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 6d4cecb3..39514f6c 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -75,4 +75,7 @@ button transform: rotateY(45deg) section - border-image: url("https://github.com/image.png") 20% stretch stretch; \ No newline at end of file + border-image: url("https://github.com/image.png") 20% stretch stretch; + +p + hyphens: auto \ No newline at end of file From 29f6b2a70320d6fcf2b202b1eb91d37483ca4a2f Mon Sep 17 00:00:00 2001 From: "Grigory V." Date: Fri, 9 Sep 2011 21:28:48 +0400 Subject: [PATCH 018/254] Do you really think it's cool?! http://geekfeminism.wikia.com/wiki/Perl_is_my_bitch --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 29e4644d..26db0f99 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ # Nib - Stylus mixins, utilities, components, and gradient image generation. CSS is your bitch! + Stylus mixins, utilities, components, and gradient image generation. __NOTE__: better docs coming soon From 423b3c08999af01cd53a59ef9552bf165913e91b Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 21 Sep 2011 19:30:24 -0400 Subject: [PATCH 019/254] added index.styl in oldest directory to ease including nib in projects --- index.styl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 index.styl diff --git a/index.styl b/index.styl new file mode 100644 index 00000000..9d1caca9 --- /dev/null +++ b/index.styl @@ -0,0 +1,11 @@ + +@import 'https://github.com/lib/nib/vendor' +@import 'https://github.com/lib/nib/text' +@import 'https://github.com/lib/nib/reset' +@import 'https://github.com/lib/nib/positions' +@import 'https://github.com/lib/nib/clearfix' +@import 'https://github.com/lib/nib/iconic' +@import 'https://github.com/lib/nib/gradients' +@import 'https://github.com/lib/nib/buttons' +@import 'https://github.com/lib/nib/box' +@import 'https://github.com/lib/nib/color-image' From 511845ed45a52abc1c96cac0db7249432471e668 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 21 Sep 2011 19:51:47 -0400 Subject: [PATCH 020/254] added overflow helper and updated index.styl The helper makes using ellipsis text-overflow much more intuitive, I prefer it to using ellipsis() as I usually think of it as a type of overflow. I also couldnt find a working example of multi-line ellipsis overflow, so for now no-wrap is enabled always. --- index.styl | 1 + lib/nib/index.styl | 1 + lib/nib/overflow.styl | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 lib/nib/overflow.styl diff --git a/index.styl b/index.styl index 9d1caca9..ec9195f8 100644 --- a/index.styl +++ b/index.styl @@ -4,6 +4,7 @@ @import 'https://github.com/lib/nib/reset' @import 'https://github.com/lib/nib/positions' @import 'https://github.com/lib/nib/clearfix' +@import 'https://github.com/lib/nib/overflow' @import 'https://github.com/lib/nib/iconic' @import 'https://github.com/lib/nib/gradients' @import 'https://github.com/lib/nib/buttons' diff --git a/lib/nib/index.styl b/lib/nib/index.styl index e83d6163..85710d45 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -4,6 +4,7 @@ @import 'https://github.com/reset' @import 'https://github.com/positions' @import 'https://github.com/clearfix' +@import 'https://github.com/overflow' @import 'https://github.com/iconic' @import 'https://github.com/gradients' @import 'https://github.com/buttons' diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl new file mode 100644 index 00000000..ebd73467 --- /dev/null +++ b/lib/nib/overflow.styl @@ -0,0 +1,22 @@ +/* + * Overflow utility. + * + * Synopsis: + * + * overflow: + * + * Examples: + * + * overflow: auto + * overflow: hidden + * overflow: ellipsis + * + */ + +overflow(value) + if value == 'ellipsis' + overflow: hidden + white-space: nowrap + text-overflow: ellipsis + else + overflow: value From 96dd1f071fc373a360e7983a3240c9fd346b4e84 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 21 Sep 2011 19:56:30 -0400 Subject: [PATCH 021/254] added support for o and ms prefixes to text-overflow helper --- lib/nib/overflow.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index ebd73467..b9de11ea 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -17,6 +17,6 @@ overflow(value) if value == 'ellipsis' overflow: hidden white-space: nowrap - text-overflow: ellipsis + vendor('text-overflow', ellipsis, only: o ms official) else overflow: value From a04a214c9f83a70fdb1696350c2b1a4d7cf805d4 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 21 Sep 2011 20:02:05 -0400 Subject: [PATCH 022/254] simplified the import in outside index.styl --- index.styl | 12 +----------- lib/nib/overflow.styl | 12 ++++++------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/index.styl b/index.styl index ec9195f8..1d5c80ae 100644 --- a/index.styl +++ b/index.styl @@ -1,12 +1,2 @@ -@import 'https://github.com/lib/nib/vendor' -@import 'https://github.com/lib/nib/text' -@import 'https://github.com/lib/nib/reset' -@import 'https://github.com/lib/nib/positions' -@import 'https://github.com/lib/nib/clearfix' -@import 'https://github.com/lib/nib/overflow' -@import 'https://github.com/lib/nib/iconic' -@import 'https://github.com/lib/nib/gradients' -@import 'https://github.com/lib/nib/buttons' -@import 'https://github.com/lib/nib/box' -@import 'https://github.com/lib/nib/color-image' +@import 'https://github.com/lib/nib/' diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index b9de11ea..b6000168 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -14,9 +14,9 @@ */ overflow(value) - if value == 'ellipsis' - overflow: hidden - white-space: nowrap - vendor('text-overflow', ellipsis, only: o ms official) - else - overflow: value + if value == 'ellipsis' + overflow: hidden + white-space: nowrap + vendor('text-overflow', ellipsis, only: o ms official) + else + overflow: value From 29e8fdd2a258213cbe1fce1cdca74ed9832b14be Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 21 Sep 2011 20:04:19 -0400 Subject: [PATCH 023/254] remove unnecessary value var in overflow --- lib/nib/overflow.styl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index b6000168..f4da1379 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -1,5 +1,5 @@ /* - * Overflow utility. + * Overflow utility. Maps to regular overflow, and adds an ellipsis value. * * Synopsis: * @@ -13,10 +13,10 @@ * */ -overflow(value) - if value == 'ellipsis' +overflow() + if arguments[0] == 'ellipsis' overflow: hidden white-space: nowrap vendor('text-overflow', ellipsis, only: o ms official) else - overflow: value + overflow: arguments[0] From f9505ed5a4354689aa4fb90f411476ea37d9e1de Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 21 Sep 2011 20:10:30 -0400 Subject: [PATCH 024/254] unquote ellipsis check in overflow --- lib/nib/overflow.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index f4da1379..9e75298b 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -14,7 +14,7 @@ */ overflow() - if arguments[0] == 'ellipsis' + if arguments[0] == ellipsis overflow: hidden white-space: nowrap vendor('text-overflow', ellipsis, only: o ms official) From ea987793d8e4b67a3d66cf22023f00542bbe6c9f Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Sat, 1 Oct 2011 16:17:54 -0700 Subject: [PATCH 025/254] refactored "overflow: ellipsis" to use ellipsis() --- lib/nib/overflow.styl | 7 ++++--- test/cases/text.ellipsis.css | 5 +++++ test/cases/text.ellipsis.styl | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index 9e75298b..55726a00 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -1,3 +1,6 @@ + +@import 'https://github.com/text/ellipsis' + /* * Overflow utility. Maps to regular overflow, and adds an ellipsis value. * @@ -15,8 +18,6 @@ overflow() if arguments[0] == ellipsis - overflow: hidden - white-space: nowrap - vendor('text-overflow', ellipsis, only: o ms official) + ellipsis() else overflow: arguments[0] diff --git a/test/cases/text.ellipsis.css b/test/cases/text.ellipsis.css index d99ffabb..cd96b7c4 100644 --- a/test/cases/text.ellipsis.css +++ b/test/cases/text.ellipsis.css @@ -6,4 +6,9 @@ button { button { overflow: hidden; text-overflow: ellipsis; +} +button { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } \ No newline at end of file diff --git a/test/cases/text.ellipsis.styl b/test/cases/text.ellipsis.styl index ba473237..4c1767c5 100644 --- a/test/cases/text.ellipsis.styl +++ b/test/cases/text.ellipsis.styl @@ -1,8 +1,12 @@ @import 'https://github.com/nib/text/ellipsis' +@import 'https://github.com/nib/overflow' button ellipsis() button - ellipsis(false) \ No newline at end of file + ellipsis(false) + +button + overflow: ellipsis \ No newline at end of file From a8adf2da404878c86bf71590e2c153f353db772b Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Sat, 1 Oct 2011 16:47:08 -0700 Subject: [PATCH 026/254] docs --- Readme.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 26db0f99..dbfd3bf9 100644 --- a/Readme.md +++ b/Readme.md @@ -1,8 +1,6 @@ # Nib - Stylus mixins, utilities, components, and gradient image generation. - - __NOTE__: better docs coming soon + Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://visionmedia.github.com/nib/). ## Installation From 0300c8484b4337dfc4edd2ee533d2b2edd722a71 Mon Sep 17 00:00:00 2001 From: Anton Podviaznikov Date: Mon, 3 Oct 2011 11:30:57 +0200 Subject: [PATCH 027/254] added vendor appearance property --- lib/nib/vendor.styl | 12 ++++++++++-- test/cases/vendor.css | 7 ++++++- test/cases/vendor.styl | 5 ++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 454f6308..35aced60 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -292,6 +292,13 @@ hyphens() vendor('hyphens', arguments) +/* + * Vendor "appearance" support. + */ + +appearance() + vendor('appearance', arguments) + /* * Helper for border-radius(). */ @@ -317,7 +324,7 @@ hyphens() /* * border-radius supporting vendor prefixes and * augmented behavior. - * + * * Examples: * * border-radius: 2px 5px @@ -342,4 +349,5 @@ border-radius() if augmented -apply-border-radius(pos) pos = () - vendor('border-radius', pos) unless augmented \ No newline at end of file + vendor('border-radius', pos) unless augmented + diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 21b3da55..80cab16c 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -68,6 +68,11 @@ button { -moz-animation: myAnimation 1s ease; animation: myAnimation 1s ease; } +button { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} section { -webkit-column-count: 2; -moz-column-count: 2; @@ -158,4 +163,4 @@ p { -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; -} \ No newline at end of file +} diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 39514f6c..51c4d7ba 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -40,6 +40,9 @@ button button animation: myAnimation 1s ease; +button + appearance: none; + section column-count: 2; column-rule: 1px solid #bbb; @@ -78,4 +81,4 @@ section border-image: url("https://github.com/image.png") 20% stretch stretch; p - hyphens: auto \ No newline at end of file + hyphens: auto From d1cd234220ca5c2d512b5b9d47c84b36af6b5f86 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 17 Nov 2011 14:52:15 -0800 Subject: [PATCH 028/254] Release 0.3.0 --- History.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index adefb592..25da4467 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,10 @@ +0.3.0 / 2011-11-17 +================== + + * Added support for o and ms prefixes to text-overflow helper [Ian Storm] + * Added "overflow: ellipsis" support [Ian Storm] + 0.2.0 / 2011-08-26 ================== diff --git a/package.json b/package.json index b20cfa7e..d2f61064 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.2.0", + "version": "0.3.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 9942e9037c6974883ea3d294acce2ccf8b341704 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Mon, 28 Nov 2011 10:25:32 -0800 Subject: [PATCH 029/254] update dev dep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d2f61064..362056de 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "devDependencies": { "connect": "1.4.1" , "jade": "0.11.0" - , "stylus": "0.15.x" + , "stylus": "0.19.x" , "canvas": ">= 0.0.1" }, "author": "TJ Holowaychuk ", From f2bffed1b185f5922fe5c4c3c59ad61da278ff0c Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 30 Nov 2011 09:30:17 -0800 Subject: [PATCH 030/254] update replace() --- lib/nib/gradients.styl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index d0ab996c..db3bf207 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -8,11 +8,13 @@ replace(expr, str, val) expr = clone(expr) for e, i in expr - if str == e - expr[i] = val + if length(e) > 1 + expr[i] = replace(e, str, val) + else + if str == e + expr[i] = val expr - /* * Normalize gradient points. */ From 981dc75493180529decea1aee08f1db1d94a8d75 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 30 Nov 2011 09:30:44 -0800 Subject: [PATCH 031/254] removed color-images tests for now for some reason the base64 changed --- test/cases/color-images.css | 15 --------------- test/cases/color-images.styl | 18 ------------------ 2 files changed, 33 deletions(-) delete mode 100644 test/cases/color-images.css delete mode 100644 test/cases/color-images.styl diff --git a/test/cases/color-images.css b/test/cases/color-images.css deleted file mode 100644 index 4690511b..00000000 --- a/test/cases/color-images.css +++ /dev/null @@ -1,15 +0,0 @@ -#color-images .rgba { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAADUlEQVQImWNgYPjvAwACTwFMRXzF1AAAAABJRU5ErkJggg=="); -} -#color-images .rgb { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABmJLR0QA/wD/AP+gvaeTAAAADElEQVQImWM4MW0aAAQeAfUNjvNdAAAAAElFTkSuQmCC"); -} -#color-images .hex { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABmJLR0QA/wD/AP+gvaeTAAAADElEQVQImWP4//8/AAX+Av5Y8msOAAAAAElFTkSuQmCC"); -} -#color-images .hexa { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAADUlEQVQImWP4//9/PQAJewN9ztoxKwAAAABJRU5ErkJggg=="); -} -#color-images .hexa-short { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAADUlEQVQImWNgYGAIAQAAWQBV/QTdygAAAABJRU5ErkJggg=="); -} \ No newline at end of file diff --git a/test/cases/color-images.styl b/test/cases/color-images.styl deleted file mode 100644 index 4bb17fe6..00000000 --- a/test/cases/color-images.styl +++ /dev/null @@ -1,18 +0,0 @@ - -@import 'https://github.com/nib/color-image' - -#color-images - .rgba - background: color-image(rgba(blue, 0.3)) - - .rgb - background: color-image(rgb(200, 150, 150)) - - .hex - background: color-image(#fff) - - .hexa - background: color-image(#ffffff80) - - .hexa-short - background: color-image(#0005) From 9f11dd0252add6ceb1b0bfc9ce1007a3d6865e20 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 30 Nov 2011 09:32:45 -0800 Subject: [PATCH 032/254] fixing tests --- test/cases/vendor.border-radius.styl | 2 +- test/cases/vendor.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cases/vendor.border-radius.styl b/test/cases/vendor.border-radius.styl index e7fc314a..c7a8f8d8 100644 --- a/test/cases/vendor.border-radius.styl +++ b/test/cases/vendor.border-radius.styl @@ -25,4 +25,4 @@ button prepend(vendor-prefixes, ms, o) button - border-radius: 5px + border-radius: 5px \ No newline at end of file diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 80cab16c..a56c93b3 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -163,4 +163,4 @@ p { -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; -} +} \ No newline at end of file From c7e9ec8fb52329d0543d9cc847a508a6949b67be Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Wed, 30 Nov 2011 10:16:45 -0800 Subject: [PATCH 033/254] Release 0.3.1 --- History.md | 7 +++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 25da4467..a3f7d939 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,11 @@ +0.3.1 / 2011-11-30 +================== + + * Added vendor `appearance` property + * Updated `replace()` + * Fixed tests + 0.3.0 / 2011-11-17 ================== diff --git a/lib/nib.js b/lib/nib.js index 8a2e264d..31de13d2 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.2.0'; +exports.version = '0.3.1'; /** * Stylus path. diff --git a/package.json b/package.json index 362056de..bc58105b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.3.0", + "version": "0.3.1", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From cefffe4e1cb86c63fb4261094c3b6a64115d5b81 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 29 Dec 2011 12:42:44 -0700 Subject: [PATCH 034/254] added test to confirm linear-gradient() with multiple backgrounds. Closes #14 --- test/cases/linear-gradient.css | 8 ++++++++ test/cases/linear-gradient.styl | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 73eb0bb7..9e01b135 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -29,4 +29,12 @@ body { background: -ms-linear-gradient(top, #fff 0%, #000 100%); background: -o-linear-gradient(top, #fff 0%, #000 100%); background: linear-gradient(top, #fff 0%, #000 100%); +} +body { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)), #fff; + background: -webkit-linear-gradient(top, #fff 0%, #000 100%), #fff; + background: -moz-linear-gradient(top, #fff 0%, #000 100%), #fff; + background: -ms-linear-gradient(top, #fff 0%, #000 100%), #fff; + background: -o-linear-gradient(top, #fff 0%, #000 100%), #fff; + background: linear-gradient(top, #fff 0%, #000 100%), #fff; } \ No newline at end of file diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 21d636a3..7d9fcc35 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -16,4 +16,7 @@ body vendor-prefixes = webkit moz ms o official body - background: linear-gradient(top, white, black) \ No newline at end of file + background: linear-gradient(top, white, black) + +body + background: linear-gradient(top, white, black), white \ No newline at end of file From 554ffc2c9060564fd7acebac23989b2a9b09fa19 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Fri, 6 Jan 2012 18:02:25 -0800 Subject: [PATCH 035/254] Remove from the global-reset() helper. should arguably not be reset, because currently something like blah will reset the font family, which is obviously undesirable... --- lib/nib/reset.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/reset.styl b/lib/nib/reset.styl index f6d7229c..85c4e0ac 100644 --- a/lib/nib/reset.styl +++ b/lib/nib/reset.styl @@ -4,7 +4,7 @@ global-reset() html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, - del, dfn, em, font, img, ins, kbd, q, s, samp, + del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, From efd8afd00e3486708dd603d3bc65f598856281b3 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Mon, 9 Jan 2012 11:23:39 -0800 Subject: [PATCH 036/254] Release 0.3.2 --- History.md | 5 +++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index a3f7d939..0af08485 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.3.2 / 2012-01-09 +================== + + * Remove `` from the `global-reset()` helper [TooTallNate] + 0.3.1 / 2011-11-30 ================== diff --git a/lib/nib.js b/lib/nib.js index 31de13d2..182e7f27 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.3.1'; +exports.version = '0.3.2'; /** * Stylus path. diff --git a/package.json b/package.json index bc58105b..b9a928d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.3.1", + "version": "0.3.2", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 45915552f63cfcd246a225e625b2df01296885c3 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:42:38 -0800 Subject: [PATCH 037/254] Removed buttons I really think these belong in a different lib, nib should be more compass-like --- lib/nib/buttons.styl | 186 ------------------------------------------- test/buttons.styl | 47 ----------- test/index.jade | 26 ------ 3 files changed, 259 deletions(-) delete mode 100644 lib/nib/buttons.styl delete mode 100644 test/buttons.styl diff --git a/lib/nib/buttons.styl b/lib/nib/buttons.styl deleted file mode 100644 index b6d9a682..00000000 --- a/lib/nib/buttons.styl +++ /dev/null @@ -1,186 +0,0 @@ - -@import 'https://github.com/vendor' -@import 'https://github.com/gradients' - -// reset button related properties so that -// a, button, and input's are supported. - --reset() - margin: 0 - user-select: none - display: inline-block - text-decoration: none - -// minimalistic flat button with white inset. - -minimal-button(bg = #e3e3e3, text = #333, text-shadow = #fff) - -reset() - background: bg - border: 1px solid darken(bg, 15%) - border-radius: 3px - box-shadow: inset 0 0 1px 1px rgba(white, 0.8) - font-family: 'helvetica neue', helvetica, arial, sans-serif - font-size: 12px - font-weight: bold - line-height: 1 - padding: 8px 20px 9px 20px - text-align: center - text-shadow: 0 1px 0 text-shadow - color: text - - &:hover - &.hover - background: bg - 5% - box-shadow: inset 0 0 1px 1px rgba(white, 0.5) - cursor: pointer - color: text - - &:active - &.active - background: bg - 10% - box-shadow: inset 0 0 1px 1px rgba(white, 0.2) - color: text - 50% - - &:focus - &.focus - outline: none - box-shadow: 0 0 5px 1px rgba(bg, 1) - -// smooth flat button, defaulting to green. - -smooth-button(bg = #7fbf4d, height = 28px) - -reset() - dark = bg - 10% - background: bg - background: linear-gradient(height top, bg, dark) - border: 1px solid dark - 5% - border-bottom: 1px solid dark - border-radius: 3px - box-shadow: inset 0 1px 0 0 lighten(bg, 10%) - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif - font-size: 11px - font-weight: bold - line-height: 1 - padding: 7px 15px 8px 15px - text-align: center - text-shadow: 0 -1px 0 darken(bg, 15%) - color: #fff - - &:hover - &.hover - dark -= 5% - background: dark - background: linear-gradient(height top, bg, dark) - cursor: pointer - - &:active - &.active - dark -= 5% - border: 1px solid dark - border-bottom: 1px solid dark - background: linear-gradient(height bottom, bg, dark) - box-shadow: inset 0 0 8px 4px rgba(black, 0.15), 0 1px 0 0 #eee - -// small pill-shaped blue apple download inspired button. - -download-button(bg = #377ad0, height = 20px) - -reset() - dark = bg - 8% - background: light = hsl(bg) + hsl(0,30%,10%) - hsl(5,0,0) - background: linear-gradient(height top, light, bg) - border: 1px solid dark - border-radius: 16px - color #fff - font-family: "lucida grande", sans-serif - font-size: 11px - font-weight: normal - line-height: 1 - padding: 3px 10px 5px 10px - text-align: center - text-shadow: 0 -1px 1px bg - 10% - - &:hover - &.hover - background: darker - background: linear-gradient(height top, light, dark) - border: 1px solid dark - cursor: pointer - text-shadow: 0 -1px 1px bg - 12% - - &:active - &.active - background: dark - border: 1px solid dark - border-bottom: 1px solid bg - 20% - text-shadow: 0 -1px 1px bg - 15% - - &:focus - &.focus - outline: none - box-shadow: 0 1px 0 0 rgba(white,0.4), 0 0 4px 0 bg - -bold-button(bg = #333, glow = false, height = 25px) - -reset() - light = bg + 50% - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif - border-radius: 4px - font-size: 11px - background: bg - background: linear-gradient(height top, light, bg) - box-shadow: inset 0 1px 1px 0 light + 40% - border: 1px solid bg - line-height: 1 - padding: 7px 10px 8px 10px - text-align: center - text-shadow: 0 -1px 0 bg - 15% - color: #fff - - &:hover - &.hover - bg += 10% - background: bg - background: linear-gradient(height top, light, bg) - box-shadow: inset 0 1px 1px 0 light + 70% - - &:active - &.active - bg -= 20% - background: bg - background: linear-gradient(height top, bg, bg + 50%) - box-shadow: inset 0 -1px 1px 0 light + 20% - - if glow - &:hover - &.hover - box-shadow: inset 0 0 3px 1px rgba(glow, 0.6), inset 0 -1px 0 0 glow - &:active - &.active - box-shadow: inset 0 0 5px 1px rgba(black, 0.6) - &:focus - &.focus - outline: none - box-shadow: inset 0 0 3px 1px rgba(glow, 0.6), inset 0 -1px 0 0 glow, 0 0 3px 1px rgba(glow, 0.5) - -pill-button(bg = #ECECEC, height = 18px) - -reset() - light = bg + 20 - dark = bg - 10 - background: bg - font: 10px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif - background: linear-gradient(height top, light, dark) - border: 1px solid bg - padding: 3px 15px - border-radius: 10px - box-shadow: 0 1px 1px 0 #aaa, inset 0 1px 0 0 white - color: #888 - - &:hover - &.hover - background: linear-gradient(height top, light, dark + 10) - box-shadow: 0 1px 1px 0 #aaa, inset 0 -2px 0 0 rgba(white, 0.4) - - &:active - &.active - background: linear-gradient(height bottom, light, dark) - box-shadow: 0 1px 1px 0 #aaa, inset 0 1px 0 0 rgba(white, 0.8) - diff --git a/test/buttons.styl b/test/buttons.styl deleted file mode 100644 index 7c3e3784..00000000 --- a/test/buttons.styl +++ /dev/null @@ -1,47 +0,0 @@ - -@import 'https://github.com/nib/buttons' -@import 'https://github.com/nib/iconic' - -iconic-stroke('iconic') - -.minimal - minimal-button() - // TODO: make this a mixin - &:before - color rgba(0,0,0,0.5) - position relative - left -13px - top 2px - line-height 10px - content 'j' - font-family 'IconicStroke' - font-size 18px - font-weight normal - -.minimal-alternate - minimal-button(#7fbf4d, text: darken(#7fbf4d, 75%), text-shadow: rgba(white, 0.75)) - -.smooth - smooth-button() - -.smooth-alternate - smooth-button(#1AADAB) - -.download - download-button() - -.download-alternate - download-button(#00C0FA) - -.bold - bold-button() - -.bold-alternate - bold-button(glow: #00ABFA) - -.bold-alternate-2 - green = #00F700 - bold-button(darken(desaturate(green, 80%), 70%), glow: green) - -.pill - pill-button() diff --git a/test/index.jade b/test/index.jade index e1ede3de..8e5529c3 100644 --- a/test/index.jade +++ b/test/index.jade @@ -29,32 +29,6 @@ html .hexa #ffffff80 .rgb rgb() .hex #fff - h2 Buttons - table#buttons - tbody - - var buttons = [] - - buttons.push(['minimal', 'minimal-alternate']) - - buttons.push(['smooth', 'smooth-alternate']) - - buttons.push(['download', 'download-alternate']) - - buttons.push(['bold', 'bold-alternate', 'bold-alternate-2']) - - buttons.push(['pill']) - - each names in buttons - tr - td blur - - each name in names - td: a(href='#', class=name).button= name - tr - td hover - - each name in names - td: input(type='button', value=name, class=name).hover - tr - td active - - each name in names - td: button(class=name).active= name - tr - td focus - - each name in names - td: button(class=name).focus= name h2 Clearfix div#clearfix-left-only div From 5d3a6412f5aeb1f844badba9e9687350a583ccbc Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:43:02 -0800 Subject: [PATCH 038/254] padding --- test/runner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/runner.js b/test/runner.js index 149d9aba..5b4d0fd0 100644 --- a/test/runner.js +++ b/test/runner.js @@ -20,6 +20,8 @@ var count = 0; var failures = 0; +console.log(); + /** * Test the given `test`. * From 590bb46dfcd359021a8245611b8fbb331e5cad83 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:43:28 -0800 Subject: [PATCH 039/254] remove mention of buttons --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index dbfd3bf9..807a775f 100644 --- a/Readme.md +++ b/Readme.md @@ -50,7 +50,7 @@ server.use(stylus.middleware({ ```css @import 'https://github.com/nib/gradients' - @import 'https://github.com/nib/buttons' + @import 'https://github.com/nib/overflow' ``` to be continued.... From bde930d73f5402eac2938e63b45cf0a8956694c2 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:48:19 -0800 Subject: [PATCH 040/254] ocd --- lib/nib/box.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index 38493fe3..fb5f2fe9 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -1,5 +1,5 @@ + /* - * * Synopsis: * * box: orient direction From 7bcc24777e877772fff39206cb414989b147c5c8 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:48:45 -0800 Subject: [PATCH 041/254] ocd --- lib/nib/box.styl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index fb5f2fe9..123767aa 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -13,10 +13,10 @@ box(args) for prefix in vendor-prefixes - if official == prefix - {display}: box - else - {display}: unquote('-') + prefix + '-box' + if official == prefix + {display}: box + else + {display}: unquote('-') + prefix + '-box' box-orient: arguments[0] if arguments[1] box-direction: arguments[1] From 9b046731bb362d0f82df2d91e60853764fd95053 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:49:04 -0800 Subject: [PATCH 042/254] refactored --- lib/nib/box.styl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index 123767aa..e1cf8188 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -11,12 +11,12 @@ * */ -box(args) +box(args...) for prefix in vendor-prefixes if official == prefix {display}: box else {display}: unquote('-') + prefix + '-box' - box-orient: arguments[0] - if arguments[1] - box-direction: arguments[1] + box-orient: args[0] + if args[1] + box-direction: args[1] From 4b47f76cd51222a4caeaa30a71d92f03be1eb68d Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:49:36 -0800 Subject: [PATCH 043/254] refactored --- lib/nib/box.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index e1cf8188..8bf2da77 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -14,9 +14,9 @@ box(args...) for prefix in vendor-prefixes if official == prefix - {display}: box + display: box else - {display}: unquote('-') + prefix + '-box' + display: unquote('-') + prefix + '-box' box-orient: args[0] if args[1] box-direction: args[1] From 6e3efc5b50ff8f6ea0c17dfb12a7b84ecc6fcea2 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:50:00 -0800 Subject: [PATCH 044/254] utilize % to refactor box() --- lib/nib/box.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index 8bf2da77..a21c1c49 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -16,7 +16,7 @@ box(args...) if official == prefix display: box else - display: unquote('-') + prefix + '-box' + display: '-%s-box' % prefix box-orient: args[0] if args[1] box-direction: args[1] From ab28784c651388af683e50d03966a95948e4232d Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 10:55:59 -0800 Subject: [PATCH 045/254] Added vendor `display: box` support --- lib/nib/box.styl | 22 ++++++++++++++++------ test/cases/box.css | 5 +++++ test/cases/box.styl | 3 +++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index a21c1c49..0a9775b2 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -1,8 +1,22 @@ +/* + * Vendor "display: box" support. + */ + +display(type) + if box == type + for prefix in vendor-prefixes + if official == prefix + display: box + else + display: '-%s-box' % prefix + else + display: type + /* * Synopsis: * - * box: orient direction + * box: [direction] * * Examples: * @@ -12,11 +26,7 @@ */ box(args...) - for prefix in vendor-prefixes - if official == prefix - display: box - else - display: '-%s-box' % prefix + display: box box-orient: args[0] if args[1] box-direction: args[1] diff --git a/test/cases/box.css b/test/cases/box.css index 8e413eb3..f26f8887 100644 --- a/test/cases/box.css +++ b/test/cases/box.css @@ -1,3 +1,8 @@ +section { + display: -webkit-box; + display: -moz-box; + display: box; +} section { display: -webkit-box; display: -moz-box; diff --git a/test/cases/box.styl b/test/cases/box.styl index 20c0c81c..42f1d10a 100644 --- a/test/cases/box.styl +++ b/test/cases/box.styl @@ -2,6 +2,9 @@ @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/box' +section + display: box + section box: horizontal From fc43bfe3743bbda60540b76e7197b78af7dfd650 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 20 Jan 2012 11:10:44 -0800 Subject: [PATCH 046/254] Added vendor-value() not yet complete, it should be more like gradients and allow surrounding values --- lib/nib/box.styl | 6 +----- lib/nib/vendor.styl | 11 +++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/nib/box.styl b/lib/nib/box.styl index 0a9775b2..73608532 100644 --- a/lib/nib/box.styl +++ b/lib/nib/box.styl @@ -5,11 +5,7 @@ display(type) if box == type - for prefix in vendor-prefixes - if official == prefix - display: box - else - display: '-%s-box' % prefix + display: vendor-value(type) else display: type diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 35aced60..cbf516f7 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -21,6 +21,17 @@ vendor(prop, args, only = null, ignore = null) else {'-' + prefix + '-' + prop}: args +/* + * Vendorize the given value. + */ + +vendor-value(arg) + prop = current-property[0] + for prefix in vendor-prefixes + unless official == prefix + add-property(prop, '-%s-%s' % (prefix arg)) + arg + /* * Vendor "box-shadow" support. */ From f5e40bdfa985f99a5bf223e58808e8fc8ececa57 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 24 Jan 2012 12:22:52 -0500 Subject: [PATCH 047/254] added perspective and transform-style vendor support --- lib/nib/vendor.styl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index cbf516f7..4c6136a0 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -109,6 +109,13 @@ background-size() transform() vendor('transform', arguments) +/* + * Vendor "transform-style" support. + */ + +transform-style() + vendor('transform-style', arguments) + /* * Vendor "border-image" support. */ @@ -158,6 +165,13 @@ transition-delay() backface-visibility() vendor('backface-visibility', arguments) +/* + * Vendor "perspective" support. + */ + +perspective() + vendor('perspective', arguments) + /* * Opacity with conditional IE support. From e32a4daf3266af89c463e93c3f68177fb8c52db0 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 24 Jan 2012 15:45:12 -0500 Subject: [PATCH 048/254] Remove buttons reference from index.styl --- lib/nib/index.styl | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 85710d45..7ddf70ab 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/vendor' @import 'https://github.com/text' @import 'https://github.com/reset' @@ -7,6 +6,5 @@ @import 'https://github.com/overflow' @import 'https://github.com/iconic' @import 'https://github.com/gradients' -@import 'https://github.com/buttons' @import 'https://github.com/box' @import 'https://github.com/color-image' From 3d2231b83f34a8f61fa8f829936bb38307b511cf Mon Sep 17 00:00:00 2001 From: Alex Sexton Date: Wed, 1 Feb 2012 03:15:24 -0600 Subject: [PATCH 049/254] Updating vendor prefixes to match the defaults in stylus. --- lib/nib/config.styl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nib/config.styl b/lib/nib/config.styl index a254587c..5ff9079b 100644 --- a/lib/nib/config.styl +++ b/lib/nib/config.styl @@ -1,4 +1,3 @@ - /* * Support for ie defaulting to true. */ @@ -9,4 +8,4 @@ support-for-ie = true * Default vendor prefixes. */ -vendor-prefixes ?= webkit moz official +vendor-prefixes ?= webkit moz o ms official From 93a29b497e55a5a6e94536e1b13d2a184c1ae0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kr=C3=B6ner?= Date: Fri, 3 Feb 2012 12:58:12 +0100 Subject: [PATCH 050/254] Added transform-origin vendor support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kröner --- lib/nib/vendor.styl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 4c6136a0..fc4ed6a0 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -109,6 +109,12 @@ background-size() transform() vendor('transform', arguments) +/* + * Vendor "transform-origin" support. + */ +transform-origin() + vendor('transform-origin', arguments) + /* * Vendor "transform-style" support. */ From 607bc586ecda622fcf86a63dee40a7d8a5a36304 Mon Sep 17 00:00:00 2001 From: Panagiotis Kosmidis Date: Sat, 3 Mar 2012 19:08:46 +0200 Subject: [PATCH 051/254] box-ordinal-group support --- lib/nib/vendor.styl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index fc4ed6a0..783fdec9 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/config' /* @@ -223,6 +222,14 @@ box-flex() box-flex-group() vendor('box-flex-group', arguments) +/* + * Vendor "box-ordinal-group" support. + */ + +box-ordinal-group() + vendor('box-ordinal-group', arguments) + + /* * Vendor "box-align" support. */ From 34d7c36b44b39cd39e44f5ae9514b955a11f4af7 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 26 Mar 2012 08:52:27 -0700 Subject: [PATCH 052/254] tweak dev deps --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b9a928d3..d277fd80 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "url": "git://github.com/visionmedia/nib.git" }, "devDependencies": { - "connect": "1.4.1" - , "jade": "0.11.0" + "connect": "1.x" + , "jade": "0.22.0" , "stylus": "0.19.x" - , "canvas": ">= 0.0.1" + , "canvas": "*" }, "author": "TJ Holowaychuk ", "main": "lib/nib.js", From 5a608755b804ca2aae54f8451fec005f9ba38d94 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 3 Apr 2012 16:32:13 -0700 Subject: [PATCH 053/254] use mocha for test runner still brokenish --- Makefile | 5 +- package.json | 2 + test/cases/box.css | 9 ++ test/cases/linear-gradient.css | 8 ++ test/cases/vendor.border-radius.css | 4 + test/cases/vendor.border-radius.styl | 2 + test/cases/vendor.css | 9 +- test/cases/vendor.styl | 2 + test/runner.js | 161 ++++----------------------- 9 files changed, 54 insertions(+), 148 deletions(-) diff --git a/Makefile b/Makefile index d77780bb..6a2a5f9e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ test: - @node test/runner.js test/cases/*.styl + @./node_modules/.bin/mocha \ + --require should \ + --ignore-leaks \ + test/runner.js test-server: @node test/server.js diff --git a/package.json b/package.json index d277fd80..3bb837b4 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "connect": "1.x" , "jade": "0.22.0" , "stylus": "0.19.x" + , "mocha": "*" + , "should": "*" , "canvas": "*" }, "author": "TJ Holowaychuk ", diff --git a/test/cases/box.css b/test/cases/box.css index f26f8887..16d750da 100644 --- a/test/cases/box.css +++ b/test/cases/box.css @@ -1,24 +1,33 @@ section { display: -webkit-box; display: -moz-box; + display: -o-box; + display: -ms-box; display: box; } section { display: -webkit-box; display: -moz-box; + display: -o-box; + display: -ms-box; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; + -ms-box-orient: horizontal; box-orient: horizontal; } section { display: -webkit-box; display: -moz-box; + display: -o-box; + display: -ms-box; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; + -ms-box-orient: horizontal; box-orient: horizontal; -webkit-box-direction: reverse; -moz-box-direction: reverse; + -ms-box-direction: reverse; box-direction: reverse; } \ No newline at end of file diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 9e01b135..7ec8c820 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -2,24 +2,32 @@ body { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); background: -webkit-linear-gradient(top, #fff 0%, #000 100%); background: -moz-linear-gradient(top, #fff 0%, #000 100%); + background: -o-linear-gradient(top, #fff 0%, #000 100%); + background: -ms-linear-gradient(top, #fff 0%, #000 100%); background: linear-gradient(top, #fff 0%, #000 100%); } body { background: -webkit-gradient(linear, left top, right bottom, color-stop(0, #fff), color-stop(0.25, #f00), color-stop(0.5, #00f), color-stop(1, #000)); background: -webkit-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); background: -moz-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); + background: -o-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); + background: -ms-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); background: linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); } body { background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); background: -webkit-linear-gradient(bottom right, #fff 0%, #000 80%); background: -moz-linear-gradient(bottom right, #fff 0%, #000 80%); + background: -o-linear-gradient(bottom right, #fff 0%, #000 80%); + background: -ms-linear-gradient(bottom right, #fff 0%, #000 80%); background: linear-gradient(bottom right, #fff 0%, #000 80%); } body { background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); background: -webkit-linear-gradient(right bottom, #fff 0%, #000 80%); background: -moz-linear-gradient(right bottom, #fff 0%, #000 80%); + background: -o-linear-gradient(right bottom, #fff 0%, #000 80%); + background: -ms-linear-gradient(right bottom, #fff 0%, #000 80%); background: linear-gradient(right bottom, #fff 0%, #000 80%); } body { diff --git a/test/cases/vendor.border-radius.css b/test/cases/vendor.border-radius.css index 53ea376e..6c183481 100644 --- a/test/cases/vendor.border-radius.css +++ b/test/cases/vendor.border-radius.css @@ -6,11 +6,15 @@ button { button { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; + -o-border-top-left-radius: 10px; + -ms-border-top-left-radius: 10px; border-top-left-radius: 10px; } button { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; + -o-border-bottom-right-radius: 5px; + -ms-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } button { diff --git a/test/cases/vendor.border-radius.styl b/test/cases/vendor.border-radius.styl index c7a8f8d8..d4f0b256 100644 --- a/test/cases/vendor.border-radius.styl +++ b/test/cases/vendor.border-radius.styl @@ -10,6 +10,8 @@ button button border-radius: bottom right 5px +vendor-prefixes = webkit moz official + button border-radius: top left 5px bottom right 10px diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 615671a3..36f4269e 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -119,7 +119,7 @@ section { column-gap: 2em; } button { - -o-transition: all 0.1s ease-in-out 1s; + -webkit-transition: all 0.1s ease-in-out 1s; -webkit-transition: all 0.1s ease-in-out 1s; -moz-transition: all 0.1s ease-in-out 1s; transition: all 0.1s ease-in-out 1s; @@ -127,37 +127,30 @@ button { backface-visibility: hidden; } button { - -o-transition-property: all; -webkit-transition-property: all; -moz-transition-property: all; transition-property: all; - -o-transition-duration: 0.1s; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s; - -o-transition-timing-function: ease-in-out; -webkit-transition-timing-function: ease-in-out; -moz-transition-timing-function: ease-in-out; transition-timing-function: ease-in-out; - -o-transition-delay: 1s; -webkit-transition-delay: 1s; -moz-transition-delay: 1s; transition-delay: 1s; } button { - -o-transform: rotateY(45deg); -webkit-transform: rotateY(45deg); -moz-transform: rotateY(45deg); transform: rotateY(45deg); } section { - -o-border-image: url("https://github.com/image.png") 20% stretch stretch; -webkit-border-image: url("https://github.com/image.png") 20% stretch stretch; -moz-border-image: url("https://github.com/image.png") 20% stretch stretch; border-image: url("https://github.com/image.png") 20% stretch stretch; } p { - -o-hyphens: auto; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 51c4d7ba..ff8d0847 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -1,6 +1,8 @@ @import 'https://github.com/nib/vendor' +vendor-prefixes = webkit moz official + button box-shadow: 1px 1px 5px #eee diff --git a/test/runner.js b/test/runner.js index 5b4d0fd0..296acc81 100644 --- a/test/runner.js +++ b/test/runner.js @@ -4,153 +4,36 @@ */ var stylus = require('stylus') - , basename = require('path').basename , nib = require('../') , fs = require('fs'); -/** - * Test count. - */ - -var count = 0; - -/** - * Failure count. - */ - -var failures = 0; - -console.log(); - -/** - * Test the given `test`. - * - * @param {String} test - * @param {Function} fn - */ +// test cases -function test(test, fn) { - var base = __dirname + '/cases/' + test - , path = base + '.styl' - , csspath = base + '.css'; +var cases = fs.readdirSync('test/cases').filter(function(file){ + return ~file.indexOf('.styl'); +}).map(function(file){ + return file.replace('.styl', ''); +}); - fs.readFile(path, 'utf8', function(err, str){ - if (err) throw err; +describe('integration', function(){ + cases.forEach(function(test){ + var name = test.replace(/[-.]/g, ' '); + it(name, function(){ + var path = 'test/cases/' + test + '.styl'; + var styl = fs.readFileSync(path, 'utf8').replace(/\r/g, ''); + var css = fs.readFileSync('test/cases/' + test + '.css', 'utf8').replace(/\r/g, '').trim(); - var style = stylus(str) - .use(nib()) - .set('filename', path) - .include(__dirname + '/images') - .include(__dirname + '/cases/import.basic'); + var style = stylus(styl) + .use(nib()) + .set('filename', path) + .define('url', stylus.url()); - if (~test.indexOf('compress')) style.set('compress', true); + if (~test.indexOf('compress')) style.set('compress', true); - style.render(function(err, actual){ - if (err) throw err; - fs.readFile(csspath, 'utf8', function(err, expected){ + style.render(function(err, actual){ if (err) throw err; - expected += '\n'; - if (actual == expected) { - fn(); - } else { - fn(actual, expected); - } + actual.trim().should.equal(css); }); - }); - }); - return test; -}; - -/** - * Auto-load and run tests. - */ - -fs.readdir(__dirname + '/cases', function(err, files){ - if (err) throw err; - var tests = [] - , curr; - - files.forEach(function(file){ - if (/\.styl$/.test(file)) { - ++count; - tests.push(basename(file, '.styl')); - } + }) }); - - (function next() { - curr = tests.shift(); - if (!curr) return done(); - process.stderr.write(' \033[90m' + curr + '\033[0m'); - test(curr, function(actual, expected){ - if (actual) { - ++failures; - console.error('\r \033[31m✖\033[0m \033[90m' + curr + '\033[0m\n'); - diff(actual, expected); - console.error(); - } else { - console.error('\r \033[36m✔\033[0m \033[90m' + curr + '\033[0m'); - } - next(); - }); - })(); -}); - -/** - * Diff `actual` / `expected`. - * - * @param {String} actual - * @param {String} expected - */ - -function diff(actual, expected) { - var actual = actual.split('\n') - , expected = expected.split('\n') - , len = largestLineIn(expected); - - console.error(' expected'); - expected.forEach(function(line, i){ - var other = actual[i] - , pad = len - line.length - , pad = Array(++pad).join(' ') - , same = line == other; - if (same) { - console.error(' %d| %j%s | %j', i+1, line, pad, other); - } else { - console.error(' \033[31m%d| %j%s | %j\033[0m', i+1, line, pad, other); - } - }); -} - -/** - * Return the length of the largest line in `lines`. - * - * @param {Array} lines - * @return {Number} - */ - -function largestLineIn(lines) { - return lines.reduce(function(n, line){ - return Math.max(n, line.length); - }, 0); -} - -/** - * Done!!! - */ - -function done() { - console.log(); - console.log( - ' \033[90mcompleted\033[0m' - + ' \033[32m%d\033[0m' - + ' \033[90mtests\033[0m', count); - - if (failures) { - console.error(' \033[90mfailed\033[0m' - + ' \033[31m%d\033[0m' - + ' \033[90mtests\033[0m', failures); - process.exit(failures); - } - - console.log(); -} \ No newline at end of file +}) \ No newline at end of file From 36d452d7fe8ac4b24dcdf13b435944aca0d35070 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 3 Apr 2012 16:34:21 -0700 Subject: [PATCH 054/254] Release 0.4.0 --- History.md | 11 +++++++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 0af08485..5dae81c0 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,15 @@ +0.4.0 / 2012-04-03 +================== + + * Added `box-ordinal-group` support [panosru] + * Added `transform-origin` support [panosru] + * Added `perspective` support + * Added `transform-style` support + * Added `display: box` vendor support + * Removed buttons + * Changed: use mocha for test runner + 0.3.2 / 2012-01-09 ================== diff --git a/lib/nib.js b/lib/nib.js index 182e7f27..3f9f1a34 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.3.2'; +exports.version = '0.4.0'; /** * Stylus path. diff --git a/package.json b/package.json index 3bb837b4..4736d126 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.3.2", + "version": "0.4.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 11bd8bfee634be8589f91c09a4fbdf539fb39d2b Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 00:29:27 +0400 Subject: [PATCH 055/254] There would be -ms-user-select in IE10 --- lib/nib/vendor.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 985e0137..40c77442 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -43,7 +43,7 @@ box-shadow() */ user-select() - vendor('user-select', arguments, only: webkit moz official) + vendor('user-select', arguments, only: webkit moz ms official) /* * Vendor "column-count" support. @@ -86,7 +86,7 @@ column-rule-width() column-rule-style() vendor('column-rule-style', arguments, only: webkit moz official) - + /* * Vendor "background-clip" support. */ From 6e3b6850848d8b483b26716ea28e6aae79e40c2c Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 00:49:26 +0400 Subject: [PATCH 056/254] Correct prefixes for column-clip, moved it in place with other column- props --- lib/nib/vendor.styl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 40c77442..0f7a8518 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -88,18 +88,18 @@ column-rule-style() vendor('column-rule-style', arguments, only: webkit moz official) /* - * Vendor "background-clip" support. + * Vendor "column-width" support. */ -background-clip() - vendor('background-clip', arguments, only: webkit moz official) +column-width() + vendor('column-width', arguments, only: webkit moz official) /* - * Vendor "column-width" support. + * Vendor "background-clip" support. */ -column-width() - vendor('column-width', arguments) +background-clip() + vendor('background-clip', arguments, only: webkit moz official) /* * Vendor "background-size" support. From 7e217e6c08690da0438604e01e57650d09f79759 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 00:52:14 +0400 Subject: [PATCH 057/254] Added column-span and column-fill --- lib/nib/vendor.styl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 0f7a8518..22a0fb2a 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -94,6 +94,20 @@ column-rule-style() column-width() vendor('column-width', arguments, only: webkit moz official) +/* + * Vendor "column-span" support. + */ + +column-span() + vendor('column-span', arguments, only: webkit official) + +/* + * Vendor "column-fill" support. + */ + +column-fill() + vendor('column-fill', arguments, only: moz) + /* * Vendor "background-clip" support. */ From a38045f31d6879a4682a79d18a0dc8f25c731308 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 01:44:56 +0400 Subject: [PATCH 058/254] Fixed the background-clip prefixes: it have different syntax for old webkit and moz, also it have only webkit for text --- lib/nib/vendor.styl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 22a0fb2a..847e64e8 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -112,8 +112,15 @@ column-fill() * Vendor "background-clip" support. */ -background-clip() - vendor('background-clip', arguments, only: webkit moz official) +background-clip(box, args...) + if box in (border-box padding-box content-box) + box = border if box == border-box + box = padding if box == padding-box + box = content if box == content-box + vendor('background-clip', box args, only: moz webkit) + if box == text + vendor('background-clip', arguments, only: webkit) + background-clip: arguments /* * Vendor "background-size" support. From 8e75fbe6f030fffcab17971ee13cc8b3d314ba27 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 01:58:18 +0400 Subject: [PATCH 059/254] There would be transitions in IE10 --- lib/nib/vendor.styl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 847e64e8..83943c8c 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -161,35 +161,35 @@ border-image() */ transition() - vendor('transition', arguments, only: webkit moz o official) + vendor('transition', arguments) /* * Vendor "transition-property" support. */ transition-property() - vendor('transition-property', arguments, only: webkit moz o official) + vendor('transition-property', arguments) /* * Vendor "transition-duration" support. */ transition-duration() - vendor('transition-duration', arguments, only: webkit moz o official) + vendor('transition-duration', arguments) /* * Vendor "transition-timing-function" support. */ transition-timing-function() - vendor('transition-timing-function', arguments, only: webkit moz o official) + vendor('transition-timing-function', arguments) /* * Vendor "transition-delay" support. */ transition-delay() - vendor('transition-delay', arguments, only: webkit moz o official) + vendor('transition-delay', arguments) /* * Vendor "backface-visibility" support. From 172c962ec2c2d50767c422cedc9bac5720ff31a8 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:07:29 +0400 Subject: [PATCH 060/254] 3D transforms now in IE10 and in Fx, but still not in Opera --- lib/nib/vendor.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 83943c8c..66cf4be2 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -196,14 +196,14 @@ transition-delay() */ backface-visibility() - vendor('backface-visibility', arguments, only: webkit official) + vendor('backface-visibility', arguments, only: webkit moz ms official) /* * Vendor "perspective" support. */ perspective() - vendor('perspective', arguments) + vendor('perspective', arguments, only: webkit moz ms official) /* From bbf44c050d4425b07748716325caa8d5c666a3ce Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:18:59 +0400 Subject: [PATCH 061/254] Updated fexbox prefixes (flex-group is only in webkit, no ordinal-group in Opera) --- lib/nib/vendor.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 66cf4be2..824fbdc1 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -248,14 +248,14 @@ box-flex() */ box-flex-group() - vendor('box-flex-group', arguments) + vendor('box-flex-group', arguments, only: webkit official) /* * Vendor "box-ordinal-group" support. */ box-ordinal-group() - vendor('box-ordinal-group', arguments) + vendor('box-ordinal-group', arguments, only: webkit moz ms official) /* From 26bd0565508cb1cbcf9e6056bd4220cfb47a185b Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:20:12 +0400 Subject: [PATCH 062/254] There would be animations in IE10 and probably (there were an experimental build of it) in Opera 12) --- lib/nib/vendor.styl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 824fbdc1..ec16e02a 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -284,7 +284,7 @@ box-direction() */ animation() - vendor('animation', arguments, only: webkit moz official) + vendor('animation', arguments) /* @@ -292,56 +292,56 @@ animation() */ animation-name() - vendor('animation-name', arguments, only: webkit moz official) + vendor('animation-name', arguments) /* * Vendor "animation-duration" support. */ animation-duration() - vendor('animation-duration', arguments, only: webkit moz official) + vendor('animation-duration', arguments) /* * Vendor "animation-delay" support. */ animation-delay() - vendor('animation-delay', arguments, only: webkit moz official) + vendor('animation-delay', arguments) /* * Vendor "animation-direction" support. */ animation-direction() - vendor('animation-direction', arguments, only: webkit moz official) + vendor('animation-direction', arguments) /* * Vendor "animation-iteration-count" support. */ animation-iteration-count() - vendor('animation-iteration-count', arguments, only: webkit moz official) + vendor('animation-iteration-count', arguments) /* * Vendor "animation-timing-function" support. */ animation-timing-function() - vendor('animation-timing-function', arguments, only: webkit moz official) + vendor('animation-timing-function', arguments) /* * Vendor "animation-play-state" support. */ animation-play-state() - vendor('animation-play-state', arguments, only: webkit moz official) + vendor('animation-play-state', arguments) /* * Vendor "animation-fill-mode" support. */ animation-fill-mode() - vendor('animation-fill-mode', arguments, only: webkit moz official) + vendor('animation-fill-mode', arguments) /* * Vendor "border-image" support. From 4729c2786f11bd9430b10390d604fb14031f77f7 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:28:08 +0400 Subject: [PATCH 063/254] Still no hyphens in Opera --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index ec16e02a..7d9564b1 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -355,7 +355,7 @@ border-image() */ hyphens() - vendor('hyphens', arguments) + vendor('hyphens', arguments, only: webkit moz ms official) /* From 81082b68ecf64470474be2883eaad75214a99971 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:29:42 +0400 Subject: [PATCH 064/254] Appearance is only webkit/moz now --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 7d9564b1..294d1d1d 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -363,7 +363,7 @@ hyphens() */ appearance() - vendor('appearance', arguments) + vendor('appearance', arguments, only: webkit moz) /* * Helper for border-radius(). From b7a86876f1406c3e70bdaef8296a7f7b46120994 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:34:58 +0400 Subject: [PATCH 065/254] There were no importance for overflow --- lib/nib/overflow.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index 55726a00..277a400c 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -20,4 +20,4 @@ overflow() if arguments[0] == ellipsis ellipsis() else - overflow: arguments[0] + overflow: arguments From 829cfa66ae19195763fd6f0140a585573c7b63ae Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:43:06 +0400 Subject: [PATCH 066/254] There is a moz-box-flex-group actually --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 294d1d1d..f615f5e0 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -248,7 +248,7 @@ box-flex() */ box-flex-group() - vendor('box-flex-group', arguments, only: webkit official) + vendor('box-flex-group', arguments, only: webkit moz official) /* * Vendor "box-ordinal-group" support. From bc40972e1ab1daea77b996c9191a5d1d498951a6 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 02:46:56 +0400 Subject: [PATCH 067/254] Updated old tests --- test/cases/vendor.css | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 36f4269e..74c18676 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -71,7 +71,6 @@ button { button { -webkit-appearance: none; -moz-appearance: none; - appearance: none; } section { -webkit-column-count: 2; @@ -119,33 +118,40 @@ section { column-gap: 2em; } button { - -webkit-transition: all 0.1s ease-in-out 1s; + -o-transition: all 0.1s ease-in-out 1s; -webkit-transition: all 0.1s ease-in-out 1s; -moz-transition: all 0.1s ease-in-out 1s; transition: all 0.1s ease-in-out 1s; -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; backface-visibility: hidden; } button { + -o-transition-property: all; -webkit-transition-property: all; -moz-transition-property: all; transition-property: all; + -o-transition-duration: 0.1s; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s; + -o-transition-timing-function: ease-in-out; -webkit-transition-timing-function: ease-in-out; -moz-transition-timing-function: ease-in-out; transition-timing-function: ease-in-out; + -o-transition-delay: 1s; -webkit-transition-delay: 1s; -moz-transition-delay: 1s; transition-delay: 1s; } button { + -o-transform: rotateY(45deg); -webkit-transform: rotateY(45deg); -moz-transform: rotateY(45deg); transform: rotateY(45deg); } section { + -o-border-image: url("https://github.com/image.png") 20% stretch stretch; -webkit-border-image: url("https://github.com/image.png") 20% stretch stretch; -moz-border-image: url("https://github.com/image.png") 20% stretch stretch; border-image: url("https://github.com/image.png") 20% stretch stretch; @@ -154,4 +160,4 @@ p { -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; -} \ No newline at end of file +} From 9e7c3594c052d1fbe5e821af691a49112a15dc2a Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 14 Apr 2012 18:28:11 +0400 Subject: [PATCH 068/254] Preserving importance for opacity --- lib/nib/vendor.styl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index f615f5e0..12e9d185 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -210,10 +210,10 @@ perspective() * Opacity with conditional IE support. */ -opacity(n) - opacity: n +opacity(n, args...) + opacity: n args if support-for-ie - filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % round(n * 100) + filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % round(n * 100) args /* * Alias the "white-space" property. From 10c8ef8d7912b62c1354f311e5ff9b0e2f99d776 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sun, 15 Apr 2012 10:31:11 -0700 Subject: [PATCH 069/254] Release 0.4.1 --- History.md | 16 ++++++++++++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 5dae81c0..74f8e26f 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,20 @@ +0.4.1 / 2012-04-15 +================== + + * There is a moz-box-flex-group actually [kizu] + * There were no importance for overflow [kizu] + * Appearance is only webkit/moz now [kizu] + * Still no hyphens in Opera [kizu] + * There would be animations in IE10 and probably (there were an experimental build of it) in Opera 12) [kizu] + * Updated fexbox prefixes (flex-group is only in webkit, no ordinal-group in Opera) [kizu] + * 3D transforms now in IE10 and in Fx, but still not in Opera [kizu] + * There would be transitions in IE10 [kizu] + * Fixed the background-clip prefixes: it have different syntax for old webkit and moz, also it have only webkit for text [kizu] + * Added column-span and column-fill [kizu] + * Correct prefixes for column-clip, moved it in place with other column- props [kizu] + * There would be -ms-user-select in IE10 [kizu] + 0.4.0 / 2012-04-03 ================== diff --git a/lib/nib.js b/lib/nib.js index 3f9f1a34..dadf4043 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.4.0'; +exports.version = '0.4.1'; /** * Stylus path. diff --git a/package.json b/package.json index 4736d126..58371298 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.4.0", + "version": "0.4.1", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From d23e35e298ec8bbdc6f4ce3f635c4ed2cf81a354 Mon Sep 17 00:00:00 2001 From: Roman Komarov Date: Mon, 16 Apr 2012 17:21:37 +0400 Subject: [PATCH 070/254] Refactored background-clip, added background-origin. --- lib/nib/vendor.styl | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 12e9d185..cbb97106 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -108,19 +108,43 @@ column-span() column-fill() vendor('column-fill', arguments, only: moz) +/* + * Legacy syntax support for background-clip and background-origin + */ + +legacy-bg-values(property, args) + legacy_args = () + importance = unquote('') + for subargs in args + for arg in subargs + if arg in (border-box padding-box content-box) + arg = border if arg == border-box + arg = padding if arg == padding-box + arg = content if arg == content-box + if arg != '!important' + push(legacy_args,arg) + else + importance = !important + vendor(property, unquote(join(', ',legacy_args)) importance, only: moz webkit) + /* * Vendor "background-clip" support. */ -background-clip(box, args...) - if box in (border-box padding-box content-box) - box = border if box == border-box - box = padding if box == padding-box - box = content if box == content-box - vendor('background-clip', box args, only: moz webkit) - if box == text +background-clip() + if arguments[0] == text vendor('background-clip', arguments, only: webkit) - background-clip: arguments + else + legacy-bg-values('background-clip', arguments) + background-clip: arguments + +/* + * Vendor "background-origin" support. + */ + +background-origin() + legacy-bg-values('background-origin', arguments) + background-origin: arguments /* * Vendor "background-size" support. From b99eec085942ae050e275f9a1a981329a305394c Mon Sep 17 00:00:00 2001 From: Irving Kcam Date: Mon, 16 Apr 2012 20:15:22 -0500 Subject: [PATCH 071/254] Line 73 - 76: Corrects inline-block display not defined in IE6/7/8/9 & FF3 Line 77 - 78: Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4 According to Normalize.css(https://github.com/necolas/normalize.css) --- lib/nib/reset.styl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/nib/reset.styl b/lib/nib/reset.styl index 85c4e0ac..ede92773 100644 --- a/lib/nib/reset.styl +++ b/lib/nib/reset.styl @@ -70,3 +70,10 @@ reset-html5() section, summary reset-box-model() display: block + audio, canvas, video + display inline-block + *display inline + *zoom 1 + audio:not([controls]),[hidden] + display none + From 6e8773b45da84508c23bd507cf686cf7c4638672 Mon Sep 17 00:00:00 2001 From: Ben Gourley Date: Tue, 17 Apr 2012 18:30:33 +0100 Subject: [PATCH 072/254] Remove duplicate imports and defines (fixes #81) --- lib/nib/overflow.styl | 3 --- lib/nib/vendor.styl | 7 ------- 2 files changed, 10 deletions(-) diff --git a/lib/nib/overflow.styl b/lib/nib/overflow.styl index 277a400c..c89a8221 100644 --- a/lib/nib/overflow.styl +++ b/lib/nib/overflow.styl @@ -1,6 +1,3 @@ - -@import 'https://github.com/text/ellipsis' - /* * Overflow utility. Maps to regular overflow, and adds an ellipsis value. * diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index cbb97106..1a375ff4 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -367,13 +367,6 @@ animation-play-state() animation-fill-mode() vendor('animation-fill-mode', arguments) -/* - * Vendor "border-image" support. - */ - -border-image() - vendor('border-image', arguments, only: webkit moz o official) - /* * Vendor "hyphens" support. */ From 6b10dceab6bffc6b38324bcaa361063193ae53cf Mon Sep 17 00:00:00 2001 From: kizu Date: Wed, 18 Apr 2012 01:44:50 +0400 Subject: [PATCH 073/254] Added tab-size property --- lib/nib/vendor.styl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index cbb97106..c80205e9 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -381,7 +381,6 @@ border-image() hyphens() vendor('hyphens', arguments, only: webkit moz ms official) - /* * Vendor "appearance" support. */ @@ -389,6 +388,13 @@ hyphens() appearance() vendor('appearance', arguments, only: webkit moz) +/* + * Vendor "tab-size" support. + */ + +tab-size() + vendor('tab-size', arguments, only: moz o) + /* * Helper for border-radius(). */ From c8cca4e765a4d1f94a0e849ca6095cf074d0b62f Mon Sep 17 00:00:00 2001 From: kizu Date: Wed, 18 Apr 2012 01:57:25 +0400 Subject: [PATCH 074/254] Added perspective-origin property --- lib/nib/vendor.styl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index c80205e9..78960807 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -229,6 +229,13 @@ backface-visibility() perspective() vendor('perspective', arguments, only: webkit moz ms official) +/* + * Vendor "perspective-origin" support. + */ + +perspective-origin() + vendor('perspective-origin', arguments, only: webkit moz ms official) + /* * Opacity with conditional IE support. From d7e6c329d1994027ed44190929ce62f12b80116e Mon Sep 17 00:00:00 2001 From: Tyler Nieman Date: Fri, 20 Apr 2012 08:35:56 -0700 Subject: [PATCH 075/254] documentation fix on synopsis for relative() position utility (copy/paste error) --- lib/nib/positions.styl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nib/positions.styl b/lib/nib/positions.styl index d8b2cdfb..654d4440 100644 --- a/lib/nib/positions.styl +++ b/lib/nib/positions.styl @@ -1,4 +1,3 @@ - // helper -pos(type, args) @@ -50,7 +49,7 @@ absolute() * * Synopsis: * - * absolute: [n] [n] + * relative: [n] [n] * * Examples: * From 62b9347ee99623dcccfb691501aafeefaaedd9d7 Mon Sep 17 00:00:00 2001 From: Tom Stoecklein Date: Fri, 27 Apr 2012 09:11:39 -0400 Subject: [PATCH 076/254] Deprecated a couple EOL moz prefixes, removed -o-background-size -FF 3.6 at ~2.6% market share trending downward, so -moz- prefix can be removed for border-radius & background-size as no longer necessary. - Removed -o- prefix from background-size as Opera never supported it Should take care of it all. More info: * https://github.com/paulirish/css3please/commit/52eaa342330c089b278e669abaedb34cc5889bf1 * http://www.opera.com/docs/specs/presto28/css/o-vendor/ --- lib/nib/vendor.styl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 85c3e184..2626711b 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -36,7 +36,7 @@ vendor-value(arg) */ box-shadow() - vendor('box-shadow', arguments, only: webkit moz official) + vendor('box-shadow', arguments, only: webkit official) /* * Vendor "user-select" support. @@ -151,7 +151,7 @@ background-origin() */ background-size() - vendor('background-size', arguments, only: webkit moz o official) + vendor('background-size', arguments, only: webkit official) /* * Vendor "transform" support. @@ -445,4 +445,4 @@ border-radius() if augmented -apply-border-radius(pos) pos = () - vendor('border-radius', pos, only: webkit moz official) unless augmented + vendor('border-radius', pos, only: webkit official) unless augmented \ No newline at end of file From d07992036a0020894daae0f931b666e7bba12772 Mon Sep 17 00:00:00 2001 From: Dustan Kasten Date: Mon, 7 May 2012 13:04:52 -0300 Subject: [PATCH 077/254] Update opacity to clear issue with IE rendering value of 100 (to override previous semi-opaque state) and support IE5-8 in all the different varieties of life (http://www.quirksmode.org/css/opacity.html) --- lib/nib/vendor.styl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 2626711b..cc84a22c 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -244,7 +244,13 @@ perspective-origin() opacity(n, args...) opacity: n args if support-for-ie - filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % round(n * 100) args + ieValue = round(n * 100) + if ieValue==100 + -ms-filter: none + filter: none + else + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % ieValue args + filter: 'alpha(opacity=%s)' % ieValue args /* * Alias the "white-space" property. From 2b43ba13989a75c058bc9754f782756e0dbd78dd Mon Sep 17 00:00:00 2001 From: Dustan Kasten Date: Mon, 7 May 2012 13:57:04 -0300 Subject: [PATCH 078/254] Whitespace? Never heard of it ;) --- lib/nib/vendor.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index cc84a22c..f84e147b 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -244,8 +244,8 @@ perspective-origin() opacity(n, args...) opacity: n args if support-for-ie - ieValue = round(n * 100) - if ieValue==100 + val = round(n * 100) + if val == 100 -ms-filter: none filter: none else From a6c4717aa8f4a1af43534c7f00e749e299c127d4 Mon Sep 17 00:00:00 2001 From: Dustan Kasten Date: Mon, 7 May 2012 13:57:42 -0300 Subject: [PATCH 079/254] Editing in github means I forget things. --- lib/nib/vendor.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index f84e147b..e677d243 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -249,8 +249,8 @@ opacity(n, args...) -ms-filter: none filter: none else - -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % ieValue args - filter: 'alpha(opacity=%s)' % ieValue args + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % val args + filter: 'alpha(opacity=%s)' % val args /* * Alias the "white-space" property. From 8bb1e9e4de0b7b775ccf01ba30b8a9ce3fa0e48e Mon Sep 17 00:00:00 2001 From: Roman Komarov Date: Fri, 25 May 2012 01:47:03 +0400 Subject: [PATCH 080/254] Updated stylus dependency, fixes #89 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58371298..eaab8322 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "devDependencies": { "connect": "1.x" , "jade": "0.22.0" - , "stylus": "0.19.x" + , "stylus": "0.27.x" , "mocha": "*" , "should": "*" , "canvas": "*" From a189ce7903e1b626bd66adced5ae39733c753e13 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 28 May 2012 12:06:32 -0700 Subject: [PATCH 081/254] Release 0.5.0 --- History.md | 12 ++++++++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 74f8e26f..0bda726e 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,16 @@ +0.5.0 / 2012-05-28 +================== + + * Added perspective-origin property + * Added tab-size property + * Updated stylus dependency, fixes #89 + * Update opacity to clear issue with IE rendering value of 100 (to override previous semi-opaque state) and support IE5-8 in all the different varieties of life (http://www.quirksmode.org/css/opacity.html) + * Deprecated a couple EOL moz prefixes, removed -o-background-size + * Remove duplicate imports and defines (fixes #81) + * Refactored background-clip, added background-origin. + * Preserving importance for opacity + 0.4.1 / 2012-04-15 ================== diff --git a/lib/nib.js b/lib/nib.js index dadf4043..a4527a3a 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.4.1'; +exports.version = '0.5.0'; /** * Stylus path. diff --git a/package.json b/package.json index eaab8322..49f96766 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.4.1", + "version": "0.5.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From a9aed23b619bcf453c66541f6780f5c51181cc09 Mon Sep 17 00:00:00 2001 From: kizu Date: Tue, 29 May 2012 00:38:42 +0400 Subject: [PATCH 082/254] Updated tests according to the latest code changes --- test/cases/vendor.border-radius.css | 4 +--- test/cases/vendor.css | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/cases/vendor.border-radius.css b/test/cases/vendor.border-radius.css index 6c183481..a9d190c1 100644 --- a/test/cases/vendor.border-radius.css +++ b/test/cases/vendor.border-radius.css @@ -1,6 +1,5 @@ button { -webkit-border-radius: 1px 2px/3px 4px; - -moz-border-radius: 1px 2px/3px 4px; border-radius: 1px 2px/3px 4px; } button { @@ -57,6 +56,5 @@ button { } button { -webkit-border-radius: 5px; - -moz-border-radius: 5px; border-radius: 5px; -} \ No newline at end of file +} diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 74c18676..ffe17217 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -1,11 +1,11 @@ button { -webkit-box-shadow: 1px 1px 5px #eee; - -moz-box-shadow: 1px 1px 5px #eee; box-shadow: 1px 1px 5px #eee; } button { opacity: 0.5; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); + filter: alpha(opacity=50); } button { opacity: 0.75; From ac1a1cb87acc6bb38b6bf4573c55980abca7ba1e Mon Sep 17 00:00:00 2001 From: Tom Stoecklein Date: Wed, 13 Jun 2012 21:05:02 -0400 Subject: [PATCH 083/254] + hide() mixin for text-indent: 100% method - measurable performance gains over 99999em method - added as hide() mixin instead of changing hide-text() for backwards compatability; in almost every case it's a drop-in replacement but best not to screw with what people expect from their mixins --- lib/nib/text/hide-text.styl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/nib/text/hide-text.styl b/lib/nib/text/hide-text.styl index b3c8c77f..ed2c46e6 100644 --- a/lib/nib/text/hide-text.styl +++ b/lib/nib/text/hide-text.styl @@ -2,6 +2,11 @@ * Hide text. */ +hide() + text-indent: 100% + white-space: nowrap + overflow: hidden + hide-text() text-indent: -99999em overflow: hidden From b1ab1a20c2ed2dffd6de6c72dbe2f8de6d34f8d5 Mon Sep 17 00:00:00 2001 From: Tom Stoecklein Date: Wed, 13 Jun 2012 21:44:08 -0400 Subject: [PATCH 084/254] replace hide-text() w/ text-indent: 100% method --- lib/nib/text/hide-text.styl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/nib/text/hide-text.styl b/lib/nib/text/hide-text.styl index ed2c46e6..1571b79c 100644 --- a/lib/nib/text/hide-text.styl +++ b/lib/nib/text/hide-text.styl @@ -2,12 +2,7 @@ * Hide text. */ -hide() +hide-text() text-indent: 100% white-space: nowrap - overflow: hidden - -hide-text() - text-indent: -99999em - overflow: hidden - text-align: left \ No newline at end of file + overflow: hidden \ No newline at end of file From f77233614e8628c2972e6977a3c7010ae0f2a25e Mon Sep 17 00:00:00 2001 From: Ian Young Date: Tue, 19 Jun 2012 12:17:21 -0700 Subject: [PATCH 085/254] Text replacement mixin --- lib/nib/text/replace-text.styl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/nib/text/replace-text.styl diff --git a/lib/nib/text/replace-text.styl b/lib/nib/text/replace-text.styl new file mode 100644 index 00000000..3aabff1b --- /dev/null +++ b/lib/nib/text/replace-text.styl @@ -0,0 +1,9 @@ +/* + * Replace text with an image. + */ + +replace-text(image, x=50%, y=50%) + hide-text() + background-image image + background-repeat no-repeat + background-position x y From 27e321bda52d491f1de3de43f485b8fafcb1124b Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Tue, 26 Jun 2012 19:40:32 +0300 Subject: [PATCH 086/254] Update master --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index e677d243..0c7b4ffb 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -151,7 +151,7 @@ background-origin() */ background-size() - vendor('background-size', arguments, only: webkit official) + vendor('background-size', arguments, only: webkit moz official) /* * Vendor "transform" support. From afbbe544353ad94a703b166e3fc850e68aedd5fc Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 28 Jun 2012 14:26:48 -0700 Subject: [PATCH 087/254] add "border: color" -> "border: 1px solid color" support --- lib/nib/border.styl | 11 +++++++++++ lib/nib/index.styl | 1 + test/cases/border.css | 4 ++++ test/cases/border.styl | 6 ++++++ 4 files changed, 22 insertions(+) create mode 100644 lib/nib/border.styl create mode 100644 test/cases/border.css create mode 100644 test/cases/border.styl diff --git a/lib/nib/border.styl b/lib/nib/border.styl new file mode 100644 index 00000000..5f39f7d3 --- /dev/null +++ b/lib/nib/border.styl @@ -0,0 +1,11 @@ + +/* + * border: + * border: ... + */ + +border() + if 1 == length(arguments) + border: 1px solid arguments + else + border: arguments diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 7ddf70ab..61a1ed6b 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -8,3 +8,4 @@ @import 'https://github.com/gradients' @import 'https://github.com/box' @import 'https://github.com/color-image' +@import 'https://github.com/border' diff --git a/test/cases/border.css b/test/cases/border.css new file mode 100644 index 00000000..aae2e4fb --- /dev/null +++ b/test/cases/border.css @@ -0,0 +1,4 @@ +.foo { + border: 1px solid #f00; + border: 1px solid #f00; +} \ No newline at end of file diff --git a/test/cases/border.styl b/test/cases/border.styl new file mode 100644 index 00000000..ccbb91e4 --- /dev/null +++ b/test/cases/border.styl @@ -0,0 +1,6 @@ + +@import 'https://github.com/nib/border' + +.foo + border: red + border: 1px solid red \ No newline at end of file From 230971936b199d4e1ef70d12d7b23d8ca63e35e8 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 29 Jun 2012 09:57:55 -0700 Subject: [PATCH 088/254] fix "border: none" case --- lib/nib/border.styl | 6 +++--- test/cases/border.css | 1 + test/cases/border.styl | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/nib/border.styl b/lib/nib/border.styl index 5f39f7d3..16ca210a 100644 --- a/lib/nib/border.styl +++ b/lib/nib/border.styl @@ -4,8 +4,8 @@ * border: ... */ -border() - if 1 == length(arguments) - border: 1px solid arguments +border(color) + if color is a 'color' + border: 1px solid color else border: arguments diff --git a/test/cases/border.css b/test/cases/border.css index aae2e4fb..3d3c0563 100644 --- a/test/cases/border.css +++ b/test/cases/border.css @@ -1,4 +1,5 @@ .foo { + border: none; border: 1px solid #f00; border: 1px solid #f00; } \ No newline at end of file diff --git a/test/cases/border.styl b/test/cases/border.styl index ccbb91e4..92e5e7b0 100644 --- a/test/cases/border.styl +++ b/test/cases/border.styl @@ -2,5 +2,6 @@ @import 'https://github.com/nib/border' .foo + border: none border: red border: 1px solid red \ No newline at end of file From 7701921a566432a98930ad20a1419715e61d449d Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 5 Jul 2012 15:22:20 -0700 Subject: [PATCH 089/254] add support for linear-gradient(stops...). Closes #110 --- lib/nib/gradients.styl | 5 +++++ test/cases/linear-gradient.css | 8 ++++++++ test/cases/linear-gradient.styl | 3 +++ 3 files changed, 16 insertions(+) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index db3bf207..04936c10 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -107,6 +107,11 @@ linear-gradient(start, stops...) error('color stops required') unless length(stops) prop = current-property[0] val = current-property[1] + + if start is a 'color' + unshift(stops, start) + start = top + stops = normalize-stops(stops) // gradient image diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 7ec8c820..d37939f8 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -6,6 +6,14 @@ body { background: -ms-linear-gradient(top, #fff 0%, #000 100%); background: linear-gradient(top, #fff 0%, #000 100%); } +body { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); + background: -webkit-linear-gradient(top, #fff 0%, #000 100%); + background: -moz-linear-gradient(top, #fff 0%, #000 100%); + background: -o-linear-gradient(top, #fff 0%, #000 100%); + background: -ms-linear-gradient(top, #fff 0%, #000 100%); + background: linear-gradient(top, #fff 0%, #000 100%); +} body { background: -webkit-gradient(linear, left top, right bottom, color-stop(0, #fff), color-stop(0.25, #f00), color-stop(0.5, #00f), color-stop(1, #000)); background: -webkit-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 7d9fcc35..692674b3 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -1,6 +1,9 @@ @import 'https://github.com/nib/gradients' +body + background: linear-gradient(white, black) + body background: linear-gradient(top, white, black) From b4c5dacad3b3fbcf43d27ad61dd7402a1bbbdd23 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 5 Jul 2012 15:23:40 -0700 Subject: [PATCH 090/254] Release 0.6.0 --- History.md | 6 ++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 0bda726e..4a9aa6f8 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,10 @@ +0.6.0 / 2012-07-05 +================== + + * add support for `linear-gradient(stops...)`. Closes #110 + * replace hide-text() w/ text-indent: 100% method + 0.5.0 / 2012-05-28 ================== diff --git a/lib/nib.js b/lib/nib.js index a4527a3a..25322df5 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.5.0'; +exports.version = '0.6.0'; /** * Stylus path. diff --git a/package.json b/package.json index 49f96766..6c62eda7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.5.0", + "version": "0.6.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From cb6523c833649ec3735fd93b184922adb5ea8e15 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sat, 7 Jul 2012 08:43:26 -0700 Subject: [PATCH 091/254] add image(path, [w], [h]) mixing --- lib/nib/image.styl | 14 ++++++++++++++ lib/nib/index.styl | 2 ++ package.json | 2 +- test/cases/image.css | 18 ++++++++++++++++++ test/cases/image.styl | 8 ++++++++ 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 lib/nib/image.styl create mode 100644 test/cases/image.css create mode 100644 test/cases/image.styl diff --git a/lib/nib/image.styl b/lib/nib/image.styl new file mode 100644 index 00000000..7aeda332 --- /dev/null +++ b/lib/nib/image.styl @@ -0,0 +1,14 @@ + +/* + * Define background-image as `path` + * with optional width and height, + * adding an @2x variant. + */ + +image(path, w = auto, h = auto) + background-image: url(https://github.com/path) + @media all and (-webkit-min-device-pixel-ratio: 1.5) + ext = extname(path) + path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext) + background-image: url(https://github.com/path) + background-size: w h diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 61a1ed6b..2348c2fb 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -1,3 +1,4 @@ + @import 'https://github.com/vendor' @import 'https://github.com/text' @import 'https://github.com/reset' @@ -9,3 +10,4 @@ @import 'https://github.com/box' @import 'https://github.com/color-image' @import 'https://github.com/border' +@import 'https://github.com/image' diff --git a/package.json b/package.json index 6c62eda7..715e477f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "devDependencies": { "connect": "1.x" , "jade": "0.22.0" - , "stylus": "0.27.x" + , "stylus": "0.28.x" , "mocha": "*" , "should": "*" , "canvas": "*" diff --git a/test/cases/image.css b/test/cases/image.css new file mode 100644 index 00000000..9cfd0579 --- /dev/null +++ b/test/cases/image.css @@ -0,0 +1,18 @@ +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: auto auto; + } +} +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: 50px 100px; + } +} \ No newline at end of file diff --git a/test/cases/image.styl b/test/cases/image.styl new file mode 100644 index 00000000..0fb6dff8 --- /dev/null +++ b/test/cases/image.styl @@ -0,0 +1,8 @@ + +@import 'https://github.com/nib/image' + +#logo + image: '/images/branding/logo.main.png' + +#logo + image: '/images/branding/logo.main.png' 50px 100px From 23071649af79b6fdffaaf169c59778946a515d80 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 9 Jul 2012 10:17:23 -0700 Subject: [PATCH 092/254] Release 0.7.0 --- History.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 4a9aa6f8..5c758186 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.7.0 / 2012-07-09 +================== + + * add `image(path, [w], [h])` mixing + 0.6.0 / 2012-07-05 ================== diff --git a/package.json b/package.json index 715e477f..4e2df05e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.6.0", + "version": "0.7.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 68354a044daee5da1461d8cae0af5eef919c70da Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 10 Jul 2012 09:14:18 -0700 Subject: [PATCH 093/254] add overflow-scrolling vendor --- lib/nib/vendor.styl | 7 +++++++ test/cases/vendor.css | 4 ++++ test/cases/vendor.styl | 3 +++ 3 files changed, 14 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 0c7b4ffb..339dd556 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -401,6 +401,13 @@ appearance() tab-size() vendor('tab-size', arguments, only: moz o) +/* + * Vendor "overflow-scrolling" support. + */ + +overflow-scrolling() + vendor('overflow-scrolling', arguments, only: webkit official) + /* * Helper for border-radius(). */ diff --git a/test/cases/vendor.css b/test/cases/vendor.css index ffe17217..f9c0797c 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -161,3 +161,7 @@ p { -moz-hyphens: auto; hyphens: auto; } +section { + -webkit-overflow-scrolling: touch; + overflow-scrolling: touch; +} diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index ff8d0847..affa45bd 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -84,3 +84,6 @@ section p hyphens: auto + +section + overflow-scrolling: touch From 6ec0c697ebb0fe867bf5ea4afbb8d85705ee04a0 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 28 Jun 2012 14:26:48 -0700 Subject: [PATCH 094/254] add "border: color" -> "border: 1px solid color" support --- lib/nib/border.styl | 11 +++++++++++ lib/nib/index.styl | 1 + test/cases/border.css | 4 ++++ test/cases/border.styl | 6 ++++++ 4 files changed, 22 insertions(+) create mode 100644 lib/nib/border.styl create mode 100644 test/cases/border.css create mode 100644 test/cases/border.styl diff --git a/lib/nib/border.styl b/lib/nib/border.styl new file mode 100644 index 00000000..5f39f7d3 --- /dev/null +++ b/lib/nib/border.styl @@ -0,0 +1,11 @@ + +/* + * border: + * border: ... + */ + +border() + if 1 == length(arguments) + border: 1px solid arguments + else + border: arguments diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 7ddf70ab..61a1ed6b 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -8,3 +8,4 @@ @import 'https://github.com/gradients' @import 'https://github.com/box' @import 'https://github.com/color-image' +@import 'https://github.com/border' diff --git a/test/cases/border.css b/test/cases/border.css new file mode 100644 index 00000000..aae2e4fb --- /dev/null +++ b/test/cases/border.css @@ -0,0 +1,4 @@ +.foo { + border: 1px solid #f00; + border: 1px solid #f00; +} \ No newline at end of file diff --git a/test/cases/border.styl b/test/cases/border.styl new file mode 100644 index 00000000..ccbb91e4 --- /dev/null +++ b/test/cases/border.styl @@ -0,0 +1,6 @@ + +@import 'https://github.com/nib/border' + +.foo + border: red + border: 1px solid red \ No newline at end of file From 0d853c538345512b52974db2e754f2010d22fdb2 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 29 Jun 2012 09:57:55 -0700 Subject: [PATCH 095/254] fix "border: none" case --- lib/nib/border.styl | 6 +++--- test/cases/border.css | 1 + test/cases/border.styl | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/nib/border.styl b/lib/nib/border.styl index 5f39f7d3..16ca210a 100644 --- a/lib/nib/border.styl +++ b/lib/nib/border.styl @@ -4,8 +4,8 @@ * border: ... */ -border() - if 1 == length(arguments) - border: 1px solid arguments +border(color) + if color is a 'color' + border: 1px solid color else border: arguments diff --git a/test/cases/border.css b/test/cases/border.css index aae2e4fb..3d3c0563 100644 --- a/test/cases/border.css +++ b/test/cases/border.css @@ -1,4 +1,5 @@ .foo { + border: none; border: 1px solid #f00; border: 1px solid #f00; } \ No newline at end of file diff --git a/test/cases/border.styl b/test/cases/border.styl index ccbb91e4..92e5e7b0 100644 --- a/test/cases/border.styl +++ b/test/cases/border.styl @@ -2,5 +2,6 @@ @import 'https://github.com/nib/border' .foo + border: none border: red border: 1px solid red \ No newline at end of file From 4414f49baaeb30500c6a3b4c9f553e7fa07a38b5 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 5 Jul 2012 15:22:20 -0700 Subject: [PATCH 096/254] add support for linear-gradient(stops...). Closes #110 --- lib/nib/gradients.styl | 5 +++++ test/cases/linear-gradient.css | 8 ++++++++ test/cases/linear-gradient.styl | 3 +++ 3 files changed, 16 insertions(+) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index db3bf207..04936c10 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -107,6 +107,11 @@ linear-gradient(start, stops...) error('color stops required') unless length(stops) prop = current-property[0] val = current-property[1] + + if start is a 'color' + unshift(stops, start) + start = top + stops = normalize-stops(stops) // gradient image diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 7ec8c820..d37939f8 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -6,6 +6,14 @@ body { background: -ms-linear-gradient(top, #fff 0%, #000 100%); background: linear-gradient(top, #fff 0%, #000 100%); } +body { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); + background: -webkit-linear-gradient(top, #fff 0%, #000 100%); + background: -moz-linear-gradient(top, #fff 0%, #000 100%); + background: -o-linear-gradient(top, #fff 0%, #000 100%); + background: -ms-linear-gradient(top, #fff 0%, #000 100%); + background: linear-gradient(top, #fff 0%, #000 100%); +} body { background: -webkit-gradient(linear, left top, right bottom, color-stop(0, #fff), color-stop(0.25, #f00), color-stop(0.5, #00f), color-stop(1, #000)); background: -webkit-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 7d9fcc35..692674b3 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -1,6 +1,9 @@ @import 'https://github.com/nib/gradients' +body + background: linear-gradient(white, black) + body background: linear-gradient(top, white, black) From c8027384f568dc15bb7bb02e7d04c4bbcc3d9540 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 5 Jul 2012 15:23:40 -0700 Subject: [PATCH 097/254] Release 0.6.0 --- History.md | 6 ++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 0bda726e..4a9aa6f8 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,10 @@ +0.6.0 / 2012-07-05 +================== + + * add support for `linear-gradient(stops...)`. Closes #110 + * replace hide-text() w/ text-indent: 100% method + 0.5.0 / 2012-05-28 ================== diff --git a/lib/nib.js b/lib/nib.js index a4527a3a..25322df5 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.5.0'; +exports.version = '0.6.0'; /** * Stylus path. diff --git a/package.json b/package.json index 49f96766..6c62eda7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.5.0", + "version": "0.6.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 37b4421010a6ee78d4ea71a9e54fd4320d89b985 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sat, 7 Jul 2012 08:43:26 -0700 Subject: [PATCH 098/254] add image(path, [w], [h]) mixing --- lib/nib/image.styl | 14 ++++++++++++++ lib/nib/index.styl | 2 ++ package.json | 2 +- test/cases/image.css | 18 ++++++++++++++++++ test/cases/image.styl | 8 ++++++++ 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 lib/nib/image.styl create mode 100644 test/cases/image.css create mode 100644 test/cases/image.styl diff --git a/lib/nib/image.styl b/lib/nib/image.styl new file mode 100644 index 00000000..7aeda332 --- /dev/null +++ b/lib/nib/image.styl @@ -0,0 +1,14 @@ + +/* + * Define background-image as `path` + * with optional width and height, + * adding an @2x variant. + */ + +image(path, w = auto, h = auto) + background-image: url(https://github.com/path) + @media all and (-webkit-min-device-pixel-ratio: 1.5) + ext = extname(path) + path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext) + background-image: url(https://github.com/path) + background-size: w h diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 61a1ed6b..2348c2fb 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -1,3 +1,4 @@ + @import 'https://github.com/vendor' @import 'https://github.com/text' @import 'https://github.com/reset' @@ -9,3 +10,4 @@ @import 'https://github.com/box' @import 'https://github.com/color-image' @import 'https://github.com/border' +@import 'https://github.com/image' diff --git a/package.json b/package.json index 6c62eda7..715e477f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "devDependencies": { "connect": "1.x" , "jade": "0.22.0" - , "stylus": "0.27.x" + , "stylus": "0.28.x" , "mocha": "*" , "should": "*" , "canvas": "*" diff --git a/test/cases/image.css b/test/cases/image.css new file mode 100644 index 00000000..9cfd0579 --- /dev/null +++ b/test/cases/image.css @@ -0,0 +1,18 @@ +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: auto auto; + } +} +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: 50px 100px; + } +} \ No newline at end of file diff --git a/test/cases/image.styl b/test/cases/image.styl new file mode 100644 index 00000000..0fb6dff8 --- /dev/null +++ b/test/cases/image.styl @@ -0,0 +1,8 @@ + +@import 'https://github.com/nib/image' + +#logo + image: '/images/branding/logo.main.png' + +#logo + image: '/images/branding/logo.main.png' 50px 100px From 933022e475c04ee074831e0f8610c57bd7dd95af Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 9 Jul 2012 10:17:23 -0700 Subject: [PATCH 099/254] Release 0.7.0 --- History.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 4a9aa6f8..5c758186 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.7.0 / 2012-07-09 +================== + + * add `image(path, [w], [h])` mixing + 0.6.0 / 2012-07-05 ================== diff --git a/package.json b/package.json index 715e477f..4e2df05e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.6.0", + "version": "0.7.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 55435e1cb2d96b3efde9357f42765d0f192b7757 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 10 Jul 2012 09:14:18 -0700 Subject: [PATCH 100/254] add overflow-scrolling vendor --- lib/nib/vendor.styl | 7 +++++++ test/cases/vendor.css | 4 ++++ test/cases/vendor.styl | 3 +++ 3 files changed, 14 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 0c7b4ffb..339dd556 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -401,6 +401,13 @@ appearance() tab-size() vendor('tab-size', arguments, only: moz o) +/* + * Vendor "overflow-scrolling" support. + */ + +overflow-scrolling() + vendor('overflow-scrolling', arguments, only: webkit official) + /* * Helper for border-radius(). */ diff --git a/test/cases/vendor.css b/test/cases/vendor.css index ffe17217..f9c0797c 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -161,3 +161,7 @@ p { -moz-hyphens: auto; hyphens: auto; } +section { + -webkit-overflow-scrolling: touch; + overflow-scrolling: touch; +} diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index ff8d0847..affa45bd 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -84,3 +84,6 @@ section p hyphens: auto + +section + overflow-scrolling: touch From 3cd50428334a9cda90ec2f820651be5b4874efdc Mon Sep 17 00:00:00 2001 From: bolasblack Date: Wed, 1 Aug 2012 12:21:02 +0800 Subject: [PATCH 101/254] add text-overflow vendor --- lib/nib/vendor.styl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 339dd556..0b44413f 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -408,6 +408,13 @@ tab-size() overflow-scrolling() vendor('overflow-scrolling', arguments, only: webkit official) +/* + * Vendor "text-overflow" support, , -o- for opera 0-10 + */ + +text-overflow() + vendor('text-overflow', arguments, only: official o) + /* * Helper for border-radius(). */ @@ -458,4 +465,4 @@ border-radius() if augmented -apply-border-radius(pos) pos = () - vendor('border-radius', pos, only: webkit official) unless augmented \ No newline at end of file + vendor('border-radius', pos, only: webkit official) unless augmented From 8efc5005926fe74f1e4881be9f1993ac226cc3f3 Mon Sep 17 00:00:00 2001 From: bolasblack Date: Wed, 1 Aug 2012 12:21:34 +0800 Subject: [PATCH 102/254] ignore *.swp files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f769b91a..40be72c9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ !test/cases/*.css .DS_Store node_modules +*.swp From 639307f6af884c84d73c139e8814ff9415588097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 8 Aug 2012 07:08:23 +0300 Subject: [PATCH 103/254] Support 'only' and 'ignore' in 'vendor-value' --- lib/nib/vendor.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 67f73873..8c141654 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -24,10 +24,10 @@ vendor(prop, args, only = null, ignore = null) * Vendorize the given value. */ -vendor-value(arg) +vendor-value(arg, only = null, ignore = null) prop = current-property[0] for prefix in vendor-prefixes - unless official == prefix + unless (only and !(prefix in only)) or (ignore and prefix in ignore) or official == prefix add-property(prop, '-%s-%s' % (prefix arg)) arg From c8a9091214366fbe36e4b3eb7f8d6c658a932cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 8 Aug 2012 07:15:36 +0200 Subject: [PATCH 104/254] Add support for new FlexBox specs and fallback to old specs --- lib/nib/box.styl | 28 ---------------- lib/nib/flex.styl | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 28 deletions(-) delete mode 100644 lib/nib/box.styl create mode 100644 lib/nib/flex.styl diff --git a/lib/nib/box.styl b/lib/nib/box.styl deleted file mode 100644 index 73608532..00000000 --- a/lib/nib/box.styl +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Vendor "display: box" support. - */ - -display(type) - if box == type - display: vendor-value(type) - else - display: type - -/* - * Synopsis: - * - * box: [direction] - * - * Examples: - * - * box: horizontal - * box: horizontal reverse - * - */ - -box(args...) - display: box - box-orient: args[0] - if args[1] - box-direction: args[1] diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl new file mode 100644 index 00000000..7cc51824 --- /dev/null +++ b/lib/nib/flex.styl @@ -0,0 +1,84 @@ +/* + * Vendor "display: flex" support with fallback to obsolete versions. + */ + +display(type) + if flex == type || inline-flex == type + display: vendor-value(box, only: moz ms webkit) + display: vendor-value(type, only: webkit official) // overwrites old webkit + else + display: type + +/* + * New syntax for browsers like Google Chrome. + * Plus a translation to the old syntax, if possible. + */ +align-content() + vendor('align-content', arguments, only: webkit official) + +align-self() + vendor('align-self', arguments, only: webkit official) + +flex-basis() + vendor('flex-basics', arguments, only: webkit official) + +flex-shrink() + vendor('flex-shrink', arguments, only: webkit official) + +flex-wrap() + vendor('flex-wrap', arguments, only: webkit official) + +justify-content() + vendor('justify-content', arguments, only: webkit official) + +align-items(align) + /* obsolete */ + if flex-start == align + align = start + else if flex-end == align + align = end + vendor('box-align', align, ignore: official) + + /* new */ + vendor('align-items', arguments, only: webkit official) + +flex(growth) + /* obsolete */ + vendor('flex', arguments, only: webkit official) + + /* new */ + vendor('box-flex', growth) + +flex-direction(direction) + /* obsolete */ + if row-reverse == direction || column-reverse == direction + vendor('box-direction', reverse, ignore: official) + if row == direction || row-reverse == direction + vendor('box-orient', horizontal, ignore: official) + else if column == direction || column-reverse == direction + vendor('box-orient', vertical, ignore: official) + + /* new */ + vendor('flex-direction', arguments, only: webkit official) + +flex-flow(direction) + /* obsolete */ + if row-reverse == direction || column-reverse == direction || wrap-reverse == direction + vendor('box-direction', 'reverse', ignore: official) + + /* new */ + vendor('flex-flow', arguments, only: webkit official) + +flex-grow(growth) + /* obsolete */ + vendor('flex-grow', arguments, only: webkit official) + + /* new */ + vendor('box-flex', growth) + +order() + /* obsolete */ + vendor('box-ordinal-group', arguments, ignore: official) + + /* new */ + vendor('order', arguments, only: webkit official) \ No newline at end of file From 0094b57447d4f571a8b956b49217851e61d834cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 8 Aug 2012 07:24:02 +0200 Subject: [PATCH 105/254] Remove obsolete FlexBox vendor-prefixes --- lib/nib/vendor.styl | 50 --------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 8c141654..49013906 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -266,56 +266,6 @@ whitespace() box-sizing() vendor('box-sizing', arguments, only: webkit moz official) -/* - * Vendor "box-orient" support. - */ - -box-orient() - vendor('box-orient', arguments, only: webkit moz ms official) - -/* - * Vendor "box-flex" support. - */ - -box-flex() - vendor('box-flex', arguments, only: webkit moz ms official) - -/* - * Vendor "box-flex-group" support. - */ - -box-flex-group() - vendor('box-flex-group', arguments, only: webkit moz official) - -/* - * Vendor "box-ordinal-group" support. - */ - -box-ordinal-group() - vendor('box-ordinal-group', arguments, only: webkit moz ms official) - - -/* - * Vendor "box-align" support. - */ - -box-align() - vendor('box-align', arguments, only: webkit moz ms official) - -/* - * Vendor "box-pack" support. - */ - -box-pack() - vendor('box-pack', arguments, only: webkit moz ms official) - -/* - * Vendor "box-direction" support. - */ - -box-direction() - vendor('box-direction', arguments, only: webkit moz ms official) - /* * Vendor "animation" support. */ From b67992dd3d9720d5973772d4a1ec3e4a88587df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 8 Aug 2012 07:37:09 +0200 Subject: [PATCH 106/254] Fix property order --- lib/nib/flex.styl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 7cc51824..96f2f5ff 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -44,10 +44,10 @@ align-items(align) flex(growth) /* obsolete */ - vendor('flex', arguments, only: webkit official) + vendor('box-flex', growth) /* new */ - vendor('box-flex', growth) + vendor('flex', arguments, only: webkit official) flex-direction(direction) /* obsolete */ @@ -71,10 +71,10 @@ flex-flow(direction) flex-grow(growth) /* obsolete */ - vendor('flex-grow', arguments, only: webkit official) + vendor('box-flex', growth) /* new */ - vendor('box-flex', growth) + vendor('flex-grow', arguments, only: webkit official) order() /* obsolete */ From de412a47d9dc6d1b661b3b09f1e3bc3aee33074a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 8 Aug 2012 07:39:22 +0200 Subject: [PATCH 107/254] Updated test cases --- test/cases/box.css | 33 --------------------------------- test/cases/box.styl | 12 ------------ test/cases/flex.css | 23 +++++++++++++++++++++++ test/cases/flex.styl | 10 ++++++++++ test/cases/vendor.css | 26 -------------------------- test/cases/vendor.styl | 14 -------------- 6 files changed, 33 insertions(+), 85 deletions(-) delete mode 100644 test/cases/box.css delete mode 100644 test/cases/box.styl create mode 100644 test/cases/flex.css create mode 100644 test/cases/flex.styl diff --git a/test/cases/box.css b/test/cases/box.css deleted file mode 100644 index 16d750da..00000000 --- a/test/cases/box.css +++ /dev/null @@ -1,33 +0,0 @@ -section { - display: -webkit-box; - display: -moz-box; - display: -o-box; - display: -ms-box; - display: box; -} -section { - display: -webkit-box; - display: -moz-box; - display: -o-box; - display: -ms-box; - display: box; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -ms-box-orient: horizontal; - box-orient: horizontal; -} -section { - display: -webkit-box; - display: -moz-box; - display: -o-box; - display: -ms-box; - display: box; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -ms-box-orient: horizontal; - box-orient: horizontal; - -webkit-box-direction: reverse; - -moz-box-direction: reverse; - -ms-box-direction: reverse; - box-direction: reverse; -} \ No newline at end of file diff --git a/test/cases/box.styl b/test/cases/box.styl deleted file mode 100644 index 42f1d10a..00000000 --- a/test/cases/box.styl +++ /dev/null @@ -1,12 +0,0 @@ - -@import 'https://github.com/nib/vendor' -@import 'https://github.com/nib/box' - -section - display: box - -section - box: horizontal - -section - box: horizontal reverse diff --git a/test/cases/flex.css b/test/cases/flex.css new file mode 100644 index 00000000..34628c7d --- /dev/null +++ b/test/cases/flex.css @@ -0,0 +1,23 @@ +section { + display: -webkit-box; + display: -moz-box; + display: -ms-box; + display: -webkit-flex; + display: box; + display: flex; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -o-box-orient: horizontal; + -ms-box-orient: horizontal; + -webkit-flex-direction: row; + flex-direction: row; +} +section div { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1 + -webkit-flex: 1 0; + flex: 1 0; +} diff --git a/test/cases/flex.styl b/test/cases/flex.styl new file mode 100644 index 00000000..99d18284 --- /dev/null +++ b/test/cases/flex.styl @@ -0,0 +1,10 @@ + +@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/flex' + +section + display: flex + flex-direction: row + + div + flex: 1 0 \ No newline at end of file diff --git a/test/cases/vendor.css b/test/cases/vendor.css index f9c0797c..f0f65fd8 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -11,32 +11,6 @@ button { opacity: 0.75; white-space: nowrap; } -section { - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - box-orient: vertical; - -webkit-box-direction: reverse; - -moz-box-direction: reverse; - box-direction: reverse; -} -section div { - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; -} -section div { - -webkit-box-flex-group: 1; - -moz-box-flex-group: 1; - box-flex-group: 1; -} -section { - -webkit-box-align: center; - -moz-box-align: center; - box-align: center; - -webkit-box-pack: center; - -moz-box-pack: center; - box-pack: center; -} button { -webkit-animation-name: myAnimation; -moz-animation-name: myAnimation; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index affa45bd..35176d6a 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -15,20 +15,6 @@ button opacity: 0.75 whitespace: no-wrap -section - box-orient: vertical; - box-direction: reverse; - div - box-flex: 1; - -section - div - box-flex-group: 1; - -section - box-align: center; - box-pack: center; - button animation-name: myAnimation; animation-delay: 1s; From 87e602ac4e972d7060c3353aedeed2bb8662b56e Mon Sep 17 00:00:00 2001 From: Jean-Sebastien Ney Date: Wed, 8 Aug 2012 18:12:54 +0200 Subject: [PATCH 108/254] text-size-adjust https://developer.mozilla.org/en-US/docs/CSS/text-size-adjust --- lib/nib/vendor.styl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 35aced60..0fb45450 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -147,7 +147,6 @@ transition-delay() backface-visibility() vendor('backface-visibility', arguments) - /* * Opacity with conditional IE support. */ @@ -157,6 +156,13 @@ opacity(n) if support-for-ie filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % round(n * 100) +/* + * Vendor "text-size-adjust" + */ + +text-size-adjust() + vendor('text-size-adjust', arguments) + /* * Alias the "white-space" property. */ From 8ae7ff5d96a8a40be9d0937ad60801ba507ee2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Wed, 8 Aug 2012 19:26:15 +0200 Subject: [PATCH 109/254] Fix typo in flex.styl --- lib/nib/flex.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 96f2f5ff..864c29b1 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -20,7 +20,7 @@ align-self() vendor('align-self', arguments, only: webkit official) flex-basis() - vendor('flex-basics', arguments, only: webkit official) + vendor('flex-basis', arguments, only: webkit official) flex-shrink() vendor('flex-shrink', arguments, only: webkit official) From 119eea842dd80ec3f4cea31079e741956bfd5d55 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Wed, 8 Aug 2012 13:42:02 -0700 Subject: [PATCH 110/254] flex: fix comments --- lib/nib/flex.styl | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 864c29b1..0b72fd2e 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -13,6 +13,7 @@ display(type) * New syntax for browsers like Google Chrome. * Plus a translation to the old syntax, if possible. */ + align-content() vendor('align-content', arguments, only: webkit official) @@ -32,25 +33,25 @@ justify-content() vendor('justify-content', arguments, only: webkit official) align-items(align) - /* obsolete */ + // obsolete if flex-start == align align = start else if flex-end == align align = end vendor('box-align', align, ignore: official) - /* new */ + // new vendor('align-items', arguments, only: webkit official) flex(growth) - /* obsolete */ + // obsolete vendor('box-flex', growth) - /* new */ + // new vendor('flex', arguments, only: webkit official) flex-direction(direction) - /* obsolete */ + // obsolete if row-reverse == direction || column-reverse == direction vendor('box-direction', reverse, ignore: official) if row == direction || row-reverse == direction @@ -58,27 +59,27 @@ flex-direction(direction) else if column == direction || column-reverse == direction vendor('box-orient', vertical, ignore: official) - /* new */ + // new vendor('flex-direction', arguments, only: webkit official) flex-flow(direction) - /* obsolete */ + // obsolete if row-reverse == direction || column-reverse == direction || wrap-reverse == direction vendor('box-direction', 'reverse', ignore: official) - /* new */ + // new vendor('flex-flow', arguments, only: webkit official) flex-grow(growth) - /* obsolete */ + // obsolete vendor('box-flex', growth) - /* new */ + // new vendor('flex-grow', arguments, only: webkit official) order() - /* obsolete */ + // obsolete vendor('box-ordinal-group', arguments, ignore: official) - /* new */ + // new vendor('order', arguments, only: webkit official) \ No newline at end of file From ce03edf68e533c10033cd670b38c2b91647af600 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Wed, 8 Aug 2012 13:45:26 -0700 Subject: [PATCH 111/254] flex: fix a test case --- test/cases/flex.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cases/flex.css b/test/cases/flex.css index 34628c7d..70db2345 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -17,7 +17,7 @@ section div { -moz-box-flex: 1; -o-box-flex: 1; -ms-box-flex: 1; - box-flex: 1 + box-flex: 1; -webkit-flex: 1 0; flex: 1 0; } From 59027b4cd12753eb11f3462f580d4a8f71abbbf0 Mon Sep 17 00:00:00 2001 From: kizu Date: Mon, 14 May 2012 23:20:13 +0400 Subject: [PATCH 112/254] Working with vendor prefixes and values --- lib/nib/vendor.styl | 53 ++++++++++++++++++++++++++++++++- test/cases/vendor.values.css | 56 +++++++++++++++++++++++++++++++++++ test/cases/vendor.values.styl | 26 ++++++++++++++++ 3 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 test/cases/vendor.values.css create mode 100644 test/cases/vendor.values.styl diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 1822e3a0..6b35dd84 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -6,6 +6,53 @@ no-wrap = unquote('nowrap') +/* + * Helper to find out is the list of arguments have commas + */ + +is-comma-list() + return match('\), \(', ''+arguments) + +/* + * Literal joining + */ + +literal-join(string, literals) + result = unquote('') + first = true + for args in literals + subresult = unquote('') + for arg in args + subresult = subresult arg + if first + result = subresult + first = false + else + result = s('%s%s%s', result, unquote(string), subresult) + return result + +/* + * Replacing one value with another + */ + +replace-args(args,argument,val) + result = () + // Checking if there are values divided by comma + if is-comma-list(args) + for subargs in args + subresult = () + for arg in subargs + arg = unquote(val) if arg == argument + push(subresult, arg) + subresult = literal-join(' ', subresult) if length(subresult) > 1 + push(result, subresult) + result = literal-join(', ', result) + else + for arg in args + arg = unquote(val) if arg == argument + push(result, arg) + return result + /* * Vendor support for the given prop / arguments, * optionally specifying the only prefixes to utilize, @@ -18,7 +65,11 @@ vendor(prop, args, only = null, ignore = null) if official == prefix {prop}: args else - {'-' + prefix + '-' + prop}: args + newargs = args + // Adjusting the args if needed + if prop in ('transition' 'transition-property') + newargs = replace-args(args, transform, '-' + prefix + '-transform') + {'-' + prefix + '-' + prop}: newargs /* * Vendorize the given value. diff --git a/test/cases/vendor.values.css b/test/cases/vendor.values.css new file mode 100644 index 00000000..0b1dd9a6 --- /dev/null +++ b/test/cases/vendor.values.css @@ -0,0 +1,56 @@ +button { + -webkit-transition: -webkit-transform; + -moz-transition: -moz-transform; + -o-transition: -o-transform; + -ms-transition: -ms-transform; + transition: transform; +} +button { + -webkit-transition: -webkit-transform 0.3s 0.2s linear; + -moz-transition: -moz-transform 0.3s 0.2s linear; + -o-transition: -o-transform 0.3s 0.2s linear; + -ms-transition: -ms-transform 0.3s 0.2s linear; + transition: transform 0.3s 0.2s linear; +} +button { + -webkit-transition: -webkit-transform cubic-bezier(1, 1, 1); + -moz-transition: -moz-transform cubic-bezier(1, 1, 1); + -o-transition: -o-transform cubic-bezier(1, 1, 1); + -ms-transition: -ms-transform cubic-bezier(1, 1, 1); + transition: transform cubic-bezier(1, 1, 1); +} +button { + -webkit-transition: -webkit-transform 2s, width 0.3s linear, height; + -moz-transition: -moz-transform 2s, width 0.3s linear, height; + -o-transition: -o-transform 2s, width 0.3s linear, height; + -ms-transition: -ms-transform 2s, width 0.3s linear, height; + transition: transform 2s, width 0.3s linear, height; +} +button { + -webkit-transition: height, -webkit-transform 2s, width 0.3s linear; + -moz-transition: height, -moz-transform 2s, width 0.3s linear; + -o-transition: height, -o-transform 2s, width 0.3s linear; + -ms-transition: height, -ms-transform 2s, width 0.3s linear; + transition: height, transform 2s, width 0.3s linear; +} +button { + -webkit-transition: -webkit-transform 1s !important; + -moz-transition: -moz-transform 1s !important; + -o-transition: -o-transform 1s !important; + -ms-transition: -ms-transform 1s !important; + transition: transform 1s !important; +} +button { + -webkit-transition: -webkit-transform, height !important; + -moz-transition: -moz-transform, height !important; + -o-transition: -o-transform, height !important; + -ms-transition: -ms-transform, height !important; + transition: transform, height !important; +} +button { + -webkit-transition: -webkit-transform 1s, width 2s linear, cubic-bezier(1, 1, 1); + -moz-transition: -moz-transform 1s, width 2s linear, cubic-bezier(1, 1, 1); + -o-transition: -o-transform 1s, width 2s linear, cubic-bezier(1, 1, 1); + -ms-transition: -ms-transform 1s, width 2s linear, cubic-bezier(1, 1, 1); + transition: transform 1s, width 2s linear, cubic-bezier(1, 1, 1); +} diff --git a/test/cases/vendor.values.styl b/test/cases/vendor.values.styl new file mode 100644 index 00000000..33364b0f --- /dev/null +++ b/test/cases/vendor.values.styl @@ -0,0 +1,26 @@ + +@import 'https://github.com/nib/vendor' + +button + transition: transform + +button + transition: transform .3s .2s linear + +button + transition: transform cubic-bezier(1,1,1) + +button + transition: transform 2s, width .3s linear, height + +button + transition: height, transform 2s, width .3s linear + +button + transition: transform 1s !important + +button + transition: transform, height !important + +button + transition: transform 1s, width 2s linear, cubic-bezier(1,1,1) From 4cd9f4d33f697fcfd6bf0ea701906db837b2078d Mon Sep 17 00:00:00 2001 From: kizu Date: Mon, 13 Aug 2012 22:52:52 +0400 Subject: [PATCH 113/254] Added tests for bg-origin/clip, fied minor bug with them, updated index.styl --- lib/nib/index.styl | 1 - lib/nib/vendor.styl | 6 +++--- test/cases/vendor.css | 8 ++++++++ test/cases/vendor.styl | 4 ++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 2348c2fb..c26e65c7 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -7,7 +7,6 @@ @import 'https://github.com/overflow' @import 'https://github.com/iconic' @import 'https://github.com/gradients' -@import 'https://github.com/box' @import 'https://github.com/color-image' @import 'https://github.com/border' @import 'https://github.com/image' diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 6b35dd84..6d920b81 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -169,9 +169,9 @@ legacy-bg-values(property, args) for subargs in args for arg in subargs if arg in (border-box padding-box content-box) - arg = border if arg == border-box - arg = padding if arg == padding-box - arg = content if arg == content-box + arg = unquote('border') if arg == border-box + arg = unquote('padding') if arg == padding-box + arg = unquote('content') if arg == content-box if arg != '!important' push(legacy_args,arg) else diff --git a/test/cases/vendor.css b/test/cases/vendor.css index f0f65fd8..4ca85d24 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -91,6 +91,14 @@ section { -moz-column-gap: 2em; column-gap: 2em; } +button { + -webkit-background-origin: border, padding; + -moz-background-origin: border, padding; + background-origin: border-box, padding-box; + -webkit-background-clip: border, padding; + -moz-background-clip: border, padding; + background-clip: border-box, padding-box; +} button { -o-transition: all 0.1s ease-in-out 1s; -webkit-transition: all 0.1s ease-in-out 1s; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 35176d6a..4dcc46cd 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -52,6 +52,10 @@ section prepend(vendor-prefixes, o) +button + background-origin: border-box, padding-box; + background-clip: border-box, padding-box; + button transition: all 0.1s ease-in-out 1s backface-visibility: hidden From 8d8dbd5e8a7e04c8b7bcabc7b8f57eb3781cbf82 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 17 Aug 2012 15:13:51 -0700 Subject: [PATCH 114/254] Release 0.8.0 --- History.md | 7 +++++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 5c758186..fea7920f 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,11 @@ +0.8.0 / 2012-08-17 +================== + + * add prefixing of `transform` [kizu] + * add text-overflow vendor + * add overflow-scrolling vendor + 0.7.0 / 2012-07-09 ================== diff --git a/lib/nib.js b/lib/nib.js index 25322df5..cba6f1b2 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.6.0'; +exports.version = '0.8.0'; /** * Stylus path. diff --git a/package.json b/package.json index 4e2df05e..c991fb06 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.7.0", + "version": "0.7.1", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 77e5bccb58f95f6f6782d6a631f42327607529f4 Mon Sep 17 00:00:00 2001 From: evergreenv Date: Mon, 20 Aug 2012 11:02:39 +0600 Subject: [PATCH 115/254] Added 'replace-text' mixin to nib/text index.styl --- lib/nib/text/index.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/text/index.styl b/lib/nib/text/index.styl index c59995e9..71d805c2 100644 --- a/lib/nib/text/index.styl +++ b/lib/nib/text/index.styl @@ -1,4 +1,4 @@ - @import 'https://github.com/aliases' @import 'https://github.com/ellipsis' @import 'https://github.com/hide-text' +@import 'https://github.com/replace-text' From 6e4d5e026e4303f0038984081c3e0de9aaea4834 Mon Sep 17 00:00:00 2001 From: evergreenv Date: Mon, 20 Aug 2012 17:01:49 +0600 Subject: [PATCH 116/254] Make sure text is invisible. Adresses an issue when Firefox shows first pixel of text because of incorrect percentage rounding. --- lib/nib/text/hide-text.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/text/hide-text.styl b/lib/nib/text/hide-text.styl index 1571b79c..ea08477d 100644 --- a/lib/nib/text/hide-text.styl +++ b/lib/nib/text/hide-text.styl @@ -3,6 +3,6 @@ */ hide-text() - text-indent: 100% + text-indent: 101% white-space: nowrap overflow: hidden \ No newline at end of file From de3f5698777fc7f3fe818a092676003307e8b1fc Mon Sep 17 00:00:00 2001 From: Casey Foster Date: Tue, 21 Aug 2012 12:18:13 -0700 Subject: [PATCH 117/254] Revert "Remove obsolete FlexBox vendor-prefixes" This reverts commit 0094b57447d4f571a8b956b49217851e61d834cf. --- lib/nib/vendor.styl | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 6d920b81..4ba1e47b 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -323,6 +323,56 @@ whitespace() box-sizing() vendor('box-sizing', arguments, only: webkit moz official) +/* + * Vendor "box-orient" support. + */ + +box-orient() + vendor('box-orient', arguments, only: webkit moz ms official) + +/* + * Vendor "box-flex" support. + */ + +box-flex() + vendor('box-flex', arguments, only: webkit moz ms official) + +/* + * Vendor "box-flex-group" support. + */ + +box-flex-group() + vendor('box-flex-group', arguments, only: webkit moz official) + +/* + * Vendor "box-ordinal-group" support. + */ + +box-ordinal-group() + vendor('box-ordinal-group', arguments, only: webkit moz ms official) + + +/* + * Vendor "box-align" support. + */ + +box-align() + vendor('box-align', arguments, only: webkit moz ms official) + +/* + * Vendor "box-pack" support. + */ + +box-pack() + vendor('box-pack', arguments, only: webkit moz ms official) + +/* + * Vendor "box-direction" support. + */ + +box-direction() + vendor('box-direction', arguments, only: webkit moz ms official) + /* * Vendor "animation" support. */ From a113409a6869e933fc9fe24e32a121f171183601 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 21 Aug 2012 12:37:31 -0700 Subject: [PATCH 118/254] Release 0.8.1 --- History.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index fea7920f..c992823f 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,10 @@ +0.8.1 / 2012-08-21 +================== + + * add 'replace-text' mixin to nib/text index.styl + * revert "Remove obsolete FlexBox vendor-prefixes" [caseywebdev] + 0.8.0 / 2012-08-17 ================== diff --git a/package.json b/package.json index c991fb06..5c0aa182 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.7.1", + "version": "0.8.1", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 927f0150e998a85c3d3f45b8ea47d9dfd420614b Mon Sep 17 00:00:00 2001 From: Casey Foster Date: Wed, 22 Aug 2012 11:51:06 -0700 Subject: [PATCH 119/254] Organized, updated index.styl --- lib/nib/index.styl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/nib/index.styl b/lib/nib/index.styl index c26e65c7..411e5067 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -1,12 +1,12 @@ - -@import 'https://github.com/vendor' -@import 'https://github.com/text' -@import 'https://github.com/reset' -@import 'https://github.com/positions' +@import 'https://github.com/border' @import 'https://github.com/clearfix' -@import 'https://github.com/overflow' -@import 'https://github.com/iconic' -@import 'https://github.com/gradients' @import 'https://github.com/color-image' -@import 'https://github.com/border' +@import 'https://github.com/flex' +@import 'https://github.com/gradients' +@import 'https://github.com/iconic' @import 'https://github.com/image' +@import 'https://github.com/overflow' +@import 'https://github.com/positions' +@import 'https://github.com/reset' +@import 'https://github.com/text' +@import 'https://github.com/vendor' From 093fb5e1fcf03e5aff06bbe996eabe1a0c4026f3 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 23 Aug 2012 23:37:33 +0400 Subject: [PATCH 120/254] Fixes #128 --- lib/nib/vendor.styl | 5 ++++- test/cases/vendor.css | 11 +++++++++++ test/cases/vendor.styl | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 4ba1e47b..51965d02 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -278,7 +278,10 @@ backface-visibility() */ perspective() - vendor('perspective', arguments, only: webkit moz ms official) + if mixin + vendor('perspective', arguments, only: webkit moz ms official) + else + 'perspective(%s)' % arguments /* * Vendor "perspective-origin" support. diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 4ca85d24..3a592d1d 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -132,6 +132,17 @@ button { -moz-transform: rotateY(45deg); transform: rotateY(45deg); } +button { + -o-transform: perspective(500px); + -webkit-transform: perspective(500px); + -moz-transform: perspective(500px); + transform: perspective(500px); +} +button { + -webkit-perspective: 500; + -moz-perspective: 500; + perspective: 500; +} section { -o-border-image: url("https://github.com/image.png") 20% stretch stretch; -webkit-border-image: url("https://github.com/image.png") 20% stretch stretch; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 4dcc46cd..8e38decd 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -69,6 +69,12 @@ button button transform: rotateY(45deg) +button + transform: perspective(500px) + +button + perspective: 500 + section border-image: url("https://github.com/image.png") 20% stretch stretch; From e9ff1c259588ea39d14ca9c414ed1af57ee26a9d Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 25 Aug 2012 00:44:37 +0400 Subject: [PATCH 121/254] Fixed test-case for #125 --- test/cases/flex.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cases/flex.css b/test/cases/flex.css index 70db2345..72d98c54 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -17,6 +17,9 @@ section div { -moz-box-flex: 1; -o-box-flex: 1; -ms-box-flex: 1; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -ms-box-flex: 1; box-flex: 1; -webkit-flex: 1 0; flex: 1 0; From c533707721609d3df421a7895c60a4403908273b Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 25 Aug 2012 01:36:57 +0400 Subject: [PATCH 122/254] Added generic importance tests --- test/cases/importance.css | 144 +++++++++++++++++++++++++++++++++++++ test/cases/importance.styl | 138 +++++++++++++++++++++++++++++++++++ 2 files changed, 282 insertions(+) create mode 100644 test/cases/importance.css create mode 100644 test/cases/importance.styl diff --git a/test/cases/importance.css b/test/cases/importance.css new file mode 100644 index 00000000..bf6ae48e --- /dev/null +++ b/test/cases/importance.css @@ -0,0 +1,144 @@ +.test { + position: relative !important; + top: 0 !important; + right: 0 !important; + bottom: 0 !important; + left: 0 !important; + z-index: 0 !important; + float: left !important; + clear: left !important; + display: none !important; + visibility: hidden !important; + overflow: hidden !important; + overflow-x: scroll !important; + overflow-y: auto !important; + clip: auto !important; + -webkit-box-sizing: border-box !important; + -moz-box-sizing: border-box !important; + box-sizing: border-box !important; + margin: 0 !important; + margin-top: 0 !important; + margin-right: 0 !important; + margin-bottom: 0 !important; + margin-left: 0 !important; + padding: 0 !important; + padding-top: 0 !important; + padding-right: 0 !important; + padding-bottom: 0 !important; + padding-left: 0 !important; + width: 0 !important; + height: 0 !important; + min-width: 0 !important; + min-height: 0 !important; + max-height: 0 !important; + max-width: 0 !important; + outline: 0 !important; + border-collapse: collapse !important; + border-spacing: 0 !important; + border-color: #000 !important; + border-top-color: #000 !important; + border-right-color: #000 !important; + border-bottom-color: #000 !important; + border-left-color: #000 !important; + border-style: solid !important; + border-top-style: solid !important; + border-right-style: solid !important; + border-bottom-style: solid !important; + border-left-style: solid !important; + border-width: 0 !important; + border-top-width: 0 !important; + border-right-width: 0 !important; + border-bottom-width: 0 !important; + border-left-width: 0 !important; + border: 1px !important; + border-top: 1px !important; + border-right: 1px !important; + border-bottom: 1px !important; + border-left: 1px !important; + -webkit-border-radius: 50% !important; + border-radius: 50% !important; + border-top-right-radius: 50% !important; + border-top-left-radius: 50% !important; + border-bottom-left-radius: 50% !important; + border-bottom-right-radius: 50% !important; + -webkit-border-image: none !important; + -moz-border-image: none !important; + -o-border-image: none !important; + border-image: none !important; + background-attachment: fixed !important; + background-color: #f00 !important; + background-image: none !important; + background-position-x: 0 !important; + background-position-y: 0 !important; + background-position: 0 !important; + background-repeat: no-repeat !important; + -webkit-background-clip: border !important; + -moz-background-clip: border !important; + background-clip: border-box !important; + -webkit-background-origin: padding !important; + -moz-background-origin: padding !important; + background-origin: padding-box !important; + -webkit-background-size: 0 !important; + -moz-background-size: 0 !important; + background-size: 0 !important; + background: none !important; + -webkit-box-shadow: 0 1px 0 #000 !important; + box-shadow: 0 1px 0 #000 !important; + color: rgba(0,0,0,0.5) !important; + table-layout: fixed !important; + caption-side: top !important; + empty-cells: hide !important; + list-style-image: none !important; + list-style-position: inside !important; + list-style-type: disc !important; + list-style: none !important; + quotes: none !important; + content: "lol" !important; + counter-increment: none !important; + counter-reset: none !important; + vertical-align: middle !important; + text-align: center !important; + text-align-last: right !important; + text-decoration: none !important; + text-indent: 0 !important; + text-justify: auto !important; + text-outline: none !important; + text-transform: capitalize !important; + text-wrap: normal !important; + -o-text-overflow: ellipsis !important; + text-overflow: ellipsis !important; + text-shadow: 0 1px 0 0 #fff !important; + line-height: 1.5 !important; + white-space: nowrap !important; + word-spacing: normal !important; + word-wrap: normal !important; + word-break: normal !important; + -moz-tab-size: 4 !important; + -o-tab-size: 4 !important; + -webkit-hyphens: manual !important; + -moz-hyphens: manual !important; + -ms-hyphens: manual !important; + hyphens: manual !important; + letter-spacing: normal !important; + font-family: Monaco, monospace !important; + font-size: 21px !important; + font-style: italic !important; + font-variant: small-caps !important; + font-weight: bold !important; + font-size-adjust: none !important; + font-stretch: condensed !important; + font: normal 16px/1.25 Arial, sans-serif !important; + opacity: 0.5 !important; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50) !important; + filter: alpha(opacity=50) !important; + resize: both !important; + cursor: pointer !important; + unicode-bidi: normal !important; + direction: rtl !important; + break-before: auto !important; + break-after: auto !important; + break-inside: none !important; + orphans: 3 !important; + widows: 3 !important; + zoom: 1 !important; +} diff --git a/test/cases/importance.styl b/test/cases/importance.styl new file mode 100644 index 00000000..98bcdaa3 --- /dev/null +++ b/test/cases/importance.styl @@ -0,0 +1,138 @@ + +@import 'https://github.com/nib' + +.test + position: relative !important + top: 0 !important + right: 0 !important + bottom: 0 !important + left: 0 !important + z-index: 0 !important + + float: left !important + clear: left !important + display: none !important + visibility: hidden !important + overflow: hidden !important + overflow-x: scroll !important + overflow-y: auto !important + clip: auto !important + box-sizing: border-box !important + + margin: 0 !important + margin-top: 0 !important + margin-right: 0 !important + margin-bottom: 0 !important + margin-left: 0 !important + padding: 0 !important + padding-top: 0 !important + padding-right: 0 !important + padding-bottom: 0 !important + padding-left: 0 !important + + width: 0 !important + height: 0 !important + min-width: 0 !important + min-height: 0 !important + max-height: 0 !important + max-width: 0 !important + + outline: 0 !important + border-collapse: collapse !important + border-spacing: 0 !important + border-color: #000 !important + border-top-color: #000 !important + border-right-color: #000 !important + border-bottom-color: #000 !important + border-left-color: #000 !important + border-style: solid !important + border-top-style: solid !important + border-right-style: solid !important + border-bottom-style: solid !important + border-left-style: solid !important + border-width: 0 !important + border-top-width: 0 !important + border-right-width: 0 !important + border-bottom-width: 0 !important + border-left-width: 0 !important + border: 1px !important + border-top: 1px !important + border-right: 1px !important + border-bottom: 1px !important + border-left: 1px !important + border-radius: 50% !important + border-top-right-radius: 50% !important + border-top-left-radius: 50% !important + border-bottom-left-radius: 50% !important + border-bottom-right-radius: 50% !important + + border-image: none !important + background-attachment: fixed !important + background-color: red !important + background-image: none !important + background-position-x: 0 !important + background-position-y: 0 !important + background-position: 0 !important + background-repeat: no-repeat !important + background-clip: border-box !important + background-origin: padding-box !important + background-size: 0 !important + background: none !important + box-shadow: 0 1px 0 #000 !important + color: rgba(0,0,0,0.5) !important + + table-layout: fixed !important + caption-side: top !important + empty-cells: hide !important + list-style-image: none !important + list-style-position: inside !important + list-style-type: disc !important + list-style: none !important + quotes: none !important + content: "lol" !important + counter-increment: none !important + counter-reset: none !important + + vertical-align: middle !important + text-align: center !important + text-align-last: right !important + text-decoration: none !important + text-indent: 0 !important + text-justify: auto !important + text-outline: none !important + text-transform: capitalize !important + text-wrap: normal !important + text-overflow: ellipsis !important + text-shadow: 0 1px 0 0 #FFF !important + line-height: 1.5 !important + white-space: nowrap !important + word-spacing: normal !important + word-wrap: normal !important + word-break: normal !important + tab-size: 4 !important + hyphens: manual !important + letter-spacing: normal !important + font-family: Monaco, monospace !important + font-size: 21px !important + font-style: italic !important + font-variant: small-caps !important + font-weight: bold !important + font-size-adjust: none !important + font-stretch: condensed !important + font: normal 16px/1.25 Arial, sans-serif !important + + + opacity: 0.5 !important + resize: both !important + cursor: pointer !important + + unicode-bidi: normal !important + direction: rtl !important + + break-before: auto !important + break-after: auto !important + break-inside: none !important + orphans: 3 !important + widows: 3 !important + + zoom: 1 !important From 699be18444493ab9eb18365a91b952587b40160e Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 25 Aug 2012 01:39:32 +0400 Subject: [PATCH 123/254] Preserve importance for display, fixes #72 --- lib/nib/flex.styl | 24 ++++++++++++------------ test/cases/flex.css | 8 ++++++++ test/cases/flex.styl | 7 +++++-- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 0b72fd2e..4f81e209 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -2,12 +2,12 @@ * Vendor "display: flex" support with fallback to obsolete versions. */ -display(type) +display(type, args...) if flex == type || inline-flex == type - display: vendor-value(box, only: moz ms webkit) - display: vendor-value(type, only: webkit official) // overwrites old webkit + display: vendor-value(box args, only: moz ms webkit) + display: vendor-value(arguments, only: webkit official) // overwrites old webkit else - display: type + display: arguments /* * New syntax for browsers like Google Chrome. @@ -39,14 +39,14 @@ align-items(align) else if flex-end == align align = end vendor('box-align', align, ignore: official) - - // new + + // new vendor('align-items', arguments, only: webkit official) flex(growth) // obsolete vendor('box-flex', growth) - + // new vendor('flex', arguments, only: webkit official) @@ -58,7 +58,7 @@ flex-direction(direction) vendor('box-orient', horizontal, ignore: official) else if column == direction || column-reverse == direction vendor('box-orient', vertical, ignore: official) - + // new vendor('flex-direction', arguments, only: webkit official) @@ -66,20 +66,20 @@ flex-flow(direction) // obsolete if row-reverse == direction || column-reverse == direction || wrap-reverse == direction vendor('box-direction', 'reverse', ignore: official) - + // new vendor('flex-flow', arguments, only: webkit official) flex-grow(growth) // obsolete vendor('box-flex', growth) - + // new vendor('flex-grow', arguments, only: webkit official) order() // obsolete vendor('box-ordinal-group', arguments, ignore: official) - + // new - vendor('order', arguments, only: webkit official) \ No newline at end of file + vendor('order', arguments, only: webkit official) diff --git a/test/cases/flex.css b/test/cases/flex.css index 72d98c54..38c2ccac 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -24,3 +24,11 @@ section div { -webkit-flex: 1 0; flex: 1 0; } +section { + display: -webkit-box !important; + display: -moz-box !important; + display: -ms-box !important; + display: -webkit-flex !important; + display: box !important; + display: flex !important; +} diff --git a/test/cases/flex.styl b/test/cases/flex.styl index 99d18284..39b58e79 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -5,6 +5,9 @@ section display: flex flex-direction: row - + div - flex: 1 0 \ No newline at end of file + flex: 1 0 + +section + display: flex !important From db6b9f98980f6887e7b74c7f03d314b958ec2128 Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 25 Aug 2012 01:45:07 +0400 Subject: [PATCH 124/254] Preserving importance in augmented borders and border-radiuses, also removed legacy vendor support from border-radiuses, as we dont support them for simple one --- lib/nib/border.styl | 4 ++-- lib/nib/vendor.styl | 19 +++++++++++-------- test/cases/border.css | 3 ++- test/cases/border.styl | 3 ++- test/cases/vendor.border-radius.css | 20 ++++---------------- test/cases/vendor.border-radius.styl | 5 ++++- 6 files changed, 25 insertions(+), 29 deletions(-) diff --git a/lib/nib/border.styl b/lib/nib/border.styl index 16ca210a..b65ffb43 100644 --- a/lib/nib/border.styl +++ b/lib/nib/border.styl @@ -4,8 +4,8 @@ * border: ... */ -border(color) +border(color, args...) if color is a 'color' - border: 1px solid color + border: 1px solid color args else border: arguments diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 51965d02..08786e99 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -479,23 +479,24 @@ text-overflow() * Helper for border-radius(). */ --apply-border-radius(pos) +-apply-border-radius(pos, importance) if length(pos) == 3 // border-radius: y = pos[0] x = pos[1] - vendor('border-radius-%s%s' % pos, pos[2], only: moz) - vendor('border-%s-%s-radius' % pos, pos[2], ignore: moz) + // We don't use moz for simple boder-radius anymore + // vendor('border-radius-%s%s' % pos, pos[2], only: moz) + vendor('border-%s-%s-radius' % pos, pos[2] importance, only: webkit official) else if pos[0] in (top bottom) // border-radius: - -apply-border-radius(pos[0] left pos[1]) - -apply-border-radius(pos[0] right pos[1]) + -apply-border-radius(pos[0] left pos[1], importance) + -apply-border-radius(pos[0] right pos[1], importance) else if pos[0] in (left right) // border-radius: unshift(pos, top); - -apply-border-radius(pos) + -apply-border-radius(pos, importance) pos[0] = bottom - -apply-border-radius(pos) + -apply-border-radius(pos, importance) /* * border-radius supporting vendor prefixes and @@ -515,6 +516,8 @@ text-overflow() border-radius() pos = () augmented = false + importance = arguments[length(arguments) - 1] == !important ? !important : unquote('') + for args in arguments for arg in args if arg is a 'ident' @@ -523,6 +526,6 @@ border-radius() else append(pos, arg) if augmented - -apply-border-radius(pos) + -apply-border-radius(pos, importance) pos = () vendor('border-radius', pos, only: webkit official) unless augmented diff --git a/test/cases/border.css b/test/cases/border.css index 3d3c0563..da89eff2 100644 --- a/test/cases/border.css +++ b/test/cases/border.css @@ -1,5 +1,6 @@ .foo { border: none; border: 1px solid #f00; + border: 1px solid #0f0 !important; border: 1px solid #f00; -} \ No newline at end of file +} diff --git a/test/cases/border.styl b/test/cases/border.styl index 92e5e7b0..f5158aae 100644 --- a/test/cases/border.styl +++ b/test/cases/border.styl @@ -4,4 +4,5 @@ .foo border: none border: red - border: 1px solid red \ No newline at end of file + border: lime !important + border: 1px solid red diff --git a/test/cases/vendor.border-radius.css b/test/cases/vendor.border-radius.css index a9d190c1..82ba9816 100644 --- a/test/cases/vendor.border-radius.css +++ b/test/cases/vendor.border-radius.css @@ -3,54 +3,42 @@ button { border-radius: 1px 2px/3px 4px; } button { - -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; - -o-border-top-left-radius: 10px; - -ms-border-top-left-radius: 10px; border-top-left-radius: 10px; } button { - -moz-border-radius-bottomright: 5px; + -webkit-border-top-left-radius: 10px !important; + border-top-left-radius: 10px !important; +} +button { -webkit-border-bottom-right-radius: 5px; - -o-border-bottom-right-radius: 5px; - -ms-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } button { - -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; - -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; - -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; - -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; - -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; - -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; - -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } diff --git a/test/cases/vendor.border-radius.styl b/test/cases/vendor.border-radius.styl index d4f0b256..12be550f 100644 --- a/test/cases/vendor.border-radius.styl +++ b/test/cases/vendor.border-radius.styl @@ -7,6 +7,9 @@ button button border-radius: top left 10px +button + border-radius: top left 10px !important + button border-radius: bottom right 5px @@ -27,4 +30,4 @@ button prepend(vendor-prefixes, ms, o) button - border-radius: 5px \ No newline at end of file + border-radius: 5px From e44eab4101cb68e1133f8054d054430363a15773 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 28 Aug 2012 13:33:59 -0700 Subject: [PATCH 125/254] Release 0.8.2 --- History.md | 5 +++++ lib/nib.js | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index c992823f..b5a58fbc 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.8.2 / 2012-08-28 +================== + + * fix `!important` preservation for all mixins [kizu] + 0.8.1 / 2012-08-21 ================== diff --git a/lib/nib.js b/lib/nib.js index cba6f1b2..5d02791e 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -31,7 +31,7 @@ try { * Library version. */ -exports.version = '0.8.0'; +exports.version = '0.8.2'; /** * Stylus path. diff --git a/package.json b/package.json index 5c0aa182..9c0c8b54 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.8.1", + "version": "0.8.2", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 715b40a9013c445a8157c3d03ae4faaf7970c46c Mon Sep 17 00:00:00 2001 From: bolasblack Date: Fri, 31 Aug 2012 14:33:22 +0800 Subject: [PATCH 126/254] add text-size-adjust vendor --- lib/nib/vendor.styl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 67f73873..35bd627c 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -415,6 +415,12 @@ overflow-scrolling() text-overflow() vendor('text-overflow', arguments, only: official o) +/* + * Vendor "text-size-adjust" support. + */ +text-size-adjust() + vendor('text-size-adjust', arguments, only: official webkit ms) + /* * Helper for border-radius(). */ From 0f256987e564921bb42e346da70f7f2aef5c63a6 Mon Sep 17 00:00:00 2001 From: evergreenv Date: Sun, 2 Sep 2012 22:56:59 +0600 Subject: [PATCH 127/254] Added official appearance property. --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 988a2ef4..1c2006b6 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -452,7 +452,7 @@ hyphens() */ appearance() - vendor('appearance', arguments, only: webkit moz) + vendor('appearance', arguments, only: webkit moz official) /* * Vendor "tab-size" support. From c389d9a63e2e03c6a202e1b055527c66a79a144e Mon Sep 17 00:00:00 2001 From: cpojer Date: Sun, 21 Oct 2012 04:30:34 +0200 Subject: [PATCH 128/254] Only assign 'support-for-ie' if it is not defined already. --- lib/nib/config.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/config.styl b/lib/nib/config.styl index 5ff9079b..42d7c3d3 100644 --- a/lib/nib/config.styl +++ b/lib/nib/config.styl @@ -2,7 +2,7 @@ * Support for ie defaulting to true. */ -support-for-ie = true +support-for-ie ?= true /* * Default vendor prefixes. From a3159f4e1f4a2c401cd71a26d7a92d35c03447ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Tiigi?= Date: Fri, 26 Oct 2012 15:31:48 +0300 Subject: [PATCH 129/254] Fix appearance test --- test/cases/vendor.css | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 3a592d1d..a1b9f725 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -45,6 +45,7 @@ button { button { -webkit-appearance: none; -moz-appearance: none; + appearance: none; } section { -webkit-column-count: 2; From 545c9d13b96ff47c69723bdea849dfbb58f31dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Tiigi?= Date: Fri, 26 Oct 2012 15:48:46 +0300 Subject: [PATCH 130/254] Fix duplicate box-flex properties --- lib/nib/flex.styl | 2 +- lib/nib/vendor.styl | 2 +- test/cases/flex.css | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 4f81e209..5e2002ed 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -45,7 +45,7 @@ align-items(align) flex(growth) // obsolete - vendor('box-flex', growth) + box-flex growth // new vendor('flex', arguments, only: webkit official) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 1c2006b6..ae1a0723 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -338,7 +338,7 @@ box-orient() */ box-flex() - vendor('box-flex', arguments, only: webkit moz ms official) + vendor('box-flex', arguments, only: webkit moz o ms official) /* * Vendor "box-flex-group" support. diff --git a/test/cases/flex.css b/test/cases/flex.css index 38c2ccac..113def13 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -17,9 +17,6 @@ section div { -moz-box-flex: 1; -o-box-flex: 1; -ms-box-flex: 1; - -webkit-box-flex: 1; - -moz-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: 1 0; flex: 1 0; From 956bae9becff0698f7878cb883a69ebda4ba411d Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 23 Nov 2012 18:52:55 -0600 Subject: [PATCH 131/254] Conditional flex output --- lib/nib/flex.styl | 80 +++++++++++++++++++++++++++----------------- test/cases/flex.css | 37 ++++++++++++++++++++ test/cases/flex.styl | 26 ++++++++++++++ 3 files changed, 113 insertions(+), 30 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 5e2002ed..eac445c2 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -2,10 +2,12 @@ * Vendor "display: flex" support with fallback to obsolete versions. */ +flex-version ?= box flex + display(type, args...) if flex == type || inline-flex == type - display: vendor-value(box args, only: moz ms webkit) - display: vendor-value(arguments, only: webkit official) // overwrites old webkit + display: vendor-value(box args, only: moz ms webkit) if box in flex-version + display: vendor-value(arguments, only: webkit official) if flex in flex-version // overwrites old webkit else display: arguments @@ -15,71 +17,89 @@ display(type, args...) */ align-content() - vendor('align-content', arguments, only: webkit official) + if flex in flex-version + vendor('align-content', arguments, only: webkit official) align-self() - vendor('align-self', arguments, only: webkit official) + if flex in flex-version + vendor('align-self', arguments, only: webkit official) flex-basis() - vendor('flex-basis', arguments, only: webkit official) + if flex in flex-version + vendor('flex-basis', arguments, only: webkit official) flex-shrink() - vendor('flex-shrink', arguments, only: webkit official) + if flex in flex-version + vendor('flex-shrink', arguments, only: webkit official) flex-wrap() - vendor('flex-wrap', arguments, only: webkit official) + if flex in flex-version + vendor('flex-wrap', arguments, only: webkit official) justify-content() - vendor('justify-content', arguments, only: webkit official) + if flex in flex-version + vendor('justify-content', arguments, only: webkit official) align-items(align) // obsolete - if flex-start == align - align = start - else if flex-end == align - align = end - vendor('box-align', align, ignore: official) + if box in flex-version + if flex-start == align + align = start + else if flex-end == align + align = end + vendor('box-align', align, ignore: official) // new - vendor('align-items', arguments, only: webkit official) + if flex in flex-version + vendor('align-items', arguments, only: webkit official) flex(growth) // obsolete - box-flex growth + if box in flex-version + box-flex growth // new - vendor('flex', arguments, only: webkit official) + if flex in flex-version + vendor('flex', arguments, only: webkit official) flex-direction(direction) // obsolete - if row-reverse == direction || column-reverse == direction - vendor('box-direction', reverse, ignore: official) - if row == direction || row-reverse == direction - vendor('box-orient', horizontal, ignore: official) - else if column == direction || column-reverse == direction - vendor('box-orient', vertical, ignore: official) + if box in flex-version + if row-reverse == direction || column-reverse == direction + vendor('box-direction', reverse, ignore: official) + if row == direction || row-reverse == direction + vendor('box-orient', horizontal, ignore: official) + else if column == direction || column-reverse == direction + vendor('box-orient', vertical, ignore: official) // new - vendor('flex-direction', arguments, only: webkit official) + if flex in flex-version + vendor('flex-direction', arguments, only: webkit official) flex-flow(direction) // obsolete - if row-reverse == direction || column-reverse == direction || wrap-reverse == direction - vendor('box-direction', 'reverse', ignore: official) + if box in flex-version + if row-reverse == direction || column-reverse == direction || wrap-reverse == direction + vendor('box-direction', 'reverse', ignore: official) // new - vendor('flex-flow', arguments, only: webkit official) + if flex in flex-version + vendor('flex-flow', arguments, only: webkit official) flex-grow(growth) // obsolete - vendor('box-flex', growth) + if box in flex-version + vendor('box-flex', growth) // new - vendor('flex-grow', arguments, only: webkit official) + if flex in flex-version + vendor('flex-grow', arguments, only: webkit official) order() // obsolete - vendor('box-ordinal-group', arguments, ignore: official) + if box in flex-version + vendor('box-ordinal-group', arguments, ignore: official) // new - vendor('order', arguments, only: webkit official) + if flex in flex-version + vendor('order', arguments, only: webkit official) diff --git a/test/cases/flex.css b/test/cases/flex.css index 113def13..d68e3b1d 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -29,3 +29,40 @@ section { display: box !important; display: flex !important; } +section { + display: -webkit-box; + display: -moz-box; + display: -ms-box; + display: box; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -o-box-orient: horizontal; + -ms-box-orient: horizontal; +} +section div { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; +} +section { + display: -webkit-box !important; + display: -moz-box !important; + display: -ms-box !important; + display: box !important; +} +section { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + flex-direction: row; +} +section div { + -webkit-flex: 1 0; + flex: 1 0; +} +section { + display: -webkit-flex !important; + display: flex !important; +} diff --git a/test/cases/flex.styl b/test/cases/flex.styl index 39b58e79..673db667 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -11,3 +11,29 @@ section section display: flex !important + +// Obsolete property conditional rendering +flex-version = box + +section + display: flex + flex-direction: row + + div + flex: 1 0 + +section + display: flex !important + +// New property conditional rendering +flex-version = flex + +section + display: flex + flex-direction: row + + div + flex: 1 0 + +section + display: flex !important From 903a43b0a67995146404945343bde47b782abdb5 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 23 Nov 2012 19:46:57 -0600 Subject: [PATCH 132/254] Add display value spec reference --- lib/nib/flex.styl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index eac445c2..abbb3977 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -4,6 +4,10 @@ flex-version ?= box flex +// +// 1. Display values +// - http://www.w3.org/TR/css3-flexbox/#flex-containers +// display(type, args...) if flex == type || inline-flex == type display: vendor-value(box args, only: moz ms webkit) if box in flex-version From a962d5dd73f023a3e158b9dd651197b33bed4b68 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 23 Nov 2012 19:57:05 -0600 Subject: [PATCH 133/254] Add flex-flow box properties support --- lib/nib/flex.styl | 41 +++++++++++++++++++++++++++++++---------- test/cases/flex.css | 36 ++++++++++++++++++++++++++++++++++++ test/cases/flex.styl | 5 +++++ 3 files changed, 72 insertions(+), 10 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index abbb3977..1618edac 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -36,10 +36,6 @@ flex-shrink() if flex in flex-version vendor('flex-shrink', arguments, only: webkit official) -flex-wrap() - if flex in flex-version - vendor('flex-wrap', arguments, only: webkit official) - justify-content() if flex in flex-version vendor('justify-content', arguments, only: webkit official) @@ -66,25 +62,50 @@ flex(growth) if flex in flex-version vendor('flex', arguments, only: webkit official) -flex-direction(direction) - // obsolete +// +// 5. Ordering and Orientation +// - http://www.w3.org/TR/css3-flexbox/#ordering-and-orientation +// +-flex-obsolete-direction(direction) if box in flex-version if row-reverse == direction || column-reverse == direction vendor('box-direction', reverse, ignore: official) + if row == direction || row-reverse == direction vendor('box-orient', horizontal, ignore: official) else if column == direction || column-reverse == direction vendor('box-orient', vertical, ignore: official) +-flex-obsolete-wrap(value) + if box in flex-version + // WARN: wrap-reverse does not have a box equivalent. This will render in different manners + // on box vs. flex values. + if 'wrap' == value || wrap-reverse == value + vendor('box-lines', multiple, ignore: official) + else if nowrap == value + vendor('box-lines', single, ignore: official) + +flex-direction(direction) + // obsolete + -flex-obsolete-direction(direction) + // new if flex in flex-version vendor('flex-direction', arguments, only: webkit official) -flex-flow(direction) +flex-wrap(wrap) // obsolete - if box in flex-version - if row-reverse == direction || column-reverse == direction || wrap-reverse == direction - vendor('box-direction', 'reverse', ignore: official) + -flex-obsolete-wrap(wrap) + + if flex in flex-version + vendor('flex-wrap', arguments, only: webkit official) + +flex-flow() + // obsolete + -flex-obsolete-direction(arguments[0]) + -flex-obsolete-direction(arguments[1]) + -flex-obsolete-wrap(arguments[0]) + -flex-obsolete-wrap(arguments[1]) // new if flex in flex-version diff --git a/test/cases/flex.css b/test/cases/flex.css index d68e3b1d..3b3228b6 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -21,6 +21,42 @@ section div { -webkit-flex: 1 0; flex: 1 0; } +flex-flow { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -o-box-direction: reverse; + -ms-box-direction: reverse; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -o-box-orient: horizontal; + -ms-box-orient: horizontal; + -webkit-flex-flow: row-reverse; + flex-flow: row-reverse; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -o-box-orient: horizontal; + -ms-box-orient: horizontal; + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -o-box-lines: multiple; + -ms-box-lines: multiple; + -webkit-flex-flow: row wrap; + flex-flow: row wrap; + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -o-box-direction: reverse; + -ms-box-direction: reverse; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -ms-box-orient: vertical; + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -o-box-lines: multiple; + -ms-box-lines: multiple; + -webkit-flex-flow: wrap-reverse column-reverse; + flex-flow: wrap-reverse column-reverse; +} section { display: -webkit-box !important; display: -moz-box !important; diff --git a/test/cases/flex.styl b/test/cases/flex.styl index 673db667..c7261c61 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -9,6 +9,11 @@ section div flex: 1 0 +flex-flow + flex-flow row-reverse + flex-flow row wrap + flex-flow wrap-reverse column-reverse + section display: flex !important From bf878d99c5cd92951676f181dda63b3fd49fce86 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 23 Nov 2012 20:04:19 -0600 Subject: [PATCH 134/254] Update alignment mapping/tests --- lib/nib/flex.styl | 69 +++++++++++++++++++++++++++++--------------- test/cases/flex.css | 52 +++++++++++++++++++++++++++++++++ test/cases/flex.styl | 12 ++++++++ 3 files changed, 109 insertions(+), 24 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 1618edac..e55a2f1a 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -20,13 +20,6 @@ display(type, args...) * Plus a translation to the old syntax, if possible. */ -align-content() - if flex in flex-version - vendor('align-content', arguments, only: webkit official) - -align-self() - if flex in flex-version - vendor('align-self', arguments, only: webkit official) flex-basis() if flex in flex-version @@ -36,23 +29,6 @@ flex-shrink() if flex in flex-version vendor('flex-shrink', arguments, only: webkit official) -justify-content() - if flex in flex-version - vendor('justify-content', arguments, only: webkit official) - -align-items(align) - // obsolete - if box in flex-version - if flex-start == align - align = start - else if flex-end == align - align = end - vendor('box-align', align, ignore: official) - - // new - if flex in flex-version - vendor('align-items', arguments, only: webkit official) - flex(growth) // obsolete if box in flex-version @@ -128,3 +104,48 @@ order() // new if flex in flex-version vendor('order', arguments, only: webkit official) + + +// +// 8. Alignment +// - http://www.w3.org/TR/css3-flexbox/#alignment +// +justify-content(align) + // obsolete + if box in flex-version + if flex-start == align + align = start + else if flex-end == align + align = end + else if space-around == align || space-between == align + // WARN: space-around does not match exactly to the align pack method but this is the + // closest option available. + align = justify + vendor('box-pack', align, ignore: official) + + // new + if flex in flex-version + vendor('justify-content', arguments, only: webkit official) + +align-items(align) + // obsolete + if box in flex-version + if flex-start == align + align = start + else if flex-end == align + align = end + vendor('box-align', align, ignore: official) + + // new + if flex in flex-version + vendor('align-items', arguments, only: webkit official) + +align-self() + // WARN: Obsolete spec does not allow for overriding alignment on individual items. + if flex in flex-version + vendor('align-self', arguments, only: webkit official) + +align-content() + // WARN: Obsolete spec does not allow for adjustment here + if flex in flex-version + vendor('align-content', arguments, only: webkit official) diff --git a/test/cases/flex.css b/test/cases/flex.css index 3b3228b6..bec7ad01 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -57,6 +57,58 @@ flex-flow { -webkit-flex-flow: wrap-reverse column-reverse; flex-flow: wrap-reverse column-reverse; } +justify-content { + -webkit-box-pack: start; + -moz-box-pack: start; + -o-box-pack: start; + -ms-box-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-box-pack: end; + -moz-box-pack: end; + -o-box-pack: end; + -ms-box-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; + -webkit-box-pack: center; + -moz-box-pack: center; + -o-box-pack: center; + -ms-box-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-pack: justify; + -moz-box-pack: justify; + -o-box-pack: justify; + -ms-box-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-pack: justify; + -moz-box-pack: justify; + -o-box-pack: justify; + -ms-box-pack: justify; + -webkit-justify-content: space-around; + justify-content: space-around; +} +align-items { + -webkit-box-align: start; + -moz-box-align: start; + -o-box-align: start; + -ms-box-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-box-align: end; + -moz-box-align: end; + -o-box-align: end; + -ms-box-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; + -webkit-box-align: center; + -moz-box-align: center; + -o-box-align: center; + -ms-box-align: center; + -webkit-align-items: center; + align-items: center; +} section { display: -webkit-box !important; display: -moz-box !important; diff --git a/test/cases/flex.styl b/test/cases/flex.styl index c7261c61..e5a82b88 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -14,6 +14,18 @@ flex-flow flex-flow row wrap flex-flow wrap-reverse column-reverse +justify-content + justify-content flex-start + justify-content flex-end + justify-content center + justify-content space-between + justify-content space-around + +align-items + align-items flex-start + align-items flex-end + align-items center + section display: flex !important From 467d80697f42190079831ad85354149c5a83f476 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 23 Nov 2012 22:59:35 -0600 Subject: [PATCH 135/254] is-width helper method --- lib/nib/vendor.styl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index ae1a0723..32e687bc 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -13,6 +13,19 @@ no-wrap = unquote('nowrap') is-comma-list() return match('\), \(', ''+arguments) +/* + * Helper to find out if a given value is a width + */ + +is-width(val) + if auto == val + return true + else if val && 'unit' == type(val) + // Stylus does not short circuit so we need to perform this as a distinct + // operation to prevent errors + return '' != unit(val) + return false + /* * Literal joining */ From 5c2f1d1c69c013970235950fcd6b3cf35b0d7c87 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 23 Nov 2012 23:00:09 -0600 Subject: [PATCH 136/254] Update flexibility overrides --- lib/nib/flex.styl | 67 ++++++++++++++++++++++++++++++-------------- test/cases/flex.css | 58 ++++++++++++++++++++++++++++++++++++++ test/cases/flex.styl | 10 +++++++ 3 files changed, 114 insertions(+), 21 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index e55a2f1a..fb78af6a 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -21,23 +21,6 @@ display(type, args...) */ -flex-basis() - if flex in flex-version - vendor('flex-basis', arguments, only: webkit official) - -flex-shrink() - if flex in flex-version - vendor('flex-shrink', arguments, only: webkit official) - -flex(growth) - // obsolete - if box in flex-version - box-flex growth - - // new - if flex in flex-version - vendor('flex', arguments, only: webkit official) - // // 5. Ordering and Orientation // - http://www.w3.org/TR/css3-flexbox/#ordering-and-orientation @@ -87,6 +70,20 @@ flex-flow() if flex in flex-version vendor('flex-flow', arguments, only: webkit official) +order() + // obsolete + if box in flex-version + vendor('box-ordinal-group', arguments, ignore: official) + + // new + if flex in flex-version + vendor('order', arguments, only: webkit official) + + +// +// 7. Flexibility +// - http://www.w3.org/TR/css3-flexbox/#flexibility +// flex-grow(growth) // obsolete if box in flex-version @@ -96,15 +93,43 @@ flex-grow(growth) if flex in flex-version vendor('flex-grow', arguments, only: webkit official) -order() +flex-basis() + if flex in flex-version + vendor('flex-basis', arguments, only: webkit official) + +flex-shrink() + if flex in flex-version + vendor('flex-shrink', arguments, only: webkit official) + +flex(growth) + // obsolete if box in flex-version - vendor('box-ordinal-group', arguments, ignore: official) + if none == growth + growth = 0 + else if initial == growth + growth = 1 + else if is-width(growth) == true + // Basis is defined as the first parameter + if 1 == length(arguments) + growth = 1 + else if 2 == length(arguments) + growth = max(arguments[1], 1) + else + growth = max(arguments[1], arguments[2]) + else + shrink = arguments[1] + if is-width(shrink) == true || 1 == length(arguments) + // Basis is defined in the second parameter + growth = max(growth, 1) + else + growth = max(growth, shrink) + + box-flex growth // new if flex in flex-version - vendor('order', arguments, only: webkit official) - + vendor('flex', arguments, only: webkit official) // // 8. Alignment diff --git a/test/cases/flex.css b/test/cases/flex.css index bec7ad01..9727621c 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -109,6 +109,64 @@ align-items { -webkit-align-items: center; align-items: center; } +flex { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + -webkit-flex: 0 auto; + flex: 0 auto; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + -webkit-flex: auto 0; + flex: auto 0; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + -webkit-flex: initial; + flex: initial; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + -webkit-flex: auto; + flex: auto; + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + -ms-box-flex: 0; + box-flex: 0; + -webkit-flex: none; + flex: none; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + -webkit-flex: 1; + flex: 1; + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + -ms-box-flex: 0; + box-flex: 0; + -webkit-flex: 0px 0 0; + flex: 0px 0 0; + -webkit-box-flex: 2; + -moz-box-flex: 2; + -o-box-flex: 2; + -ms-box-flex: 2; + box-flex: 2; + -webkit-flex: 1 2 0; + flex: 1 2 0; +} section { display: -webkit-box !important; display: -moz-box !important; diff --git a/test/cases/flex.styl b/test/cases/flex.styl index e5a82b88..251d4285 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -26,6 +26,16 @@ align-items align-items flex-end align-items center +flex + flex 0 auto + flex auto 0 + flex initial + flex auto + flex none + flex 1 + flex 0px 0 0 + flex 1 2 0 + section display: flex !important From f9fbcac33a9f643a789fcc782a6723ad2f5136b4 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Sat, 24 Nov 2012 03:32:31 -0600 Subject: [PATCH 137/254] Simplify and doc the flex logic --- lib/nib/flex.styl | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index fb78af6a..74a0fbc1 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -105,27 +105,23 @@ flex(growth) // obsolete if box in flex-version - if none == growth + shrink = 1 + + if none == growth || initial == growth + // Well known values + shrink = 0 if none == growth growth = 0 - else if initial == growth - growth = 1 else if is-width(growth) == true // Basis is defined as the first parameter - if 1 == length(arguments) - growth = 1 - else if 2 == length(arguments) - growth = max(arguments[1], 1) - else - growth = max(arguments[1], arguments[2]) - else + growth = arguments[1] || 0 + shrink = arguments[2] if 3 <= length(arguments) + else if arguments[1] && is-width(arguments[1]) == false + // Growth is first and shrink is second shrink = arguments[1] - if is-width(shrink) == true || 1 == length(arguments) - // Basis is defined in the second parameter - growth = max(growth, 1) - else - growth = max(growth, shrink) - box-flex growth + // Since we can't make the distinction between growing and shrinking in the box model, take + // the one that provides the most flexibility. + box-flex max(growth, shrink) // new if flex in flex-version From 12356aad2b468e2b8f2e66be80520565e30cd13c Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sat, 24 Nov 2012 10:10:04 -0800 Subject: [PATCH 138/254] Release 0.9.0 --- History.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index b5a58fbc..4dc6f83e 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +0.9.0 / 2012-11-24 +================== + + * flex box update + 0.8.2 / 2012-08-28 ================== diff --git a/package.json b/package.json index 9c0c8b54..ac1adbfc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.8.2", + "version": "0.9.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From a47ebd785d722f193490deb786986cc0cabe1ad6 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Mon, 10 Dec 2012 12:47:25 -0800 Subject: [PATCH 139/254] fix call stack explosion when using `flex-wrap: wrap` --- lib/nib/flex.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 74a0fbc1..4133dd57 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -52,9 +52,9 @@ flex-direction(direction) if flex in flex-version vendor('flex-direction', arguments, only: webkit official) -flex-wrap(wrap) +flex-wrap(value) // obsolete - -flex-obsolete-wrap(wrap) + -flex-obsolete-wrap(value) if flex in flex-version vendor('flex-wrap', arguments, only: webkit official) From 341dd6027f1b92d9c5a5652be21fac89f4401ddb Mon Sep 17 00:00:00 2001 From: Tom Stoecklein Date: Fri, 14 Dec 2012 07:33:57 -0500 Subject: [PATCH 140/254] Vendor font-smoothing property For the time being, it's webkit only. --- lib/nib/vendor.styl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 32e687bc..714eac4f 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -494,6 +494,12 @@ text-overflow() text-size-adjust() vendor('text-size-adjust', arguments, only: official webkit ms) +/* + * Vendor "font-smoothing" support, webkit only. + */ +font-smoothing() + vendor('font-smoothing', arguments, only: webkit) + /* * Helper for border-radius(). */ From 67502b362559cc6b1ddc048a0cb2144fdf01a614 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 28 Dec 2012 01:30:09 -0800 Subject: [PATCH 141/254] Quote -ms-filter selector value From Microsoft documentation: `When you use -ms-filter, enclose the progid in single quotes (') or double quotes (")` This is because the stuff after -ms-filter has a colon in it, which is non-standard CSS sytnax. --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 714eac4f..9d50f1e7 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -315,8 +315,8 @@ opacity(n, args...) -ms-filter: none filter: none else - -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)' % val args filter: 'alpha(opacity=%s)' % val args + -ms-filter: '"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)"' % val args /* * Vendor "text-size-adjust" From 9c5425222775ce19b9922429e290cf603086accb Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 4 Jan 2013 11:09:26 -0800 Subject: [PATCH 142/254] Release 0.9.1 --- History.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 4dc6f83e..a974e633 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,11 @@ +0.9.1 / 2013-01-04 +================== + + * Quote -ms-filter selector value + * Vendor font-smoothing property + * fix call stack explosion when using `flex-wrap: wrap` + 0.9.0 / 2012-11-24 ================== diff --git a/package.json b/package.json index ac1adbfc..78f8da39 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.9.0", + "version": "0.9.1", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From fb4da6c9203e404c020b3b167ae7e73219b0890c Mon Sep 17 00:00:00 2001 From: Simen Brekken Date: Mon, 4 Feb 2013 13:59:30 +0100 Subject: [PATCH 143/254] Don't specify percentage unit for zero values --- lib/nib/gradients.styl | 18 ++++----- test/cases/linear-gradient.css | 72 +++++++++++++++++----------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index 04936c10..3bbff794 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -39,14 +39,14 @@ pos-in-stops(i, stops) else if i unit(i / len * 100, '%') else - 0% + 0 /* * Normalize color stops: - * + * * - (color pos) -> (pos color) * - (color) -> (implied-pos color) - * + * */ normalize-stops(stops) @@ -88,19 +88,19 @@ webkit-stop(color, pos) */ std-stop(color, pos) - '%s %s' % (color pos) + '%s %s' % (color pos) /* * Create a linear gradient with the given start position * and variable number of color stops. - * + * * Examples: - * + * * background: linear-gradient(top, red, green, blue) * background: linear-gradient(bottom, red, green 50%, blue) * background: linear-gradient(bottom, red, 50% green, blue) * background: linear-gradient(bottom, red, 50% green, 90% white, blue) - * + * */ linear-gradient(start, stops...) @@ -130,10 +130,10 @@ linear-gradient(start, stops...) stops = join-stops(stops, std-stop) for prefix in vendor-prefixes unless prefix == official - gradient = '-%s-linear-gradient(%s, %s)' % (prefix start stops) + gradient = '-%s-linear-gradient(%s, %s)' % (prefix start stops) add-property(prop, replace(val, '__CALL__', gradient)) - // standard + // standard 'linear-gradient(%s, %s)' % (start stops) /* diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index d37939f8..2a98cab9 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -1,56 +1,56 @@ body { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); - background: -webkit-linear-gradient(top, #fff 0%, #000 100%); - background: -moz-linear-gradient(top, #fff 0%, #000 100%); - background: -o-linear-gradient(top, #fff 0%, #000 100%); - background: -ms-linear-gradient(top, #fff 0%, #000 100%); - background: linear-gradient(top, #fff 0%, #000 100%); + background: -webkit-linear-gradient(top, #fff 0, #000 100%); + background: -moz-linear-gradient(top, #fff 0, #000 100%); + background: -o-linear-gradient(top, #fff 0, #000 100%); + background: -ms-linear-gradient(top, #fff 0, #000 100%); + background: linear-gradient(top, #fff 0, #000 100%); } body { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); - background: -webkit-linear-gradient(top, #fff 0%, #000 100%); - background: -moz-linear-gradient(top, #fff 0%, #000 100%); - background: -o-linear-gradient(top, #fff 0%, #000 100%); - background: -ms-linear-gradient(top, #fff 0%, #000 100%); - background: linear-gradient(top, #fff 0%, #000 100%); + background: -webkit-linear-gradient(top, #fff 0, #000 100%); + background: -moz-linear-gradient(top, #fff 0, #000 100%); + background: -o-linear-gradient(top, #fff 0, #000 100%); + background: -ms-linear-gradient(top, #fff 0, #000 100%); + background: linear-gradient(top, #fff 0, #000 100%); } body { background: -webkit-gradient(linear, left top, right bottom, color-stop(0, #fff), color-stop(0.25, #f00), color-stop(0.5, #00f), color-stop(1, #000)); - background: -webkit-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); - background: -moz-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); - background: -o-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); - background: -ms-linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); - background: linear-gradient(top left, #fff 0%, #f00 25%, #00f 50%, #000 100%); + background: -webkit-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); + background: -moz-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); + background: -o-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); + background: -ms-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); + background: linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); } body { background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); - background: -webkit-linear-gradient(bottom right, #fff 0%, #000 80%); - background: -moz-linear-gradient(bottom right, #fff 0%, #000 80%); - background: -o-linear-gradient(bottom right, #fff 0%, #000 80%); - background: -ms-linear-gradient(bottom right, #fff 0%, #000 80%); - background: linear-gradient(bottom right, #fff 0%, #000 80%); + background: -webkit-linear-gradient(bottom right, #fff 0, #000 80%); + background: -moz-linear-gradient(bottom right, #fff 0, #000 80%); + background: -o-linear-gradient(bottom right, #fff 0, #000 80%); + background: -ms-linear-gradient(bottom right, #fff 0, #000 80%); + background: linear-gradient(bottom right, #fff 0, #000 80%); } body { background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); - background: -webkit-linear-gradient(right bottom, #fff 0%, #000 80%); - background: -moz-linear-gradient(right bottom, #fff 0%, #000 80%); - background: -o-linear-gradient(right bottom, #fff 0%, #000 80%); - background: -ms-linear-gradient(right bottom, #fff 0%, #000 80%); - background: linear-gradient(right bottom, #fff 0%, #000 80%); + background: -webkit-linear-gradient(right bottom, #fff 0, #000 80%); + background: -moz-linear-gradient(right bottom, #fff 0, #000 80%); + background: -o-linear-gradient(right bottom, #fff 0, #000 80%); + background: -ms-linear-gradient(right bottom, #fff 0, #000 80%); + background: linear-gradient(right bottom, #fff 0, #000 80%); } body { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); - background: -webkit-linear-gradient(top, #fff 0%, #000 100%); - background: -moz-linear-gradient(top, #fff 0%, #000 100%); - background: -ms-linear-gradient(top, #fff 0%, #000 100%); - background: -o-linear-gradient(top, #fff 0%, #000 100%); - background: linear-gradient(top, #fff 0%, #000 100%); + background: -webkit-linear-gradient(top, #fff 0, #000 100%); + background: -moz-linear-gradient(top, #fff 0, #000 100%); + background: -ms-linear-gradient(top, #fff 0, #000 100%); + background: -o-linear-gradient(top, #fff 0, #000 100%); + background: linear-gradient(top, #fff 0, #000 100%); } body { background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)), #fff; - background: -webkit-linear-gradient(top, #fff 0%, #000 100%), #fff; - background: -moz-linear-gradient(top, #fff 0%, #000 100%), #fff; - background: -ms-linear-gradient(top, #fff 0%, #000 100%), #fff; - background: -o-linear-gradient(top, #fff 0%, #000 100%), #fff; - background: linear-gradient(top, #fff 0%, #000 100%), #fff; -} \ No newline at end of file + background: -webkit-linear-gradient(top, #fff 0, #000 100%), #fff; + background: -moz-linear-gradient(top, #fff 0, #000 100%), #fff; + background: -ms-linear-gradient(top, #fff 0, #000 100%), #fff; + background: -o-linear-gradient(top, #fff 0, #000 100%), #fff; + background: linear-gradient(top, #fff 0, #000 100%), #fff; +} From 97d7d6be357e57a1e55b33c25896862cde727776 Mon Sep 17 00:00:00 2001 From: Glenn Jorde Date: Mon, 11 Mar 2013 20:55:22 +0100 Subject: [PATCH 144/254] Add
element to html5 reset --- lib/nib/reset.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/reset.styl b/lib/nib/reset.styl index ede92773..e06db691 100644 --- a/lib/nib/reset.styl +++ b/lib/nib/reset.styl @@ -67,7 +67,7 @@ reset-table-cell() reset-html5() article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, - section, summary + section, summary, main reset-box-model() display: block audio, canvas, video From 5f6e393e33eb0bdb94844389f0afd12205e97c1d Mon Sep 17 00:00:00 2001 From: artico Date: Thu, 14 Mar 2013 12:17:59 +0700 Subject: [PATCH 145/254] Size utility Shorthand for width and height --- lib/nib/index.styl | 1 + lib/nib/size.styl | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 lib/nib/size.styl diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 411e5067..40355fe2 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -10,3 +10,4 @@ @import 'https://github.com/reset' @import 'https://github.com/text' @import 'https://github.com/vendor' +@import 'https://github.com/size' diff --git a/lib/nib/size.styl b/lib/nib/size.styl new file mode 100644 index 00000000..40108b18 --- /dev/null +++ b/lib/nib/size.styl @@ -0,0 +1,17 @@ +/* + * Size utility. + * + * Synopsis: + * + * size: + * + * Examples: + * + * size: 10px 20px + * size: 100% 30px + * + */ + +size(width, height) + width: width + height: height From e76b7729a21ab7db7840becd39ea93d78bfd63f0 Mon Sep 17 00:00:00 2001 From: artico Date: Thu, 14 Mar 2013 12:30:13 +0700 Subject: [PATCH 146/254] Support only one parameter Making square in this case --- lib/nib/size.styl | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/nib/size.styl b/lib/nib/size.styl index 40108b18..fd3aaf62 100644 --- a/lib/nib/size.styl +++ b/lib/nib/size.styl @@ -3,15 +3,26 @@ * * Synopsis: * - * size: + * size: | * * Examples: * - * size: 10px 20px * size: 100% 30px + * yields: + * width: 100% + * height: 30px + * + * size: 5px + * yields: + * width: 5px + * height: 5px * */ -size(width, height) - width: width - height: height +size() + if length(arguments) == 1 + width: arguments[0] + height: arguments[0] + else + width: arguments[0] + height: arguments[1] From f9cb4feb38b22007645a2af6c6eed1c8e48dba10 Mon Sep 17 00:00:00 2001 From: Udo Kramer Date: Sun, 12 May 2013 19:00:43 +0200 Subject: [PATCH 147/254] add min--moz-device-pixel-ratio to make @2x variants work in firefox --- lib/nib/image.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/image.styl b/lib/nib/image.styl index 7aeda332..7703680e 100644 --- a/lib/nib/image.styl +++ b/lib/nib/image.styl @@ -7,7 +7,7 @@ image(path, w = auto, h = auto) background-image: url(https://github.com/path) - @media all and (-webkit-min-device-pixel-ratio: 1.5) + @media all and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5) ext = extname(path) path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext) background-image: url(https://github.com/path) From 72af7b7e19e9f8e61877554805dd56e48fc76d2a Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 13 May 2013 10:14:22 -0600 Subject: [PATCH 148/254] Update Readme.md --- Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.md b/Readme.md index 807a775f..278a1932 100644 --- a/Readme.md +++ b/Readme.md @@ -2,6 +2,8 @@ Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://visionmedia.github.com/nib/). + __NOTE__: seeking a maintainer, please open an issue if you're interested. + ## Installation ```bash From ba19ec2b0c57abb3ec41904c6bc8623630109dc3 Mon Sep 17 00:00:00 2001 From: jade-bot Date: Sun, 26 May 2013 14:59:39 -0700 Subject: [PATCH 149/254] Update to maintain compatability with the latest version of jade --- test/index.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.jade b/test/index.jade index 8e5529c3..c33b385f 100644 --- a/test/index.jade +++ b/test/index.jade @@ -7,7 +7,7 @@ html link(rel='stylesheet', href='https://github.com/clearfix.css') link(rel='stylesheet', href='https://github.com/color-images.css') script(src='https://github.com/jquery.min.js') - script + script. $(function(){ $(':button, :submit, a.button').click(function(){ return false; From e22a0055d08cecd3dfb0e39dc20f9bcb40ecdc46 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 17 Jun 2013 20:02:44 -0400 Subject: [PATCH 150/254] Update Readme.md new maintainer :) --- Readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Readme.md b/Readme.md index 278a1932..807a775f 100644 --- a/Readme.md +++ b/Readme.md @@ -2,8 +2,6 @@ Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://visionmedia.github.com/nib/). - __NOTE__: seeking a maintainer, please open an issue if you're interested. - ## Installation ```bash From 0e1e5364e8164a3de92e5de26e63c8e5efeba22d Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 00:58:41 -0500 Subject: [PATCH 151/254] testing via `npm test` now works and travis ci is setup --- .travis.yml | 3 +++ Makefile | 11 ----------- package.json | 6 +++++- test/mocha.opts | 2 ++ test/server.js | 3 --- 5 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 .travis.yml delete mode 100644 Makefile create mode 100644 test/mocha.opts diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..c2ba3f90 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 6a2a5f9e..00000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --ignore-leaks \ - test/runner.js - -test-server: - @node test/server.js - -.PHONY: test test-server \ No newline at end of file diff --git a/package.json b/package.json index 78f8da39..d4f2c3a0 100644 --- a/package.json +++ b/package.json @@ -16,5 +16,9 @@ }, "author": "TJ Holowaychuk ", "main": "lib/nib.js", - "engines": { "node": "*" } + "engines": { "node": "*" }, + "scripts": { + "test": "mocha", + "test-server": "node test/server.js" + } } diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 00000000..fe915b2f --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1,2 @@ +--require should +test/runner.js \ No newline at end of file diff --git a/test/server.js b/test/server.js index 685cb43b..2b05ae45 100644 --- a/test/server.js +++ b/test/server.js @@ -1,6 +1,3 @@ - -require.paths.unshift(__dirname + '/../support'); - /** * Module dependencies. */ From 3548d1d46c0cefc1ed48420d29fb6b23b1632511 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 01:15:02 -0500 Subject: [PATCH 152/254] added travis status image - visionmedia needs to turn on travis first, though --- Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.md b/Readme.md index 807a775f..3a2078c0 100644 --- a/Readme.md +++ b/Readme.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/visionmedia/nib.png?branch=master)](https://travis-ci.org/visionmedia/nib) + # Nib Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://visionmedia.github.com/nib/). From 20e70bbfd79a4c414f85df68e9258a098058dc81 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 02:41:15 -0500 Subject: [PATCH 153/254] removed empty file --- .gitmodules | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000 From 80533b89c640d1e9bdafcc840f9b4393c3843a9f Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 02:41:30 -0500 Subject: [PATCH 154/254] upgraded stylus --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d4f2c3a0..c55900f4 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "devDependencies": { "connect": "1.x" , "jade": "0.22.0" - , "stylus": "0.28.x" + , "stylus": "0.31.x" , "mocha": "*" , "should": "*" , "canvas": "*" From 3e2c6f370a21f4ff02e40a2192e578587f6f4340 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 02:43:22 -0500 Subject: [PATCH 155/254] added additional vendor prefixes, made min-device-pixel-ratio adjustable, and fixed the image.styl test --- lib/nib/image.styl | 20 +++++++++++++++----- test/cases/image.css | 4 ++-- test/cases/image.styl | 1 - 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/nib/image.styl b/lib/nib/image.styl index 7703680e..260ad390 100644 --- a/lib/nib/image.styl +++ b/lib/nib/image.styl @@ -1,13 +1,23 @@ /* - * Define background-image as `path` - * with optional width and height, - * adding an @2x variant. + * Define background-image as `path` with optional width and height, adding an + * @2x variant. + * + * affected by github.com/LearnBoost/stylus/issues/1050 and + * github.com/LearnBoost/stylus/issues/1038 ... refactor when those are closed */ -image(path, w = auto, h = auto) +image(path, w = auto, h = auto, min_pixel_ratio = 1.5) background-image: url(https://github.com/path) - @media all and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5) + + s = 'all and (-webkit-min-device-pixel-ratio:' + min_pixel_ratio + '),' + s = s + '(min--moz-device-pixel-ratio:' + min_pixel_ratio + '),' + s = s + '(-o-min-device-pixel-ratio:' + min_pixel_ratio + '/1),' + s = s + '(min-device-pixel-ratio:' + min_pixel_ratio + '),' + s = s + '(min-resolution:' + unit(min_pixel_ratio*92, dpi) + '),' + s = s + '(min-resolution:' + unit(min_pixel_ratio, dppx) + ')' + + @media s ext = extname(path) path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext) background-image: url(https://github.com/path) diff --git a/test/cases/image.css b/test/cases/image.css index 9cfd0579..f08242b4 100644 --- a/test/cases/image.css +++ b/test/cases/image.css @@ -1,7 +1,7 @@ #logo { background-image: url("https://github.com/images/branding/logo.main.png"); } -@media all and (-webkit-min-device-pixel-ratio: 1.5) { +@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { #logo { background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: auto auto; @@ -10,7 +10,7 @@ #logo { background-image: url("https://github.com/images/branding/logo.main.png"); } -@media all and (-webkit-min-device-pixel-ratio: 1.5) { +@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { #logo { background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: 50px 100px; diff --git a/test/cases/image.styl b/test/cases/image.styl index 0fb6dff8..29a82d08 100644 --- a/test/cases/image.styl +++ b/test/cases/image.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/image' #logo From a800dc9b1dc8390d4c0ee5cad25a86544c8039f2 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 03:10:40 -0500 Subject: [PATCH 156/254] patch up test to match #156 --- test/cases/importance.css | 2 +- test/cases/vendor.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cases/importance.css b/test/cases/importance.css index bf6ae48e..ab8cf2a3 100644 --- a/test/cases/importance.css +++ b/test/cases/importance.css @@ -129,7 +129,7 @@ font-stretch: condensed !important; font: normal 16px/1.25 Arial, sans-serif !important; opacity: 0.5 !important; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50) !important; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)" !important; filter: alpha(opacity=50) !important; resize: both !important; cursor: pointer !important; diff --git a/test/cases/vendor.css b/test/cases/vendor.css index a1b9f725..79f74b49 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -4,7 +4,7 @@ button { } button { opacity: 0.5; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); } button { From 44ba4cbe2682ab7647c47af9c4faed022eceae5b Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 03:19:15 -0500 Subject: [PATCH 157/254] fixed change in order of rules introduced by #156 --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 9d50f1e7..099919ae 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -315,8 +315,8 @@ opacity(n, args...) -ms-filter: none filter: none else - filter: 'alpha(opacity=%s)' % val args -ms-filter: '"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)"' % val args + filter: 'alpha(opacity=%s)' % val args /* * Vendor "text-size-adjust" From 3920daad1d5f62d7a3e072d630f3fa095acce7e6 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 14:55:43 -0500 Subject: [PATCH 158/254] added official prefix for tab-size and added test - closes #172 --- lib/nib/vendor.styl | 2 +- test/cases/importance.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 099919ae..5691e9c7 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -472,7 +472,7 @@ appearance() */ tab-size() - vendor('tab-size', arguments, only: moz o) + vendor('tab-size', arguments, only: moz o official) /* * Vendor "overflow-scrolling" support. diff --git a/test/cases/importance.css b/test/cases/importance.css index ab8cf2a3..5c089c8a 100644 --- a/test/cases/importance.css +++ b/test/cases/importance.css @@ -115,6 +115,7 @@ word-break: normal !important; -moz-tab-size: 4 !important; -o-tab-size: 4 !important; + tab-size: 4 !important; -webkit-hyphens: manual !important; -moz-hyphens: manual !important; -ms-hyphens: manual !important; From 9001d9a2bf0b03aa5237c11dac5222b8a850858b Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Thu, 20 Jun 2013 02:30:09 -0500 Subject: [PATCH 159/254] Change the package.json dependency file in order to correct the Runtime dependency. The nib.js requires stylus whereas other packages are optionals. --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c55900f4..dc43d97e 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,12 @@ "type": "git", "url": "git://github.com/visionmedia/nib.git" }, + "dependencies" : { + "stylus": "0.31.x" + }, "devDependencies": { "connect": "1.x" , "jade": "0.22.0" - , "stylus": "0.31.x" , "mocha": "*" , "should": "*" , "canvas": "*" From c9146cb989fa2788bbb26fe553c7187780a56254 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Tue, 25 Jun 2013 07:16:43 -0500 Subject: [PATCH 160/254] 0.9.2 --- package.json | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index dc43d97e..9913f1f3 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,26 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.9.1", + "version": "0.9.2", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" }, - "dependencies" : { + "dependencies": { "stylus": "0.31.x" }, "devDependencies": { - "connect": "1.x" - , "jade": "0.22.0" - , "mocha": "*" - , "should": "*" - , "canvas": "*" + "connect": "1.x", + "jade": "0.22.0", + "mocha": "*", + "should": "*", + "canvas": "*" }, "author": "TJ Holowaychuk ", "main": "lib/nib.js", - "engines": { "node": "*" }, + "engines": { + "node": "*" + }, "scripts": { "test": "mocha", "test-server": "node test/server.js" From 83a0caa9bd81e264655c400bf4ef2b06d5c26e32 Mon Sep 17 00:00:00 2001 From: Artem Nezvigin Date: Fri, 28 Jun 2013 16:26:01 -0700 Subject: [PATCH 161/254] Add support for background-size keywords Allows the following syntax: image '/mr-t.png' cover --- lib/nib/image.styl | 2 ++ test/cases/image.css | 20 +++++++++++++++++++- test/cases/image.styl | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/nib/image.styl b/lib/nib/image.styl index 260ad390..4ec22ddf 100644 --- a/lib/nib/image.styl +++ b/lib/nib/image.styl @@ -21,4 +21,6 @@ image(path, w = auto, h = auto, min_pixel_ratio = 1.5) ext = extname(path) path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext) background-image: url(https://github.com/path) + if w in (cover contain) and h == auto + h = null background-size: w h diff --git a/test/cases/image.css b/test/cases/image.css index f08242b4..1c5727b6 100644 --- a/test/cases/image.css +++ b/test/cases/image.css @@ -15,4 +15,22 @@ background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: 50px 100px; } -} \ No newline at end of file +} +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: cover; + } +} +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: contain; + } +} diff --git a/test/cases/image.styl b/test/cases/image.styl index 29a82d08..12b35669 100644 --- a/test/cases/image.styl +++ b/test/cases/image.styl @@ -5,3 +5,9 @@ #logo image: '/images/branding/logo.main.png' 50px 100px + +#logo + image: '/images/branding/logo.main.png' cover + +#logo + image: '/images/branding/logo.main.png' contain From 9055c332e97dcf1905d074cdebfd8ff436ba0d19 Mon Sep 17 00:00:00 2001 From: Alex Zelensky Date: Mon, 1 Jul 2013 19:43:29 +0300 Subject: [PATCH 162/254] Add vendor support for placeholder --- lib/nib/vendor.styl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 5691e9c7..15493075 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -554,3 +554,38 @@ border-radius() -apply-border-radius(pos, importance) pos = () vendor('border-radius', pos, only: webkit official) unless augmented + +/** + * Vendor input-placeholder/placeholder support. + * + * Examples: + * // Default placeholder + * placeholder-body() + * color #333 + * font-weight normal + * body + * placeholder(placeholder-body) + * + * // Red placeholder + * placeholder-red() + * color #f33 + * .placeholder-red + * placeholder(placeholder-red) + * + * // Textarea placeholder + * placeholder-textarea() + * font-style italic + * textarea + * placeholder(placeholder-textarea) + * + */ +input-placeholder(fn) + &::-webkit-input-placeholder // WebKit browsers + fn() + &:-moz-placeholder // Mozilla Firefox 4 to 18 + fn() + &::-moz-placeholder // Mozilla Firefox 19+ + fn() + &:-ms-input-placeholder // Internet Explorer 10+ + fn() +placeholder = input-placeholder \ No newline at end of file From cf4b2c8c7e04102298c044db97cb0708c3f2fd69 Mon Sep 17 00:00:00 2001 From: Alex Zelensky Date: Tue, 2 Jul 2013 02:23:23 +0300 Subject: [PATCH 163/254] Improved vendor placeholder; added test cases --- lib/nib/vendor.styl | 49 +++++++++---------- test/cases/vendor.placeholder.css | 76 ++++++++++++++++++++++++++++++ test/cases/vendor.placeholder.styl | 22 +++++++++ 3 files changed, 121 insertions(+), 26 deletions(-) create mode 100644 test/cases/vendor.placeholder.css create mode 100644 test/cases/vendor.placeholder.styl diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 15493075..49529693 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -559,33 +559,30 @@ border-radius() * Vendor input-placeholder/placeholder support. * * Examples: - * // Default placeholder - * placeholder-body() - * color #333 - * font-weight normal + * // Default syntax * body - * placeholder(placeholder-body) + * placeholder(color #333, font-weight normal) * - * // Red placeholder - * placeholder-red() - * color #f33 + * // The comma is important * .placeholder-red - * placeholder(placeholder-red) - * - * // Textarea placeholder - * placeholder-textarea() - * font-style italic + * placeholder(color red,) + * + * // We can pass a function + * green-placeholder() + * color green + * .placeholder-green + * placeholder(green-placeholder) + * + * // We can pass a hash * textarea - * placeholder(placeholder-textarea) - * - */ -input-placeholder(fn) - &::-webkit-input-placeholder // WebKit browsers - fn() - &:-moz-placeholder // Mozilla Firefox 4 to 18 - fn() - &::-moz-placeholder // Mozilla Firefox 19+ - fn() - &:-ms-input-placeholder // Internet Explorer 10+ - fn() -placeholder = input-placeholder \ No newline at end of file + * placeholder((font-style italic) (font-weight bold) (padding '4px 10px')) + */ +placeholder() + for v in ':-webkit-input' '-moz' ':-moz' '-ms-input' + &:{v}-placeholder + for pair in arguments + if typeof(pair) == 'function' + pair() + else if pair is not null && pair[0] is not null + {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1] +input-placeholder = placeholder \ No newline at end of file diff --git a/test/cases/vendor.placeholder.css b/test/cases/vendor.placeholder.css new file mode 100644 index 00000000..5597cedd --- /dev/null +++ b/test/cases/vendor.placeholder.css @@ -0,0 +1,76 @@ +body::-webkit-input-placeholder { + color: #333; + font-weight: normal; + font-family: Helvetica, arial, sans-serif; +} +body:-moz-placeholder { + color: #333; + font-weight: normal; + font-family: Helvetica, arial, sans-serif; +} +body::-moz-placeholder { + color: #333; + font-weight: normal; + font-family: Helvetica, arial, sans-serif; +} +body:-ms-input-placeholder { + color: #333; + font-weight: normal; + font-family: Helvetica, arial, sans-serif; +} +.placeholder-red::-webkit-input-placeholder { + color: #f00; +} +.placeholder-red:-moz-placeholder { + color: #f00; +} +.placeholder-red::-moz-placeholder { + color: #f00; +} +.placeholder-red:-ms-input-placeholder { + color: #f00; +} +.placeholder-green::-webkit-input-placeholder { + color: #008000; +} +.placeholder-green:-moz-placeholder { + color: #008000; +} +.placeholder-green::-moz-placeholder { + color: #008000; +} +.placeholder-green:-ms-input-placeholder { + color: #008000; +} +.input-placeholder-gray::-webkit-input-placeholder { + color: #808080; +} +.input-placeholder-gray:-moz-placeholder { + color: #808080; +} +.input-placeholder-gray::-moz-placeholder { + color: #808080; +} +.input-placeholder-gray:-ms-input-placeholder { + color: #808080; +} +textarea::-webkit-input-placeholder { + font-style: italic; + font-weight: bold; + padding: 4px 10px; +} +textarea:-moz-placeholder { + font-style: italic; + font-weight: bold; + padding: 4px 10px; +} +textarea::-moz-placeholder { + font-style: italic; + font-weight: bold; + padding: 4px 10px; +} +textarea:-ms-input-placeholder { + font-style: italic; + font-weight: bold; + padding: 4px 10px; +} \ No newline at end of file diff --git a/test/cases/vendor.placeholder.styl b/test/cases/vendor.placeholder.styl new file mode 100644 index 00000000..4820af02 --- /dev/null +++ b/test/cases/vendor.placeholder.styl @@ -0,0 +1,22 @@ + +@import 'https://github.com/nib/vendor' + +$placeholderFont = Helvetica, arial, sans-serif + +body + placeholder(color #333, font-weight normal, font-family $placeholderFont) + +.placeholder-red + placeholder(color red,) + +green-placeholder() + color green +.placeholder-green + placeholder(green-placeholder) + +.input-placeholder-gray + input-placeholder(color gray,) + +textarea + placeholder((font-style italic) (font-weight bold) (padding '4px 10px')) + \ No newline at end of file From dbde113b87a6d15d5f106a15f7620d523ba115b1 Mon Sep 17 00:00:00 2001 From: Udo Kramer Date: Thu, 18 Jul 2013 11:01:54 +0200 Subject: [PATCH 164/254] add node v0.10 to travis config --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c2ba3f90..09d3ef37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ language: node_js node_js: - - 0.8 \ No newline at end of file + - 0.8 + - 0.10 From f99596d83cf66db4bdeed6a580c396d208390de0 Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Wed, 5 Jun 2013 16:01:06 +0200 Subject: [PATCH 165/254] Fixed flex display for IE10 to -ms-flexbox --- lib/nib/flex.styl | 7 +++++-- test/cases/flex.css | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 4133dd57..6c06fc43 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -10,8 +10,11 @@ flex-version ?= box flex // display(type, args...) if flex == type || inline-flex == type - display: vendor-value(box args, only: moz ms webkit) if box in flex-version - display: vendor-value(arguments, only: webkit official) if flex in flex-version // overwrites old webkit + if box in flex-version + display: -ms-flexbox args + display: vendor-value(box args, only: moz webkit) + if flex in flex-version + display: vendor-value(arguments, only: webkit official) // overwrites old webkit else display: arguments diff --git a/test/cases/flex.css b/test/cases/flex.css index 9727621c..7a136dff 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -1,8 +1,8 @@ section { display: -webkit-box; display: -moz-box; - display: -ms-box; display: -webkit-flex; + display: -ms-flexbox; display: box; display: flex; -webkit-box-orient: horizontal; @@ -170,15 +170,15 @@ flex { section { display: -webkit-box !important; display: -moz-box !important; - display: -ms-box !important; display: -webkit-flex !important; + display: -ms-flexbox !important; display: box !important; display: flex !important; } section { display: -webkit-box; display: -moz-box; - display: -ms-box; + display: -ms-flexbox; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; @@ -195,7 +195,7 @@ section div { section { display: -webkit-box !important; display: -moz-box !important; - display: -ms-box !important; + display: -ms-flexbox !important; display: box !important; } section { From 0407eed5a56511fbaaf4482a448603d4bdf16a39 Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Wed, 5 Jun 2013 17:12:22 +0200 Subject: [PATCH 166/254] Switched to using 'flex' version in flex method for IE10 --- lib/nib/flex.styl | 4 ++-- lib/nib/vendor.styl | 7 ------- test/cases/flex.css | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 6c06fc43..cef2ea3a 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -124,11 +124,11 @@ flex(growth) // Since we can't make the distinction between growing and shrinking in the box model, take // the one that provides the most flexibility. - box-flex max(growth, shrink) + vendor('box-flex', max(growth, shrink), ignore: ms) // new if flex in flex-version - vendor('flex', arguments, only: webkit official) + vendor('flex', arguments, only: webkit ms official) // // 8. Alignment diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 49529693..775e1260 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -346,13 +346,6 @@ box-sizing() box-orient() vendor('box-orient', arguments, only: webkit moz ms official) -/* - * Vendor "box-flex" support. - */ - -box-flex() - vendor('box-flex', arguments, only: webkit moz o ms official) - /* * Vendor "box-flex-group" support. */ diff --git a/test/cases/flex.css b/test/cases/flex.css index 7a136dff..f92707f1 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -16,9 +16,9 @@ section div { -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: 1 0; + -ms-flex: 1 0; flex: 1 0; } flex-flow { @@ -113,58 +113,58 @@ flex { -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: 0 auto; + -ms-flex: 0 auto; flex: 0 auto; -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: auto 0; + -ms-flex: auto 0; flex: auto 0; -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: initial; + -ms-flex: initial; flex: initial; -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: auto; + -ms-flex: auto; flex: auto; -webkit-box-flex: 0; -moz-box-flex: 0; -o-box-flex: 0; - -ms-box-flex: 0; box-flex: 0; -webkit-flex: none; + -ms-flex: none; flex: none; -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; -webkit-flex: 1; + -ms-flex: 1; flex: 1; -webkit-box-flex: 0; -moz-box-flex: 0; -o-box-flex: 0; - -ms-box-flex: 0; box-flex: 0; -webkit-flex: 0px 0 0; + -ms-flex: 0px 0 0; flex: 0px 0 0; -webkit-box-flex: 2; -moz-box-flex: 2; -o-box-flex: 2; - -ms-box-flex: 2; box-flex: 2; -webkit-flex: 1 2 0; + -ms-flex: 1 2 0; flex: 1 2 0; } section { @@ -189,7 +189,6 @@ section div { -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; - -ms-box-flex: 1; box-flex: 1; } section { @@ -206,6 +205,7 @@ section { } section div { -webkit-flex: 1 0; + -ms-flex: 1 0; flex: 1 0; } section { From 1bc1c30a29f06c69ce5978916f9a8dcd5fbfce98 Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Wed, 5 Jun 2013 18:27:03 +0200 Subject: [PATCH 167/254] Switched to using 'flex' version in flex-flow and flex-direction method for IE10 --- lib/nib/flex.styl | 17 +++++++++-------- lib/nib/vendor.styl | 2 +- test/cases/flex.css | 14 +++++--------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index cef2ea3a..59d588f1 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -31,21 +31,21 @@ display(type, args...) -flex-obsolete-direction(direction) if box in flex-version if row-reverse == direction || column-reverse == direction - vendor('box-direction', reverse, ignore: official) + vendor('box-direction', reverse, ignore: ms official) if row == direction || row-reverse == direction - vendor('box-orient', horizontal, ignore: official) + vendor('box-orient', horizontal, ignore: ms official) else if column == direction || column-reverse == direction - vendor('box-orient', vertical, ignore: official) + vendor('box-orient', vertical, ignore: ms official) -flex-obsolete-wrap(value) if box in flex-version // WARN: wrap-reverse does not have a box equivalent. This will render in different manners // on box vs. flex values. if 'wrap' == value || wrap-reverse == value - vendor('box-lines', multiple, ignore: official) + vendor('box-lines', multiple, ignore: ms official) else if nowrap == value - vendor('box-lines', single, ignore: official) + vendor('box-lines', single, ignore: ms official) flex-direction(direction) // obsolete @@ -53,14 +53,14 @@ flex-direction(direction) // new if flex in flex-version - vendor('flex-direction', arguments, only: webkit official) + vendor('flex-direction', arguments, only: webkit ms official) flex-wrap(value) // obsolete -flex-obsolete-wrap(value) if flex in flex-version - vendor('flex-wrap', arguments, only: webkit official) + vendor('flex-wrap', arguments, only: webkit ms official) flex-flow() // obsolete @@ -71,7 +71,8 @@ flex-flow() // new if flex in flex-version - vendor('flex-flow', arguments, only: webkit official) + vendor('flex-flow', arguments, only: webkit ms official) + order() // obsolete diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 775e1260..f76d73b6 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -344,7 +344,7 @@ box-sizing() */ box-orient() - vendor('box-orient', arguments, only: webkit moz ms official) + vendor('box-orient', arguments, only: webkit moz official) /* * Vendor "box-flex-group" support. diff --git a/test/cases/flex.css b/test/cases/flex.css index f92707f1..9f68bdc8 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -8,8 +8,8 @@ section { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -o-box-orient: horizontal; - -ms-box-orient: horizontal; -webkit-flex-direction: row; + -ms-flex-direction: row; flex-direction: row; } section div { @@ -25,36 +25,32 @@ flex-flow { -webkit-box-direction: reverse; -moz-box-direction: reverse; -o-box-direction: reverse; - -ms-box-direction: reverse; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -o-box-orient: horizontal; - -ms-box-orient: horizontal; -webkit-flex-flow: row-reverse; + -ms-flex-flow: row-reverse; flex-flow: row-reverse; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -o-box-orient: horizontal; - -ms-box-orient: horizontal; -webkit-box-lines: multiple; -moz-box-lines: multiple; -o-box-lines: multiple; - -ms-box-lines: multiple; -webkit-flex-flow: row wrap; + -ms-flex-flow: row wrap; flex-flow: row wrap; -webkit-box-direction: reverse; -moz-box-direction: reverse; -o-box-direction: reverse; - -ms-box-direction: reverse; -webkit-box-orient: vertical; -moz-box-orient: vertical; -o-box-orient: vertical; - -ms-box-orient: vertical; -webkit-box-lines: multiple; -moz-box-lines: multiple; -o-box-lines: multiple; - -ms-box-lines: multiple; -webkit-flex-flow: wrap-reverse column-reverse; + -ms-flex-flow: wrap-reverse column-reverse; flex-flow: wrap-reverse column-reverse; } justify-content { @@ -183,7 +179,6 @@ section { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -o-box-orient: horizontal; - -ms-box-orient: horizontal; } section div { -webkit-box-flex: 1; @@ -201,6 +196,7 @@ section { display: -webkit-flex; display: flex; -webkit-flex-direction: row; + -ms-flex-direction: row; flex-direction: row; } section div { From b9ae4dde6c84382f6177980df7b4c8ea0e3d468d Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Wed, 5 Jun 2013 18:36:05 +0200 Subject: [PATCH 168/254] Fixed alignment for IE10 --- lib/nib/flex.styl | 16 +++++++++++----- test/cases/flex.css | 6 +++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 59d588f1..a5ce2d1c 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -152,17 +152,23 @@ justify-content(align) if flex in flex-version vendor('justify-content', arguments, only: webkit official) +// converts alignment from 'flex' to normal value +-convert-alignment(align) + if flex-start == align + return start + else if flex-end == align + return end + else + return align + align-items(align) // obsolete if box in flex-version - if flex-start == align - align = start - else if flex-end == align - align = end - vendor('box-align', align, ignore: official) + vendor('box-align', -convert-alignment(align), ignore: ms official) // new if flex in flex-version + vendor('flex-align', -convert-alignment(align), only: ms) vendor('align-items', arguments, only: webkit official) align-self() diff --git a/test/cases/flex.css b/test/cases/flex.css index 9f68bdc8..33cae3af 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -89,19 +89,19 @@ align-items { -webkit-box-align: start; -moz-box-align: start; -o-box-align: start; - -ms-box-align: start; + -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start; -webkit-box-align: end; -moz-box-align: end; -o-box-align: end; - -ms-box-align: end; + -ms-flex-align: end; -webkit-align-items: flex-end; align-items: flex-end; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; - -ms-box-align: center; + -ms-flex-align: center; -webkit-align-items: center; align-items: center; } From 78075b485e04557eaf84974a97eeeabf960438a6 Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Wed, 5 Jun 2013 18:45:40 +0200 Subject: [PATCH 169/254] Fixed flex order for IE10 --- lib/nib/flex.styl | 3 ++- test/cases/flex.css | 8 ++++++++ test/cases/flex.styl | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index a5ce2d1c..9286adb3 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -77,10 +77,11 @@ flex-flow() order() // obsolete if box in flex-version - vendor('box-ordinal-group', arguments, ignore: official) + vendor('box-ordinal-group', arguments, ignore: ms official) // new if flex in flex-version + vendor('flex-order', arguments, only: ms) vendor('order', arguments, only: webkit official) diff --git a/test/cases/flex.css b/test/cases/flex.css index 33cae3af..9f5f6cf6 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -163,6 +163,14 @@ flex { -ms-flex: 1 2 0; flex: 1 2 0; } +order { + -webkit-box-ordinal-group: 0; + -moz-box-ordinal-group: 0; + -o-box-ordinal-group: 0; + -ms-flex-order: 0; + -webkit-order: 0; + order: 0; +} section { display: -webkit-box !important; display: -moz-box !important; diff --git a/test/cases/flex.styl b/test/cases/flex.styl index 251d4285..3f24de3a 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -36,6 +36,9 @@ flex flex 0px 0 0 flex 1 2 0 +order + order 0 + section display: flex !important From 55b52b9334006eb3425f9ce85c1191afcaf07cb3 Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Wed, 5 Jun 2013 19:08:07 +0200 Subject: [PATCH 170/254] Fixed 'justify-content' to render 'flex-line-pack' for IE10 --- lib/nib/flex.styl | 27 +++++++++++++++++---------- test/cases/flex.css | 16 ++++++++-------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 9286adb3..f18e5b1a 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -132,6 +132,20 @@ flex(growth) if flex in flex-version vendor('flex', arguments, only: webkit ms official) + +// converts the justification alignment +-convert-justify(align) + if flex-start == align + return start + else if flex-end == align + return end + else if space-around == align + return distribute + else if space-between == align + return justify + else + return align + // // 8. Alignment // - http://www.w3.org/TR/css3-flexbox/#alignment @@ -139,19 +153,12 @@ flex(growth) justify-content(align) // obsolete if box in flex-version - if flex-start == align - align = start - else if flex-end == align - align = end - else if space-around == align || space-between == align - // WARN: space-around does not match exactly to the align pack method but this is the - // closest option available. - align = justify - vendor('box-pack', align, ignore: official) + vendor('box-pack', -convert-justify(align), ignore: ms official) // new if flex in flex-version - vendor('justify-content', arguments, only: webkit official) + vendor('justify-content', -convert-justify(align), only: ms) + vendor('justify-content', align, only: webkit official) // converts alignment from 'flex' to normal value -convert-alignment(align) diff --git a/test/cases/flex.css b/test/cases/flex.css index 9f5f6cf6..b486296c 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -57,31 +57,31 @@ justify-content { -webkit-box-pack: start; -moz-box-pack: start; -o-box-pack: start; - -ms-box-pack: start; + -ms-justify-content: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-box-pack: end; -moz-box-pack: end; -o-box-pack: end; - -ms-box-pack: end; + -ms-justify-content: end; -webkit-justify-content: flex-end; justify-content: flex-end; -webkit-box-pack: center; -moz-box-pack: center; -o-box-pack: center; - -ms-box-pack: center; + -ms-justify-content: center; -webkit-justify-content: center; justify-content: center; -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; - -ms-box-pack: justify; + -ms-justify-content: justify; -webkit-justify-content: space-between; justify-content: space-between; - -webkit-box-pack: justify; - -moz-box-pack: justify; - -o-box-pack: justify; - -ms-box-pack: justify; + -webkit-box-pack: distribute; + -moz-box-pack: distribute; + -o-box-pack: distribute; + -ms-justify-content: distribute; -webkit-justify-content: space-around; justify-content: space-around; } From c5b520b8bebdc8bfbb761753f2a9b07b405529ca Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Thu, 6 Jun 2013 07:55:06 +0200 Subject: [PATCH 171/254] Corrected 'justify-content' to 'flex-pack' for IE10 --- lib/nib/flex.styl | 2 +- test/cases/flex.css | 10 +++++----- test/server.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index f18e5b1a..cf228000 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -157,7 +157,7 @@ justify-content(align) // new if flex in flex-version - vendor('justify-content', -convert-justify(align), only: ms) + vendor('flex-pack', -convert-justify(align), only: ms) vendor('justify-content', align, only: webkit official) // converts alignment from 'flex' to normal value diff --git a/test/cases/flex.css b/test/cases/flex.css index b486296c..0624ccd6 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -57,31 +57,31 @@ justify-content { -webkit-box-pack: start; -moz-box-pack: start; -o-box-pack: start; - -ms-justify-content: start; + -ms-flex-pack: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-box-pack: end; -moz-box-pack: end; -o-box-pack: end; - -ms-justify-content: end; + -ms-flex-pack: end; -webkit-justify-content: flex-end; justify-content: flex-end; -webkit-box-pack: center; -moz-box-pack: center; -o-box-pack: center; - -ms-justify-content: center; + -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; - -ms-justify-content: justify; + -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; -webkit-box-pack: distribute; -moz-box-pack: distribute; -o-box-pack: distribute; - -ms-justify-content: distribute; + -ms-flex-pack: distribute; -webkit-justify-content: space-around; justify-content: space-around; } diff --git a/test/server.js b/test/server.js index 2b05ae45..ebd24ffe 100644 --- a/test/server.js +++ b/test/server.js @@ -36,4 +36,4 @@ server.use(function(req, res){ }); server.listen(3000); -console.log('Server listening on port 3000'); \ No newline at end of file +console.log('Server listening on port 3000'); From e94da3f4e8395379239625b8e1473757ba6b281f Mon Sep 17 00:00:00 2001 From: Jurie-Jan Botha Date: Thu, 6 Jun 2013 08:09:46 +0200 Subject: [PATCH 172/254] Corrected 'align-content' to 'flex-line-pack' for IE10 --- lib/nib/flex.styl | 10 ++++++---- test/cases/flex.css | 17 +++++++++++++++++ test/cases/flex.styl | 7 +++++++ 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index cf228000..06a70c5a 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -160,6 +160,12 @@ justify-content(align) vendor('flex-pack', -convert-justify(align), only: ms) vendor('justify-content', align, only: webkit official) +align-content(align) + // WARN: Obsolete spec does not allow for adjustment here + if flex in flex-version + vendor('flex-line-pack', -convert-justify(align), only: ms) + vendor('align-content', align, only: webkit official) + // converts alignment from 'flex' to normal value -convert-alignment(align) if flex-start == align @@ -184,7 +190,3 @@ align-self() if flex in flex-version vendor('align-self', arguments, only: webkit official) -align-content() - // WARN: Obsolete spec does not allow for adjustment here - if flex in flex-version - vendor('align-content', arguments, only: webkit official) diff --git a/test/cases/flex.css b/test/cases/flex.css index 0624ccd6..fcee2157 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -105,6 +105,23 @@ align-items { -webkit-align-items: center; align-items: center; } +align-content { + -ms-flex-line-pack: start; + -webkit-align-content: flex-start; + align-content: flex-start; + -ms-flex-line-pack: end; + -webkit-align-content: flex-end; + align-content: flex-end; + -ms-flex-line-pack: center; + -webkit-align-content: center; + align-content: center; + -ms-flex-line-pack: justify; + -webkit-align-content: space-between; + align-content: space-between; + -ms-flex-line-pack: distribute; + -webkit-align-content: space-around; + align-content: space-around; +} flex { -webkit-box-flex: 1; -moz-box-flex: 1; diff --git a/test/cases/flex.styl b/test/cases/flex.styl index 3f24de3a..e561e98a 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -26,6 +26,13 @@ align-items align-items flex-end align-items center +align-content + align-content flex-start + align-content flex-end + align-content center + align-content space-between + align-content space-around + flex flex 0 auto flex auto 0 From 62eca03d515eb6ab0936ef8290588e9eacc815a1 Mon Sep 17 00:00:00 2001 From: Rene Hamburger Date: Mon, 22 Jul 2013 12:28:52 +0200 Subject: [PATCH 173/254] Fixed align-self for IE 10 IE 10 uses -ms-flex-item-align to align flex-items. From IE 11 the official align-self property is used. --- lib/nib/flex.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 06a70c5a..2157cc44 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -189,4 +189,4 @@ align-self() // WARN: Obsolete spec does not allow for overriding alignment on individual items. if flex in flex-version vendor('align-self', arguments, only: webkit official) - + vendor('flex-item-align', -convert-alignment(align), only: ms) From a770cbbf1d1d44d26664b53b092a92646a162208 Mon Sep 17 00:00:00 2001 From: Rene Hamburger Date: Mon, 22 Jul 2013 12:35:47 +0200 Subject: [PATCH 174/254] Update flex.styl --- lib/nib/flex.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 2157cc44..6ca3d5ac 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -185,8 +185,8 @@ align-items(align) vendor('flex-align', -convert-alignment(align), only: ms) vendor('align-items', arguments, only: webkit official) -align-self() +align-self(align) // WARN: Obsolete spec does not allow for overriding alignment on individual items. if flex in flex-version - vendor('align-self', arguments, only: webkit official) + vendor('align-self', align, only: webkit official) vendor('flex-item-align', -convert-alignment(align), only: ms) From 056029d65ebb75b9995c9d8a2b845c3950796adc Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 29 Jul 2013 17:51:18 -0500 Subject: [PATCH 175/254] closes #206 --- Readme.md | 4 ++-- index.styl | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 3a2078c0..f95ebe1f 100644 --- a/Readme.md +++ b/Readme.md @@ -72,13 +72,13 @@ to be continued.... Run the automated test cases: ```bash - $ make test + $ npm test ``` For visual testing run the test server: ```bash - $ make test-server + $ npm run-script test-server ``` Then visit `localhost:3000` in your browser. diff --git a/index.styl b/index.styl index 1d5c80ae..e41f28bd 100644 --- a/index.styl +++ b/index.styl @@ -1,2 +1 @@ - @import 'https://github.com/lib/nib/' From ac9913f9e9845ae50c16eae93ce02a2b8fcef732 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 29 Jul 2013 17:58:31 -0500 Subject: [PATCH 176/254] expanded contributors section --- Readme.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index f95ebe1f..89c03d6d 100644 --- a/Readme.md +++ b/Readme.md @@ -85,8 +85,12 @@ to be continued.... ## Contributors - - TJ Holowaychuk - - Isaac Johnston +I would love more contributors. And if you have helped out, you are awesome! I want to give a huge thanks to these people: + + - [TJ Holowaychuk](https://github.com/visionmedia) (Original Creator) + - [Sean Lang](https://github.com/slang800) (Current Maintainer) + - [Isaac Johnston](https://github.com/superstructor) + - [Everyone Else](https://github.com/visionmedia/nib/contributors) ## License From c5bfee18ddf208bac2de3b0f7c994dae6de29e12 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 17 May 2012 23:07:33 +0400 Subject: [PATCH 177/254] Removed legacy webkit support; commented out the canvas generated linear gradient; prepared the linear gradient to be available in vendor-prefixed properties like border-image; actually fixes #14; fixes #71 --- lib/nib/gradients.styl | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index 3bbff794..36813c34 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -15,19 +15,6 @@ replace(expr, str, val) expr[i] = val expr -/* - * Normalize gradient points. - */ - -grad-point(pos) - if length(pos) == 1 - return left pos if pos in (top bottom) - return pos top if pos in (left right) - else if pos[0] in (top bottom) - pos[1] pos[0] - else - pos - /* * Implicit color stop position. */ @@ -76,13 +63,6 @@ join-stops(stops, translate) str += translate(color, pos) unquote(str) -/* - * Legacy Webkit color stop. - */ - -webkit-stop(color, pos) - 'color-stop(%d, %s)' % (pos / 100 color) - /* * Standard color stop. */ From d422aa701c835cbe0e6ccf7c6299eedf4efa67a9 Mon Sep 17 00:00:00 2001 From: kizu Date: Fri, 18 May 2012 00:17:50 +0400 Subject: [PATCH 178/254] Applying linear-gradient to border-image; fixes #19 --- lib/nib/vendor.styl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index f76d73b6..a1f9cfbd 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -45,24 +45,27 @@ literal-join(string, literals) return result /* - * Replacing one value with another + * Prepend matched argument with given prefix + * set strict to false to check as “begin with” */ -replace-args(args,argument,val) +prepend-args(args, prefix, argument, strict = true) result = () // Checking if there are values divided by comma if is-comma-list(args) for subargs in args subresult = () for arg in subargs - arg = unquote(val) if arg == argument + if (arg == argument and strict) or (match('^'+s('%s',argument),''+arg) and !strict) + arg = s('%s%s',unquote(prefix),arg) push(subresult, arg) subresult = literal-join(' ', subresult) if length(subresult) > 1 push(result, subresult) result = literal-join(', ', result) else for arg in args - arg = unquote(val) if arg == argument + if (arg == argument and strict) or (match('^'+s('%s',argument),''+arg) and !strict) + arg = s('%s%s',unquote(prefix),arg) push(result, arg) return result @@ -81,7 +84,9 @@ vendor(prop, args, only = null, ignore = null) newargs = args // Adjusting the args if needed if prop in ('transition' 'transition-property') - newargs = replace-args(args, transform, '-' + prefix + '-transform') + newargs = prepend-args(args, '-' + prefix + '-', transform) + if prop in ('border-image') + newargs = prepend-args(args, '-' + prefix + '-', linear-gradient, false) {'-' + prefix + '-' + prop}: newargs /* @@ -578,4 +583,4 @@ placeholder() pair() else if pair is not null && pair[0] is not null {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1] -input-placeholder = placeholder \ No newline at end of file +input-placeholder = placeholder From 82310f6417004a427753af9578008a451c8753e7 Mon Sep 17 00:00:00 2001 From: kizu Date: Fri, 25 May 2012 01:45:17 +0400 Subject: [PATCH 179/254] Removed the legacy webkit gradients from tests --- test/cases/linear-gradient.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 2a98cab9..078c94d9 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -1,5 +1,4 @@ body { - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); background: -webkit-linear-gradient(top, #fff 0, #000 100%); background: -moz-linear-gradient(top, #fff 0, #000 100%); background: -o-linear-gradient(top, #fff 0, #000 100%); @@ -15,7 +14,6 @@ body { background: linear-gradient(top, #fff 0, #000 100%); } body { - background: -webkit-gradient(linear, left top, right bottom, color-stop(0, #fff), color-stop(0.25, #f00), color-stop(0.5, #00f), color-stop(1, #000)); background: -webkit-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); background: -moz-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); background: -o-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); @@ -23,7 +21,6 @@ body { background: linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); } body { - background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); background: -webkit-linear-gradient(bottom right, #fff 0, #000 80%); background: -moz-linear-gradient(bottom right, #fff 0, #000 80%); background: -o-linear-gradient(bottom right, #fff 0, #000 80%); @@ -31,7 +28,6 @@ body { background: linear-gradient(bottom right, #fff 0, #000 80%); } body { - background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); background: -webkit-linear-gradient(right bottom, #fff 0, #000 80%); background: -moz-linear-gradient(right bottom, #fff 0, #000 80%); background: -o-linear-gradient(right bottom, #fff 0, #000 80%); @@ -39,7 +35,6 @@ body { background: linear-gradient(right bottom, #fff 0, #000 80%); } body { - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); background: -webkit-linear-gradient(top, #fff 0, #000 100%); background: -moz-linear-gradient(top, #fff 0, #000 100%); background: -ms-linear-gradient(top, #fff 0, #000 100%); @@ -47,7 +42,6 @@ body { background: linear-gradient(top, #fff 0, #000 100%); } body { - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)), #fff; background: -webkit-linear-gradient(top, #fff 0, #000 100%), #fff; background: -moz-linear-gradient(top, #fff 0, #000 100%), #fff; background: -ms-linear-gradient(top, #fff 0, #000 100%), #fff; From 8f8231ae15c8cff60dd2b9c88aa14b688b853a8b Mon Sep 17 00:00:00 2001 From: kizu Date: Fri, 25 May 2012 17:30:34 +0400 Subject: [PATCH 180/254] Moved whole logic from the gradient function to the vendor ones, rewriting the background, background-image etc. Fixes #67 --- lib/nib/gradients.styl | 35 +++++++------------------- lib/nib/vendor.styl | 44 ++++++++++++++++++++++++++++++--- test/cases/linear-gradient.styl | 3 ++- 3 files changed, 52 insertions(+), 30 deletions(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index 36813c34..db3a7bdf 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -85,35 +85,18 @@ std-stop(color, pos) linear-gradient(start, stops...) error('color stops required') unless length(stops) - prop = current-property[0] - val = current-property[1] - - if start is a 'color' - unshift(stops, start) - start = top + // if current-property + // if start is a 'color' + // unshift(stops, start) + // start = top + // if start[0] is a 'unit' + // if has-canvas + // img = linear-gradient-image(start, stops) + // add-property(prop, replace(val, '__CALL__', img)) + // start = start[1] stops = normalize-stops(stops) - - // gradient image - if start[0] is a 'unit' - if has-canvas - img = linear-gradient-image(start, stops) - add-property(prop, replace(val, '__CALL__', img)) - start = start[1] - - // legacy webkit - end = grad-point(opposite-position(start)) - webkit-legacy = '-webkit-gradient(linear, %s, %s, %s)' % (grad-point(start) end join-stops(stops, webkit-stop)) - add-property(prop, replace(val, '__CALL__', webkit-legacy)) - - // vendor prefixed stops = join-stops(stops, std-stop) - for prefix in vendor-prefixes - unless prefix == official - gradient = '-%s-linear-gradient(%s, %s)' % (prefix start stops) - add-property(prop, replace(val, '__CALL__', gradient)) - - // standard 'linear-gradient(%s, %s)' % (start stops) /* diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index a1f9cfbd..9cd01734 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -75,7 +75,7 @@ prepend-args(args, prefix, argument, strict = true) * or those which should be ignored. */ -vendor(prop, args, only = null, ignore = null) +vendor(prop, args, only = null, ignore = null, vendor-property = true) for prefix in vendor-prefixes unless (only and !(prefix in only)) or (ignore and prefix in ignore) if official == prefix @@ -85,9 +85,13 @@ vendor(prop, args, only = null, ignore = null) // Adjusting the args if needed if prop in ('transition' 'transition-property') newargs = prepend-args(args, '-' + prefix + '-', transform) - if prop in ('border-image') + if prop in ('border-image' 'background' 'background-image' 'cursor' 'list-style' 'list-style-image') newargs = prepend-args(args, '-' + prefix + '-', linear-gradient, false) - {'-' + prefix + '-' + prop}: newargs + newprop = prop + newprop = '-' + prefix + '-' + prop if vendor-property + // TODO: make the adjustments for differences + // between the official syntax and vendor ones + {newprop}: newargs /* * Vendorize the given value. @@ -584,3 +588,37 @@ placeholder() else if pair is not null && pair[0] is not null {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1] input-placeholder = placeholder + +/* + * Vendor background support (gradients). + */ + +background() + if match('-gradient\(', ''+arguments) + vendor('background', arguments, vendor-property: false) + else + background arguments + +background-image() + if match('-gradient\(', ''+arguments) + vendor('background-image', arguments, vendor-property: false) + else + background-image arguments + +cursor() + if match('-gradient\(', ''+arguments) + vendor('cursor', arguments, vendor-property: false) + else + cursor arguments + +list-style() + if match('-gradient\(', ''+arguments) + vendor('list-style', arguments, vendor-property: false) + else + list-style arguments + +list-style-image() + if match('-gradient\(', ''+arguments) + vendor('list-style-image', arguments, vendor-property: false) + else + list-style-image arguments diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 692674b3..6237b5fe 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -1,4 +1,5 @@ +@import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' body @@ -22,4 +23,4 @@ body background: linear-gradient(top, white, black) body - background: linear-gradient(top, white, black), white \ No newline at end of file + background: linear-gradient(top, white, black), white From b87cf26ede2342cc388ce7d87912fa08c1667abf Mon Sep 17 00:00:00 2001 From: kizu Date: Fri, 25 May 2012 23:14:35 +0400 Subject: [PATCH 181/254] Added some tests --- test/cases/linear-gradient.css | 27 +++++++++++++++++++++++++++ test/cases/linear-gradient.styl | 14 ++++++++++++++ test/cases/multiple-gradients.css | 28 ++++++++++++++++++++++++++++ test/cases/multiple-gradients.styl | 23 +++++++++++++++++++++++ test/cases/vendor.styl | 1 + 5 files changed, 93 insertions(+) create mode 100644 test/cases/multiple-gradients.css create mode 100644 test/cases/multiple-gradients.styl diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 078c94d9..0ce1652c 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -48,3 +48,30 @@ body { background: -o-linear-gradient(top, #fff 0, #000 100%), #fff; background: linear-gradient(top, #fff 0, #000 100%), #fff; } +body { + -webkit-border-image: -webkit-linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; + -moz-border-image: -moz-linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; + -o-border-image: -o-linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; + border-image: linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; +} +body { + cursor: -webkit-linear-gradient(40deg, #f00 0%, #0f0 100%); + cursor: -moz-linear-gradient(40deg, #f00 0%, #0f0 100%); + cursor: -ms-linear-gradient(40deg, #f00 0%, #0f0 100%); + cursor: -o-linear-gradient(40deg, #f00 0%, #0f0 100%); + cursor: linear-gradient(40deg, #f00 0%, #0f0 100%); +} +body { + list-style: -webkit-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style: -moz-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style: -ms-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style: -o-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style: linear-gradient(40deg, #f00 0%, #0f0 100%); +} +body { + list-style-image: -webkit-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style-image: -moz-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style-image: -ms-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style-image: -o-linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style-image: linear-gradient(40deg, #f00 0%, #0f0 100%); +} diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 6237b5fe..89c321c5 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -24,3 +24,17 @@ body body background: linear-gradient(top, white, black), white + +body + border-image: linear-gradient(top, #fff, #000) 20% stretch stretch; + +gradient-var = linear-gradient(40deg, red, lime) + +body + cursor: gradient-var + +body + list-style: gradient-var + +body + list-style-image: gradient-var diff --git a/test/cases/multiple-gradients.css b/test/cases/multiple-gradients.css new file mode 100644 index 00000000..bd803b58 --- /dev/null +++ b/test/cases/multiple-gradients.css @@ -0,0 +1,28 @@ +.test1 { + background: -webkit-linear-gradient(top, #fff 0%, #000 100%), -webkit-linear-gradient(bottom, #000 0%, #fff 100%); + background: -moz-linear-gradient(top, #fff 0%, #000 100%), -moz-linear-gradient(bottom, #000 0%, #fff 100%); + background: -o-linear-gradient(top, #fff 0%, #000 100%), -o-linear-gradient(bottom, #000 0%, #fff 100%); + background: -ms-linear-gradient(top, #fff 0%, #000 100%), -ms-linear-gradient(bottom, #000 0%, #fff 100%); + background: linear-gradient(top, #fff 0%, #000 100%), linear-gradient(bottom, #000 0%, #fff 100%); +} +.test2 { + background: #fff -webkit-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -webkit-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; + background: #fff -moz-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -moz-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; + background: #fff -o-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -o-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; + background: #fff -ms-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -ms-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; + background: #fff linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; +} +.test3 { + background-image: -webkit-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -webkit-linear-gradient(bottom, #000 0%, #fff 100%); + background-image: -moz-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -moz-linear-gradient(bottom, #000 0%, #fff 100%); + background-image: -o-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -o-linear-gradient(bottom, #000 0%, #fff 100%); + background-image: -ms-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -ms-linear-gradient(bottom, #000 0%, #fff 100%); + background-image: linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), linear-gradient(bottom, #000 0%, #fff 100%); +} +.test4 { + background: -webkit-linear-gradient(bottom, #000 0%, #fff 100%), -webkit-linear-gradient(top, #fff 0%, #000 100%); + background: -moz-linear-gradient(bottom, #000 0%, #fff 100%), -moz-linear-gradient(top, #fff 0%, #000 100%); + background: -o-linear-gradient(bottom, #000 0%, #fff 100%), -o-linear-gradient(top, #fff 0%, #000 100%); + background: -ms-linear-gradient(bottom, #000 0%, #fff 100%), -ms-linear-gradient(top, #fff 0%, #000 100%); + background: linear-gradient(bottom, #000 0%, #fff 100%), linear-gradient(top, #fff 0%, #000 100%); +} diff --git a/test/cases/multiple-gradients.styl b/test/cases/multiple-gradients.styl new file mode 100644 index 00000000..ea6b38ff --- /dev/null +++ b/test/cases/multiple-gradients.styl @@ -0,0 +1,23 @@ + +@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/gradients' + +.test1 + background: linear-gradient(top, white, black), + linear-gradient(bottom, black, white) + +.test2 + background: #fff \ + linear-gradient(top, black, white) 0 0 no-repeat, + linear-gradient(bottom, black, white) 10px bottom repeat-y + +.test3 + background-image: linear-gradient(top, white, black), + url(https://github.com/a.png), + linear-gradient(bottom, black, white) + +gradient1 = linear-gradient(top, white, black) +gradient2 = linear-gradient(bottom, black, white) + +.test4 + background: gradient2, gradient1 diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 8e38decd..02ac391f 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -1,5 +1,6 @@ @import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/gradients' vendor-prefixes = webkit moz official From f631c512418a4a97db257b3d236ba075e19d4d22 Mon Sep 17 00:00:00 2001 From: kizu Date: Mon, 13 Aug 2012 23:20:28 +0400 Subject: [PATCH 182/254] Fixed tests after rebase --- test/cases/linear-gradient.css | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 0ce1652c..a9f2b251 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -1,12 +1,11 @@ body { - background: -webkit-linear-gradient(top, #fff 0, #000 100%); - background: -moz-linear-gradient(top, #fff 0, #000 100%); - background: -o-linear-gradient(top, #fff 0, #000 100%); - background: -ms-linear-gradient(top, #fff 0, #000 100%); - background: linear-gradient(top, #fff 0, #000 100%); + background: -webkit-linear-gradient(#fff, #000 100%); + background: -moz-linear-gradient(#fff, #000 100%); + background: -o-linear-gradient(#fff, #000 100%); + background: -ms-linear-gradient(#fff, #000 100%); + background: linear-gradient(#fff, #000 100%); } body { - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); background: -webkit-linear-gradient(top, #fff 0, #000 100%); background: -moz-linear-gradient(top, #fff 0, #000 100%); background: -o-linear-gradient(top, #fff 0, #000 100%); From 626921de2d8ee83adb727325f4a7043bb82a42cf Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 29 Jul 2013 21:14:13 -0500 Subject: [PATCH 183/254] changed `0%` to `0` to fix tests --- test/cases/linear-gradient.css | 38 ++++++++++++++--------------- test/cases/multiple-gradients.css | 40 +++++++++++++++---------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index a9f2b251..d89f215c 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -48,29 +48,29 @@ body { background: linear-gradient(top, #fff 0, #000 100%), #fff; } body { - -webkit-border-image: -webkit-linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; - -moz-border-image: -moz-linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; - -o-border-image: -o-linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; - border-image: linear-gradient(top, #fff 0%, #000 100%) 20% stretch stretch; + -webkit-border-image: -webkit-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + -moz-border-image: -moz-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + -o-border-image: -o-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + border-image: linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; } body { - cursor: -webkit-linear-gradient(40deg, #f00 0%, #0f0 100%); - cursor: -moz-linear-gradient(40deg, #f00 0%, #0f0 100%); - cursor: -ms-linear-gradient(40deg, #f00 0%, #0f0 100%); - cursor: -o-linear-gradient(40deg, #f00 0%, #0f0 100%); - cursor: linear-gradient(40deg, #f00 0%, #0f0 100%); + cursor: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); + cursor: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); + cursor: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); + cursor: -o-linear-gradient(40deg, #f00 0, #0f0 100%); + cursor: linear-gradient(40deg, #f00 0, #0f0 100%); } body { - list-style: -webkit-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style: -moz-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style: -ms-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style: -o-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style: linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style: -o-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style: linear-gradient(40deg, #f00 0, #0f0 100%); } body { - list-style-image: -webkit-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style-image: -moz-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style-image: -ms-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style-image: -o-linear-gradient(40deg, #f00 0%, #0f0 100%); - list-style-image: linear-gradient(40deg, #f00 0%, #0f0 100%); + list-style-image: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style-image: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style-image: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style-image: -o-linear-gradient(40deg, #f00 0, #0f0 100%); + list-style-image: linear-gradient(40deg, #f00 0, #0f0 100%); } diff --git a/test/cases/multiple-gradients.css b/test/cases/multiple-gradients.css index bd803b58..21c4da12 100644 --- a/test/cases/multiple-gradients.css +++ b/test/cases/multiple-gradients.css @@ -1,28 +1,28 @@ .test1 { - background: -webkit-linear-gradient(top, #fff 0%, #000 100%), -webkit-linear-gradient(bottom, #000 0%, #fff 100%); - background: -moz-linear-gradient(top, #fff 0%, #000 100%), -moz-linear-gradient(bottom, #000 0%, #fff 100%); - background: -o-linear-gradient(top, #fff 0%, #000 100%), -o-linear-gradient(bottom, #000 0%, #fff 100%); - background: -ms-linear-gradient(top, #fff 0%, #000 100%), -ms-linear-gradient(bottom, #000 0%, #fff 100%); - background: linear-gradient(top, #fff 0%, #000 100%), linear-gradient(bottom, #000 0%, #fff 100%); + background: -webkit-linear-gradient(top, #fff 0, #000 100%), -webkit-linear-gradient(bottom, #000 0, #fff 100%); + background: -moz-linear-gradient(top, #fff 0, #000 100%), -moz-linear-gradient(bottom, #000 0, #fff 100%); + background: -o-linear-gradient(top, #fff 0, #000 100%), -o-linear-gradient(bottom, #000 0, #fff 100%); + background: -ms-linear-gradient(top, #fff 0, #000 100%), -ms-linear-gradient(bottom, #000 0, #fff 100%); + background: linear-gradient(top, #fff 0, #000 100%), linear-gradient(bottom, #000 0, #fff 100%); } .test2 { - background: #fff -webkit-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -webkit-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; - background: #fff -moz-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -moz-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; - background: #fff -o-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -o-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; - background: #fff -ms-linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, -ms-linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; - background: #fff linear-gradient(top, #000 0%, #fff 100%) 0 0 no-repeat, linear-gradient(bottom, #000 0%, #fff 100%) 10px bottom repeat-y; + background: #fff -webkit-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -webkit-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; + background: #fff -moz-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -moz-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; + background: #fff -o-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -o-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; + background: #fff -ms-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -ms-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; + background: #fff linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; } .test3 { - background-image: -webkit-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -webkit-linear-gradient(bottom, #000 0%, #fff 100%); - background-image: -moz-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -moz-linear-gradient(bottom, #000 0%, #fff 100%); - background-image: -o-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -o-linear-gradient(bottom, #000 0%, #fff 100%); - background-image: -ms-linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), -ms-linear-gradient(bottom, #000 0%, #fff 100%); - background-image: linear-gradient(top, #fff 0%, #000 100%), url("https://github.com/a.png"), linear-gradient(bottom, #000 0%, #fff 100%); + background-image: -webkit-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -webkit-linear-gradient(bottom, #000 0, #fff 100%); + background-image: -moz-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -moz-linear-gradient(bottom, #000 0, #fff 100%); + background-image: -o-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -o-linear-gradient(bottom, #000 0, #fff 100%); + background-image: -ms-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -ms-linear-gradient(bottom, #000 0, #fff 100%); + background-image: linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), linear-gradient(bottom, #000 0, #fff 100%); } .test4 { - background: -webkit-linear-gradient(bottom, #000 0%, #fff 100%), -webkit-linear-gradient(top, #fff 0%, #000 100%); - background: -moz-linear-gradient(bottom, #000 0%, #fff 100%), -moz-linear-gradient(top, #fff 0%, #000 100%); - background: -o-linear-gradient(bottom, #000 0%, #fff 100%), -o-linear-gradient(top, #fff 0%, #000 100%); - background: -ms-linear-gradient(bottom, #000 0%, #fff 100%), -ms-linear-gradient(top, #fff 0%, #000 100%); - background: linear-gradient(bottom, #000 0%, #fff 100%), linear-gradient(top, #fff 0%, #000 100%); + background: -webkit-linear-gradient(bottom, #000 0, #fff 100%), -webkit-linear-gradient(top, #fff 0, #000 100%); + background: -moz-linear-gradient(bottom, #000 0, #fff 100%), -moz-linear-gradient(top, #fff 0, #000 100%); + background: -o-linear-gradient(bottom, #000 0, #fff 100%), -o-linear-gradient(top, #fff 0, #000 100%); + background: -ms-linear-gradient(bottom, #000 0, #fff 100%), -ms-linear-gradient(top, #fff 0, #000 100%); + background: linear-gradient(bottom, #000 0, #fff 100%), linear-gradient(top, #fff 0, #000 100%); } From 9c05f9a4bb42cdf2205895922069fbc3bf7c3442 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 13 Sep 2012 15:54:58 +0400 Subject: [PATCH 184/254] Changed arguments-modifying functions, fixed the case with `border-image` with `fill` --- lib/nib/vendor.styl | 24 ++++++++++++++++-------- test/cases/linear-gradient.css | 6 ++++++ test/cases/linear-gradient.styl | 3 +++ test/cases/vendor.css | 6 ++++++ test/cases/vendor.styl | 3 +++ 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 9cd01734..d27a4f2a 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -45,30 +45,36 @@ literal-join(string, literals) return result /* - * Prepend matched argument with given prefix + * Modify matched arguments * set strict to false to check as “begin with” */ -prepend-args(args, prefix, argument, strict = true) +modify-args(args, argument, prefix = '', postfix = '', replace = false, strict = true) result = () + prefix = unquote(prefix) + postfix = unquote(postfix) + // Checking if there are values divided by comma if is-comma-list(args) for subargs in args subresult = () for arg in subargs if (arg == argument and strict) or (match('^'+s('%s',argument),''+arg) and !strict) - arg = s('%s%s',unquote(prefix),arg) - push(subresult, arg) + arg = s('%s%s%s', prefix, replace ? replace : arg, postfix) + push(subresult, arg) if arg != unquote('') subresult = literal-join(' ', subresult) if length(subresult) > 1 push(result, subresult) result = literal-join(', ', result) else for arg in args if (arg == argument and strict) or (match('^'+s('%s',argument),''+arg) and !strict) - arg = s('%s%s',unquote(prefix),arg) - push(result, arg) + arg = s('%s%s%s', prefix, replace ? replace : arg, postfix) + push(result, arg) if arg != unquote('') return result +remove-args(args, argument, strict = true) + return modify-args(args, argument, replace: unquote(''), strict: strict) + /* * Vendor support for the given prop / arguments, * optionally specifying the only prefixes to utilize, @@ -84,9 +90,11 @@ vendor(prop, args, only = null, ignore = null, vendor-property = true) newargs = args // Adjusting the args if needed if prop in ('transition' 'transition-property') - newargs = prepend-args(args, '-' + prefix + '-', transform) + newargs = modify-args(newargs, transform, '-' + prefix + '-') if prop in ('border-image' 'background' 'background-image' 'cursor' 'list-style' 'list-style-image') - newargs = prepend-args(args, '-' + prefix + '-', linear-gradient, false) + newargs = modify-args(newargs, linear-gradient, '-' + prefix + '-', strict: false) + if prop in ('border-image' 'border-image-slice') + newargs = remove-args(newargs, fill) newprop = prop newprop = '-' + prefix + '-' + prop if vendor-property // TODO: make the adjustments for differences diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index d89f215c..3bf8d034 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -53,6 +53,12 @@ body { -o-border-image: -o-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; border-image: linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; } +body { + -webkit-border-image: -webkit-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + -moz-border-image: -moz-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + -o-border-image: -o-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + border-image: linear-gradient(top, #fff 0, #000 100%) 20% fill stretch stretch; +} body { cursor: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); cursor: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 89c321c5..07257154 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -28,6 +28,9 @@ body body border-image: linear-gradient(top, #fff, #000) 20% stretch stretch; +body + border-image: linear-gradient(top, #fff, #000) 20% fill stretch stretch; + gradient-var = linear-gradient(40deg, red, lime) body diff --git a/test/cases/vendor.css b/test/cases/vendor.css index 79f74b49..66a64784 100644 --- a/test/cases/vendor.css +++ b/test/cases/vendor.css @@ -150,6 +150,12 @@ section { -moz-border-image: url("https://github.com/image.png") 20% stretch stretch; border-image: url("https://github.com/image.png") 20% stretch stretch; } +section { + -o-border-image: url("https://github.com/image.png") 20% stretch stretch; + -webkit-border-image: url("https://github.com/image.png") 20% stretch stretch; + -moz-border-image: url("https://github.com/image.png") 20% stretch stretch; + border-image: url("https://github.com/image.png") 20% fill stretch stretch; +} p { -webkit-hyphens: auto; -moz-hyphens: auto; diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index 02ac391f..defe38bd 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -79,6 +79,9 @@ button section border-image: url("https://github.com/image.png") 20% stretch stretch; +section + border-image: url("https://github.com/image.png") 20% fill stretch stretch; + p hyphens: auto From 811c1c13b19562103462ad24dc0d3b2c4c35150c Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 13 Sep 2012 20:03:42 +0400 Subject: [PATCH 185/254] Added basic support for radial gradients and one basic test --- lib/nib/vendor.styl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index d27a4f2a..d8d85a22 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -59,7 +59,7 @@ modify-args(args, argument, prefix = '', postfix = '', replace = false, strict = for subargs in args subresult = () for arg in subargs - if (arg == argument and strict) or (match('^'+s('%s',argument),''+arg) and !strict) + if (arg == argument and strict) or (match(''+s('%s',argument),''+arg) and !strict) arg = s('%s%s%s', prefix, replace ? replace : arg, postfix) push(subresult, arg) if arg != unquote('') subresult = literal-join(' ', subresult) if length(subresult) > 1 @@ -67,7 +67,7 @@ modify-args(args, argument, prefix = '', postfix = '', replace = false, strict = result = literal-join(', ', result) else for arg in args - if (arg == argument and strict) or (match('^'+s('%s',argument),''+arg) and !strict) + if (arg == argument and strict) or (match(''+s('%s',argument),''+arg) and !strict) arg = s('%s%s%s', prefix, replace ? replace : arg, postfix) push(result, arg) if arg != unquote('') return result @@ -88,13 +88,19 @@ vendor(prop, args, only = null, ignore = null, vendor-property = true) {prop}: args else newargs = args - // Adjusting the args if needed + + // Transforms in transitions need the prefixes if prop in ('transition' 'transition-property') newargs = modify-args(newargs, transform, '-' + prefix + '-') + + // Adding prefixes for gradients if prop in ('border-image' 'background' 'background-image' 'cursor' 'list-style' 'list-style-image') - newargs = modify-args(newargs, linear-gradient, '-' + prefix + '-', strict: false) + newargs = modify-args(newargs, -gradient, '-' + prefix + '-', strict: false) + + // Removing the `fill` from prefixed border-images if prop in ('border-image' 'border-image-slice') newargs = remove-args(newargs, fill) + newprop = prop newprop = '-' + prefix + '-' + prop if vendor-property // TODO: make the adjustments for differences From 870141b099909159d3efcb632b1009a0d20fc08f Mon Sep 17 00:00:00 2001 From: kizu Date: Sat, 15 Sep 2012 02:40:27 +0400 Subject: [PATCH 186/254] More stable checks on gradients --- lib/nib/vendor.styl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index d8d85a22..0e76c98e 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -51,6 +51,7 @@ literal-join(string, literals) modify-args(args, argument, prefix = '', postfix = '', replace = false, strict = true) result = () + argument = unquote(argument) if type(argument) == 'string' prefix = unquote(prefix) postfix = unquote(postfix) @@ -95,7 +96,7 @@ vendor(prop, args, only = null, ignore = null, vendor-property = true) // Adding prefixes for gradients if prop in ('border-image' 'background' 'background-image' 'cursor' 'list-style' 'list-style-image') - newargs = modify-args(newargs, -gradient, '-' + prefix + '-', strict: false) + newargs = modify-args(newargs, "-gradient\(", '-' + prefix + '-', strict: false) // Removing the `fill` from prefixed border-images if prop in ('border-image' 'border-image-slice') From a36b70e00c4a88567a8e0c6917318ab5c5cca583 Mon Sep 17 00:00:00 2001 From: Mikhail Korepanov Date: Sat, 15 Sep 2012 19:23:32 +0400 Subject: [PATCH 187/254] Example for the plugin --- lib/nib.js | 4 ++++ lib/nodes/hello-world.js | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 lib/nodes/hello-world.js diff --git a/lib/nib.js b/lib/nib.js index 5d02791e..88ae2634 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -27,6 +27,8 @@ try { // ignore } +var hello = require('./nodes/hello-world') + /** * Library version. */ @@ -64,5 +66,7 @@ function plugin() { } else { style.define('has-canvas', nodes.false); } + + style.define('hello-world', hello); } } diff --git a/lib/nodes/hello-world.js b/lib/nodes/hello-world.js new file mode 100644 index 00000000..e1995df9 --- /dev/null +++ b/lib/nodes/hello-world.js @@ -0,0 +1,20 @@ + +/** + * Module dependencies. + */ + +var stylus = require('stylus') + , nodes = stylus.nodes + , utils = stylus.utils + +/** + * Expose `hello`. + */ + +module.exports = function(value) { + if (value) { + return 'Hello ' + value.toString().toUpperCase() + } else { + return 'Hello World' + } +} From 3c7ac673103cd80253f8f6d34dcec85cdd3c4b7d Mon Sep 17 00:00:00 2001 From: kizu Date: Sun, 16 Sep 2012 04:38:29 +0400 Subject: [PATCH 188/254] Renamed template for plugin --- lib/nib.js | 4 ++-- lib/nodes/{hello-world.js => vendor-helpers.js} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/nodes/{hello-world.js => vendor-helpers.js} (88%) diff --git a/lib/nib.js b/lib/nib.js index 88ae2634..f5d32c3e 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -27,7 +27,7 @@ try { // ignore } -var hello = require('./nodes/hello-world') +var vendorHelpers = require('./nodes/vendor-helpers') /** * Library version. @@ -67,6 +67,6 @@ function plugin() { style.define('has-canvas', nodes.false); } - style.define('hello-world', hello); + style.define('gradients-syntax-fix', vendorHelpers); } } diff --git a/lib/nodes/hello-world.js b/lib/nodes/vendor-helpers.js similarity index 88% rename from lib/nodes/hello-world.js rename to lib/nodes/vendor-helpers.js index e1995df9..c24d8d67 100644 --- a/lib/nodes/hello-world.js +++ b/lib/nodes/vendor-helpers.js @@ -8,7 +8,7 @@ var stylus = require('stylus') , utils = stylus.utils /** - * Expose `hello`. + * Expose `gradients-syntax-fix`. */ module.exports = function(value) { From 3d57d9bf204515e560007cc1383cf9a88898a326 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 11 Oct 2012 01:38:23 +0400 Subject: [PATCH 189/254] Blueprint for vendoring, no tests ATM, theyll come soon --- lib/nib.js | 2 +- lib/nib/vendor.styl | 2 +- lib/nodes/vendor-helpers.js | 21 ++++++++++++++++----- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/nib.js b/lib/nib.js index f5d32c3e..4b113a7b 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -67,6 +67,6 @@ function plugin() { style.define('has-canvas', nodes.false); } - style.define('gradients-syntax-fix', vendorHelpers); + style.define('vendorize', vendorHelpers); } } diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 0e76c98e..752a50cb 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -106,7 +106,7 @@ vendor(prop, args, only = null, ignore = null, vendor-property = true) newprop = '-' + prefix + '-' + prop if vendor-property // TODO: make the adjustments for differences // between the official syntax and vendor ones - {newprop}: newargs + {newprop}: vendorize(newargs) /* * Vendorize the given value. diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index c24d8d67..f34a6f44 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -8,13 +8,24 @@ var stylus = require('stylus') , utils = stylus.utils /** - * Expose `gradients-syntax-fix`. + * Expose `vendorize`. */ module.exports = function(value) { - if (value) { - return 'Hello ' + value.toString().toUpperCase() - } else { - return 'Hello World' + var result = value.toString(); + + if (result.indexOf('gradient(') > -1) { + result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|to (top|bottom|left|right))/g,function(match,p1,p2,p3,p4){ + var result = p1; + if (p2) { + result += parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) + 'deg'; + } + if (p4) { + result += {'top':'bottom','bottom':'top','left':'right','right':'left'}[p4]; + } + return result; + }); } + + return new nodes.Ident(result); } From 58415227f4d3e2a3f32ad62af8e4e2ad13df17a6 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 11 Oct 2012 01:41:46 +0400 Subject: [PATCH 190/254] to top left -- bottom right etc. support --- lib/nodes/vendor-helpers.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index f34a6f44..7142ba7c 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -15,13 +15,17 @@ module.exports = function(value) { var result = value.toString(); if (result.indexOf('gradient(') > -1) { - result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|to (top|bottom|left|right))/g,function(match,p1,p2,p3,p4){ + result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|to (top|bottom|left|right)( (top|bottom|left|right))?)/g,function(match,p1,p2,p3,p4,p5,p6){ var result = p1; + var sides = {'top':'bottom','bottom':'top','left':'right','right':'left'}; if (p2) { result += parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) + 'deg'; } if (p4) { - result += {'top':'bottom','bottom':'top','left':'right','right':'left'}[p4]; + result += sides[p4]; + } + if (p5) { + result += ' ' + sides[p6]; } return result; }); From 47373f5eb0c60278010b9691a063f8e5205b71fe Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 11 Oct 2012 15:01:50 +0400 Subject: [PATCH 191/254] Changing the vendorize for gradients, border-images and transtions to external js function instead of buggy Stylus hacks, fixes #94 --- lib/nib/gradients.styl | 4 +- lib/nib/vendor.styl | 84 +++---------------------------------- lib/nodes/vendor-helpers.js | 11 ++++- 3 files changed, 16 insertions(+), 83 deletions(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index db3a7bdf..461e5797 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -95,9 +95,7 @@ linear-gradient(start, stops...) // add-property(prop, replace(val, '__CALL__', img)) // start = start[1] - stops = normalize-stops(stops) - stops = join-stops(stops, std-stop) - 'linear-gradient(%s, %s)' % (start stops) + unquote('linear-gradient(' + join(', ',arguments) + ')') /* * Create a linear gradient image with the given start position diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 752a50cb..8a74359a 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -6,76 +6,6 @@ no-wrap = unquote('nowrap') -/* - * Helper to find out is the list of arguments have commas - */ - -is-comma-list() - return match('\), \(', ''+arguments) - -/* - * Helper to find out if a given value is a width - */ - -is-width(val) - if auto == val - return true - else if val && 'unit' == type(val) - // Stylus does not short circuit so we need to perform this as a distinct - // operation to prevent errors - return '' != unit(val) - return false - -/* - * Literal joining - */ - -literal-join(string, literals) - result = unquote('') - first = true - for args in literals - subresult = unquote('') - for arg in args - subresult = subresult arg - if first - result = subresult - first = false - else - result = s('%s%s%s', result, unquote(string), subresult) - return result - -/* - * Modify matched arguments - * set strict to false to check as “begin with” - */ - -modify-args(args, argument, prefix = '', postfix = '', replace = false, strict = true) - result = () - argument = unquote(argument) if type(argument) == 'string' - prefix = unquote(prefix) - postfix = unquote(postfix) - - // Checking if there are values divided by comma - if is-comma-list(args) - for subargs in args - subresult = () - for arg in subargs - if (arg == argument and strict) or (match(''+s('%s',argument),''+arg) and !strict) - arg = s('%s%s%s', prefix, replace ? replace : arg, postfix) - push(subresult, arg) if arg != unquote('') - subresult = literal-join(' ', subresult) if length(subresult) > 1 - push(result, subresult) - result = literal-join(', ', result) - else - for arg in args - if (arg == argument and strict) or (match(''+s('%s',argument),''+arg) and !strict) - arg = s('%s%s%s', prefix, replace ? replace : arg, postfix) - push(result, arg) if arg != unquote('') - return result - -remove-args(args, argument, strict = true) - return modify-args(args, argument, replace: unquote(''), strict: strict) - /* * Vendor support for the given prop / arguments, * optionally specifying the only prefixes to utilize, @@ -91,22 +21,18 @@ vendor(prop, args, only = null, ignore = null, vendor-property = true) newargs = args // Transforms in transitions need the prefixes - if prop in ('transition' 'transition-property') - newargs = modify-args(newargs, transform, '-' + prefix + '-') - - // Adding prefixes for gradients - if prop in ('border-image' 'background' 'background-image' 'cursor' 'list-style' 'list-style-image') - newargs = modify-args(newargs, "-gradient\(", '-' + prefix + '-', strict: false) + // if prop in ('transition' 'transition-property') + // newargs = modify-args(newargs, transform, '-' + prefix + '-') // Removing the `fill` from prefixed border-images - if prop in ('border-image' 'border-image-slice') - newargs = remove-args(newargs, fill) + // if prop in ('border-image' 'border-image-slice') + // newargs = remove-args(newargs, fill) newprop = prop newprop = '-' + prefix + '-' + prop if vendor-property // TODO: make the adjustments for differences // between the official syntax and vendor ones - {newprop}: vendorize(newargs) + {newprop}: vendorize(prop,('%s' % args),prefix) /* * Vendorize the given value. diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 7142ba7c..8ba3170a 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -11,7 +11,7 @@ var stylus = require('stylus') * Expose `vendorize`. */ -module.exports = function(value) { +module.exports = function(property,value,prefix) { var result = value.toString(); if (result.indexOf('gradient(') > -1) { @@ -29,6 +29,15 @@ module.exports = function(value) { } return result; }); + result = result.replace(/((repeating-)?(linear|radial)-gradient\()/g,'-' + prefix + '-$1'); + } + + if (property == "'transition'" || property == "'transition-property'") { + result = result.replace(/\b(transform)\b/g,'-' + prefix + '-$1'); + } + + if (property == "'border-image'" || property == "'border-image-slice'") { + result = result.replace(/\b(fill)\b/g,''); } return new nodes.Ident(result); From 4ffa5363d0811b85d48238d8c8d0926a346d1d73 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 11 Oct 2012 15:47:03 +0400 Subject: [PATCH 192/254] Added radial-gradient tests + a fixed some bugs and fixed all the tests to apply the legacy syntax --- lib/nib.js | 2 +- lib/nib/vendor.styl | 23 +++--- lib/nodes/vendor-helpers.js | 53 ++++++++----- test/cases/linear-gradient.css | 116 ++++++++++++++--------------- test/cases/multiple-gradients.css | 40 +++++----- test/cases/multiple-gradients.styl | 16 ++-- test/cases/radial-gradient.css | 7 ++ test/cases/radial-gradient.styl | 6 ++ 8 files changed, 143 insertions(+), 120 deletions(-) create mode 100644 test/cases/radial-gradient.css create mode 100644 test/cases/radial-gradient.styl diff --git a/lib/nib.js b/lib/nib.js index 4b113a7b..0d543ccf 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -67,6 +67,6 @@ function plugin() { style.define('has-canvas', nodes.false); } - style.define('vendorize', vendorHelpers); + style.define('normalize', vendorHelpers); } } diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 8a74359a..6c6c8d97 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -13,27 +13,22 @@ no-wrap = unquote('nowrap') */ vendor(prop, args, only = null, ignore = null, vendor-property = true) + need_normalize = !vendor-property or prop in ('transition' 'transition-property' 'border-image' 'border-image-slice') for prefix in vendor-prefixes unless (only and !(prefix in only)) or (ignore and prefix in ignore) if official == prefix - {prop}: args + if need_normalize + {prop}: normalize(prop,('%s' % args)) + else + {prop}: args else - newargs = args - - // Transforms in transitions need the prefixes - // if prop in ('transition' 'transition-property') - // newargs = modify-args(newargs, transform, '-' + prefix + '-') - - // Removing the `fill` from prefixed border-images - // if prop in ('border-image' 'border-image-slice') - // newargs = remove-args(newargs, fill) - newprop = prop newprop = '-' + prefix + '-' + prop if vendor-property - // TODO: make the adjustments for differences - // between the official syntax and vendor ones - {newprop}: vendorize(prop,('%s' % args),prefix) + if need_normalize + {newprop}: normalize(prop,('%s' % args),prefix) + else + {newprop}: args /* * Vendorize the given value. */ diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 8ba3170a..2cf58369 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -8,36 +8,51 @@ var stylus = require('stylus') , utils = stylus.utils /** - * Expose `vendorize`. + * Expose `normalize`. */ module.exports = function(property,value,prefix) { var result = value.toString(); + /* Fixing the gradients */ if (result.indexOf('gradient(') > -1) { - result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|to (top|bottom|left|right)( (top|bottom|left|right))?)/g,function(match,p1,p2,p3,p4,p5,p6){ - var result = p1; - var sides = {'top':'bottom','bottom':'top','left':'right','right':'left'}; - if (p2) { - result += parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) + 'deg'; - } - if (p4) { - result += sides[p4]; - } - if (p5) { - result += ' ' + sides[p6]; - } - return result; - }); - result = result.replace(/((repeating-)?(linear|radial)-gradient\()/g,'-' + prefix + '-$1'); + + /* Normalize color stops */ + if (result.indexOf('%') > -1) { + result = result.replace(/([\(\,]\s*)(-?(?:\d*\.)?\d+%)(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g,'$1$4$3$2'); + } + + if (prefix) { + result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|to (top|bottom|left|right)( (top|bottom|left|right))?)/g,function(match,p1,p2,p3,p4,p5,p6){ + /* Fix the degrees to the legacy syntax */ + var result = p1; + if (p2) { + result += parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) + 'deg'; + } + /* Fix the directions to the legacy syntax */ + var sides = {'top':'bottom','bottom':'top','left':'right','right':'left'}; + if (p4) { + result += sides[p4]; + } + if (p5) { + result += ' ' + sides[p6]; + } + return result; + }); + + /* Adding prefixes to the legacy gradients */ + result = result.replace(/((repeating-)?(linear|radial)-gradient\()/g,'-' + prefix + '-$1'); + } } - if (property == "'transition'" || property == "'transition-property'") { + /* Adding prefixes to the `transform` values of legacy `transition` property */ + if (prefix && (property == "'transition'" || property == "'transition-property'")) { result = result.replace(/\b(transform)\b/g,'-' + prefix + '-$1'); } - if (property == "'border-image'" || property == "'border-image-slice'") { - result = result.replace(/\b(fill)\b/g,''); + /* Removing `fill` keyword from the legacy `border-image` property */ + if (prefix && (property == "'border-image'" || property == "'border-image-slice'")) { + result = result.replace(/\s*\b(fill)\b\s*/g,' '); } return new nodes.Ident(result); diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 3bf8d034..36dcaf34 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -1,82 +1,82 @@ body { - background: -webkit-linear-gradient(#fff, #000 100%); - background: -moz-linear-gradient(#fff, #000 100%); - background: -o-linear-gradient(#fff, #000 100%); - background: -ms-linear-gradient(#fff, #000 100%); - background: linear-gradient(#fff, #000 100%); + background: -webkit-linear-gradient(#fff, #000); + background: -moz-linear-gradient(#fff, #000); + background: -o-linear-gradient(#fff, #000); + background: -ms-linear-gradient(#fff, #000); + background: linear-gradient(#fff, #000); } body { - background: -webkit-linear-gradient(top, #fff 0, #000 100%); - background: -moz-linear-gradient(top, #fff 0, #000 100%); - background: -o-linear-gradient(top, #fff 0, #000 100%); - background: -ms-linear-gradient(top, #fff 0, #000 100%); - background: linear-gradient(top, #fff 0, #000 100%); + background: -webkit-linear-gradient(top, #fff, #000); + background: -moz-linear-gradient(top, #fff, #000); + background: -o-linear-gradient(top, #fff, #000); + background: -ms-linear-gradient(top, #fff, #000); + background: linear-gradient(top, #fff, #000); } body { - background: -webkit-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); - background: -moz-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); - background: -o-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); - background: -ms-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); - background: linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); + background: -webkit-linear-gradient(top left, #fff, #f00, #00f, #000); + background: -moz-linear-gradient(top left, #fff, #f00, #00f, #000); + background: -o-linear-gradient(top left, #fff, #f00, #00f, #000); + background: -ms-linear-gradient(top left, #fff, #f00, #00f, #000); + background: linear-gradient(top left, #fff, #f00, #00f, #000); } body { - background: -webkit-linear-gradient(bottom right, #fff 0, #000 80%); - background: -moz-linear-gradient(bottom right, #fff 0, #000 80%); - background: -o-linear-gradient(bottom right, #fff 0, #000 80%); - background: -ms-linear-gradient(bottom right, #fff 0, #000 80%); - background: linear-gradient(bottom right, #fff 0, #000 80%); + background: -webkit-linear-gradient(bottom right, #fff, #000 80%); + background: -moz-linear-gradient(bottom right, #fff, #000 80%); + background: -o-linear-gradient(bottom right, #fff, #000 80%); + background: -ms-linear-gradient(bottom right, #fff, #000 80%); + background: linear-gradient(bottom right, #fff, #000 80%); } body { - background: -webkit-linear-gradient(right bottom, #fff 0, #000 80%); - background: -moz-linear-gradient(right bottom, #fff 0, #000 80%); - background: -o-linear-gradient(right bottom, #fff 0, #000 80%); - background: -ms-linear-gradient(right bottom, #fff 0, #000 80%); - background: linear-gradient(right bottom, #fff 0, #000 80%); + background: -webkit-linear-gradient(right bottom, #fff, #000 80%); + background: -moz-linear-gradient(right bottom, #fff, #000 80%); + background: -o-linear-gradient(right bottom, #fff, #000 80%); + background: -ms-linear-gradient(right bottom, #fff, #000 80%); + background: linear-gradient(right bottom, #fff, #000 80%); } body { - background: -webkit-linear-gradient(top, #fff 0, #000 100%); - background: -moz-linear-gradient(top, #fff 0, #000 100%); - background: -ms-linear-gradient(top, #fff 0, #000 100%); - background: -o-linear-gradient(top, #fff 0, #000 100%); - background: linear-gradient(top, #fff 0, #000 100%); + background: -webkit-linear-gradient(top, #fff, #000); + background: -moz-linear-gradient(top, #fff, #000); + background: -ms-linear-gradient(top, #fff, #000); + background: -o-linear-gradient(top, #fff, #000); + background: linear-gradient(top, #fff, #000); } body { - background: -webkit-linear-gradient(top, #fff 0, #000 100%), #fff; - background: -moz-linear-gradient(top, #fff 0, #000 100%), #fff; - background: -ms-linear-gradient(top, #fff 0, #000 100%), #fff; - background: -o-linear-gradient(top, #fff 0, #000 100%), #fff; - background: linear-gradient(top, #fff 0, #000 100%), #fff; + background: -webkit-linear-gradient(top, #fff, #000), #fff; + background: -moz-linear-gradient(top, #fff, #000), #fff; + background: -ms-linear-gradient(top, #fff, #000), #fff; + background: -o-linear-gradient(top, #fff, #000), #fff; + background: linear-gradient(top, #fff, #000), #fff; } body { - -webkit-border-image: -webkit-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; - -moz-border-image: -moz-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; - -o-border-image: -o-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; - border-image: linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; + -webkit-border-image: -webkit-linear-gradient(top, #fff, #000) 20% stretch stretch; + -moz-border-image: -moz-linear-gradient(top, #fff, #000) 20% stretch stretch; + -o-border-image: -o-linear-gradient(top, #fff, #000) 20% stretch stretch; + border-image: linear-gradient(top, #fff, #000) 20% stretch stretch; } body { - -webkit-border-image: -webkit-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; - -moz-border-image: -moz-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; - -o-border-image: -o-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; - border-image: linear-gradient(top, #fff 0, #000 100%) 20% fill stretch stretch; + -webkit-border-image: -webkit-linear-gradient(top, #fff, #000) 20% stretch stretch; + -moz-border-image: -moz-linear-gradient(top, #fff, #000) 20% stretch stretch; + -o-border-image: -o-linear-gradient(top, #fff, #000) 20% stretch stretch; + border-image: linear-gradient(top, #fff, #000) 20% fill stretch stretch; } body { - cursor: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); - cursor: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); - cursor: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); - cursor: -o-linear-gradient(40deg, #f00 0, #0f0 100%); - cursor: linear-gradient(40deg, #f00 0, #0f0 100%); + cursor: -webkit-linear-gradient(50deg, #f00, #0f0); + cursor: -moz-linear-gradient(50deg, #f00, #0f0); + cursor: -ms-linear-gradient(50deg, #f00, #0f0); + cursor: -o-linear-gradient(50deg, #f00, #0f0); + cursor: linear-gradient(40deg, #f00, #0f0); } body { - list-style: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style: -o-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style: linear-gradient(40deg, #f00 0, #0f0 100%); + list-style: -webkit-linear-gradient(50deg, #f00, #0f0); + list-style: -moz-linear-gradient(50deg, #f00, #0f0); + list-style: -ms-linear-gradient(50deg, #f00, #0f0); + list-style: -o-linear-gradient(50deg, #f00, #0f0); + list-style: linear-gradient(40deg, #f00, #0f0); } body { - list-style-image: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style-image: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style-image: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style-image: -o-linear-gradient(40deg, #f00 0, #0f0 100%); - list-style-image: linear-gradient(40deg, #f00 0, #0f0 100%); + list-style-image: -webkit-linear-gradient(50deg, #f00, #0f0); + list-style-image: -moz-linear-gradient(50deg, #f00, #0f0); + list-style-image: -ms-linear-gradient(50deg, #f00, #0f0); + list-style-image: -o-linear-gradient(50deg, #f00, #0f0); + list-style-image: linear-gradient(40deg, #f00, #0f0); } diff --git a/test/cases/multiple-gradients.css b/test/cases/multiple-gradients.css index 21c4da12..7726f931 100644 --- a/test/cases/multiple-gradients.css +++ b/test/cases/multiple-gradients.css @@ -1,28 +1,28 @@ .test1 { - background: -webkit-linear-gradient(top, #fff 0, #000 100%), -webkit-linear-gradient(bottom, #000 0, #fff 100%); - background: -moz-linear-gradient(top, #fff 0, #000 100%), -moz-linear-gradient(bottom, #000 0, #fff 100%); - background: -o-linear-gradient(top, #fff 0, #000 100%), -o-linear-gradient(bottom, #000 0, #fff 100%); - background: -ms-linear-gradient(top, #fff 0, #000 100%), -ms-linear-gradient(bottom, #000 0, #fff 100%); - background: linear-gradient(top, #fff 0, #000 100%), linear-gradient(bottom, #000 0, #fff 100%); + background: -webkit-linear-gradient(bottom, #fff, #000), -webkit-linear-gradient(top, #000, #fff); + background: -moz-linear-gradient(bottom, #fff, #000), -moz-linear-gradient(top, #000, #fff); + background: -o-linear-gradient(bottom, #fff, #000), -o-linear-gradient(top, #000, #fff); + background: -ms-linear-gradient(bottom, #fff, #000), -ms-linear-gradient(top, #000, #fff); + background: linear-gradient(to top, #fff, #000), linear-gradient(to bottom, #000, #fff); } .test2 { - background: #fff -webkit-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -webkit-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; - background: #fff -moz-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -moz-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; - background: #fff -o-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -o-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; - background: #fff -ms-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -ms-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; - background: #fff linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; + background: #fff -webkit-linear-gradient(bottom, #000, #fff) 0 0 no-repeat, -webkit-linear-gradient(top, #000, #fff) 10px bottom repeat-y; + background: #fff -moz-linear-gradient(bottom, #000, #fff) 0 0 no-repeat, -moz-linear-gradient(top, #000, #fff) 10px bottom repeat-y; + background: #fff -o-linear-gradient(bottom, #000, #fff) 0 0 no-repeat, -o-linear-gradient(top, #000, #fff) 10px bottom repeat-y; + background: #fff -ms-linear-gradient(bottom, #000, #fff) 0 0 no-repeat, -ms-linear-gradient(top, #000, #fff) 10px bottom repeat-y; + background: #fff linear-gradient(to top, #000, #fff) 0 0 no-repeat, linear-gradient(to bottom, #000, #fff) 10px bottom repeat-y; } .test3 { - background-image: -webkit-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -webkit-linear-gradient(bottom, #000 0, #fff 100%); - background-image: -moz-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -moz-linear-gradient(bottom, #000 0, #fff 100%); - background-image: -o-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -o-linear-gradient(bottom, #000 0, #fff 100%); - background-image: -ms-linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), -ms-linear-gradient(bottom, #000 0, #fff 100%); - background-image: linear-gradient(top, #fff 0, #000 100%), url("https://github.com/a.png"), linear-gradient(bottom, #000 0, #fff 100%); + background-image: -webkit-linear-gradient(bottom, #fff, #000), url("https://github.com/a.png"), -webkit-linear-gradient(top, #000, #fff); + background-image: -moz-linear-gradient(bottom, #fff, #000), url("https://github.com/a.png"), -moz-linear-gradient(top, #000, #fff); + background-image: -o-linear-gradient(bottom, #fff, #000), url("https://github.com/a.png"), -o-linear-gradient(top, #000, #fff); + background-image: -ms-linear-gradient(bottom, #fff, #000), url("https://github.com/a.png"), -ms-linear-gradient(top, #000, #fff); + background-image: linear-gradient(to top, #fff, #000), url("https://github.com/a.png"), linear-gradient(to bottom, #000, #fff); } .test4 { - background: -webkit-linear-gradient(bottom, #000 0, #fff 100%), -webkit-linear-gradient(top, #fff 0, #000 100%); - background: -moz-linear-gradient(bottom, #000 0, #fff 100%), -moz-linear-gradient(top, #fff 0, #000 100%); - background: -o-linear-gradient(bottom, #000 0, #fff 100%), -o-linear-gradient(top, #fff 0, #000 100%); - background: -ms-linear-gradient(bottom, #000 0, #fff 100%), -ms-linear-gradient(top, #fff 0, #000 100%); - background: linear-gradient(bottom, #000 0, #fff 100%), linear-gradient(top, #fff 0, #000 100%); + background: -webkit-linear-gradient(top, #000, #fff), -webkit-linear-gradient(bottom, #fff, #000); + background: -moz-linear-gradient(top, #000, #fff), -moz-linear-gradient(bottom, #fff, #000); + background: -o-linear-gradient(top, #000, #fff), -o-linear-gradient(bottom, #fff, #000); + background: -ms-linear-gradient(top, #000, #fff), -ms-linear-gradient(bottom, #fff, #000); + background: linear-gradient(to bottom, #000, #fff), linear-gradient(to top, #fff, #000); } diff --git a/test/cases/multiple-gradients.styl b/test/cases/multiple-gradients.styl index ea6b38ff..e97e8a7f 100644 --- a/test/cases/multiple-gradients.styl +++ b/test/cases/multiple-gradients.styl @@ -3,21 +3,21 @@ @import 'https://github.com/nib/gradients' .test1 - background: linear-gradient(top, white, black), - linear-gradient(bottom, black, white) + background: linear-gradient(to top, white, black), + linear-gradient(to bottom, black, white) .test2 background: #fff \ - linear-gradient(top, black, white) 0 0 no-repeat, - linear-gradient(bottom, black, white) 10px bottom repeat-y + linear-gradient(to top, black, white) 0 0 no-repeat, + linear-gradient(to bottom, black, white) 10px bottom repeat-y .test3 - background-image: linear-gradient(top, white, black), + background-image: linear-gradient(to top, white, black), url(https://github.com/a.png), - linear-gradient(bottom, black, white) + linear-gradient(to bottom, black, white) -gradient1 = linear-gradient(top, white, black) -gradient2 = linear-gradient(bottom, black, white) +gradient1 = linear-gradient(to top, white, black) +gradient2 = linear-gradient(to bottom, black, white) .test4 background: gradient2, gradient1 diff --git a/test/cases/radial-gradient.css b/test/cases/radial-gradient.css new file mode 100644 index 00000000..bc4e65c7 --- /dev/null +++ b/test/cases/radial-gradient.css @@ -0,0 +1,7 @@ +body { + background: -webkit-radial-gradient(50% 0, farthest-side, rgba(9,36,95,0.175), rgba(9,36,95,0)); + background: -moz-radial-gradient(50% 0, farthest-side, rgba(9,36,95,0.175), rgba(9,36,95,0)); + background: -o-radial-gradient(50% 0, farthest-side, rgba(9,36,95,0.175), rgba(9,36,95,0)); + background: -ms-radial-gradient(50% 0, farthest-side, rgba(9,36,95,0.175), rgba(9,36,95,0)); + background: radial-gradient(50% 0, farthest-side, rgba(9,36,95,0.175), rgba(9,36,95,0)); +} diff --git a/test/cases/radial-gradient.styl b/test/cases/radial-gradient.styl new file mode 100644 index 00000000..ad822ce3 --- /dev/null +++ b/test/cases/radial-gradient.styl @@ -0,0 +1,6 @@ + +@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/gradients' + +body + background: radial-gradient(50% 0, farthest-side, rgba(9,36,95,0.175), rgba(9,36,95,0)) From e2015d7f4b62cd1d15c92485c7dccfdcd8543af9 Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 11 Oct 2012 16:07:40 +0400 Subject: [PATCH 193/254] Added reverse fixing for official gradient values, like `top` to `to bottom` --- lib/nodes/vendor-helpers.js | 42 ++++++++++++++++++++++------------ test/cases/linear-gradient.css | 16 ++++++------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 2cf58369..2a0c0370 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -22,24 +22,38 @@ module.exports = function(property,value,prefix) { result = result.replace(/([\(\,]\s*)(-?(?:\d*\.)?\d+%)(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g,'$1$4$3$2'); } - if (prefix) { - result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|to (top|bottom|left|right)( (top|bottom|left|right))?)/g,function(match,p1,p2,p3,p4,p5,p6){ - /* Fix the degrees to the legacy syntax */ - var result = p1; - if (p2) { - result += parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) + 'deg'; + result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g,function(match,p1,p2,p3,p4,p5,p6,p7,p8){ + /* Fix the degrees to the legacy syntax */ + var result = p1; + if (p2) { + result += (prefix ? parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) : p2) + 'deg'; + } + + /* Fix the directions to the legacy syntax */ + var sides = {'top':'bottom','bottom':'top','left':'right','right':'left'}; + if (prefix && p5) { + // `to top` to `bottom` etc. + if (p6) { + result += sides[p6]; } - /* Fix the directions to the legacy syntax */ - var sides = {'top':'bottom','bottom':'top','left':'right','right':'left'}; - if (p4) { - result += sides[p4]; + if (p7) { + result += ' ' + sides[p8]; } - if (p5) { - result += ' ' + sides[p6]; + } else if (!prefix && !p5) { + // `top` to `to bottom` etc. + if (p6) { + result += 'to ' + sides[p6]; } - return result; - }); + if (p7) { + result += ' ' + sides[p8]; + } + } else if (p4) { + result += p4; + } + return result; + }); + if (prefix) { /* Adding prefixes to the legacy gradients */ result = result.replace(/((repeating-)?(linear|radial)-gradient\()/g,'-' + prefix + '-$1'); } diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index 36dcaf34..a82dbcee 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -10,54 +10,54 @@ body { background: -moz-linear-gradient(top, #fff, #000); background: -o-linear-gradient(top, #fff, #000); background: -ms-linear-gradient(top, #fff, #000); - background: linear-gradient(top, #fff, #000); + background: linear-gradient(to bottom, #fff, #000); } body { background: -webkit-linear-gradient(top left, #fff, #f00, #00f, #000); background: -moz-linear-gradient(top left, #fff, #f00, #00f, #000); background: -o-linear-gradient(top left, #fff, #f00, #00f, #000); background: -ms-linear-gradient(top left, #fff, #f00, #00f, #000); - background: linear-gradient(top left, #fff, #f00, #00f, #000); + background: linear-gradient(to bottom right, #fff, #f00, #00f, #000); } body { background: -webkit-linear-gradient(bottom right, #fff, #000 80%); background: -moz-linear-gradient(bottom right, #fff, #000 80%); background: -o-linear-gradient(bottom right, #fff, #000 80%); background: -ms-linear-gradient(bottom right, #fff, #000 80%); - background: linear-gradient(bottom right, #fff, #000 80%); + background: linear-gradient(to top left, #fff, #000 80%); } body { background: -webkit-linear-gradient(right bottom, #fff, #000 80%); background: -moz-linear-gradient(right bottom, #fff, #000 80%); background: -o-linear-gradient(right bottom, #fff, #000 80%); background: -ms-linear-gradient(right bottom, #fff, #000 80%); - background: linear-gradient(right bottom, #fff, #000 80%); + background: linear-gradient(to left top, #fff, #000 80%); } body { background: -webkit-linear-gradient(top, #fff, #000); background: -moz-linear-gradient(top, #fff, #000); background: -ms-linear-gradient(top, #fff, #000); background: -o-linear-gradient(top, #fff, #000); - background: linear-gradient(top, #fff, #000); + background: linear-gradient(to bottom, #fff, #000); } body { background: -webkit-linear-gradient(top, #fff, #000), #fff; background: -moz-linear-gradient(top, #fff, #000), #fff; background: -ms-linear-gradient(top, #fff, #000), #fff; background: -o-linear-gradient(top, #fff, #000), #fff; - background: linear-gradient(top, #fff, #000), #fff; + background: linear-gradient(to bottom, #fff, #000), #fff; } body { -webkit-border-image: -webkit-linear-gradient(top, #fff, #000) 20% stretch stretch; -moz-border-image: -moz-linear-gradient(top, #fff, #000) 20% stretch stretch; -o-border-image: -o-linear-gradient(top, #fff, #000) 20% stretch stretch; - border-image: linear-gradient(top, #fff, #000) 20% stretch stretch; + border-image: linear-gradient(to bottom, #fff, #000) 20% stretch stretch; } body { -webkit-border-image: -webkit-linear-gradient(top, #fff, #000) 20% stretch stretch; -moz-border-image: -moz-linear-gradient(top, #fff, #000) 20% stretch stretch; -o-border-image: -o-linear-gradient(top, #fff, #000) 20% stretch stretch; - border-image: linear-gradient(top, #fff, #000) 20% fill stretch stretch; + border-image: linear-gradient(to bottom, #fff, #000) 20% fill stretch stretch; } body { cursor: -webkit-linear-gradient(50deg, #f00, #0f0); From dfc5d9eb603185d335791246a02152da6d95c896 Mon Sep 17 00:00:00 2001 From: Mikhail Korepanov Date: Tue, 16 Oct 2012 04:13:06 +0400 Subject: [PATCH 194/254] refactoring + code style fix --- lib/nodes/vendor-helpers.js | 83 +++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index e1decd01..11ca22c5 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -4,69 +4,72 @@ */ var stylus = require('stylus') - , nodes = stylus.nodes - , utils = stylus.utils + , nodes = stylus.nodes; + +var RE_GRADIENT_STOPS = /([\(\,]\s*)(-?(?:\d*\.)?\d+(?:%|px|em))(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g + , RE_GRADIENT_VAL = /(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g + , RE_GRADIENT_TYPE = /((repeating-)?(linear|radial)-gradient\()/g + , RE_TRANSFORM = /\b(transform)\b/g + , RE_FILL_KEYWORD = /\s*\b(fill)\b\s*/g; + +var DIRECTIONS = { top: 'bottom', bottom: 'top', left: 'right', right:'left' }; /** * Expose `normalize`. */ -module.exports = function(property,value,prefix) { - var result = value.toString(); +exports = module.exports = normalize; + +function normalize(property, value, prefix){ + var result = value.toString() + , args; /* Fixing the gradients */ - if (result.indexOf('gradient(') > -1) { + if (~result.indexOf('gradient(')) { /* Normalize color stops */ - result = result.replace(/([\(\,]\s*)(-?(?:\d*\.)?\d+(?:%|px|em))(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g,'$1$4$3$2'); + result = result.replace(RE_GRADIENT_STOPS,'$1$4$3$2'); /* Normalize legacy gradients */ - result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g,function(match,p1,p2,p3,p4,p5,p6,p7,p8){ - /* Fix the degrees to the legacy syntax */ - var result = p1; - if (p2) { - result += (prefix ? parseFloat((Math.abs(450 - p2) % 360).toFixed(3)) : p2) + 'deg'; - } - - /* Fix the directions to the legacy syntax */ - var sides = {'top':'bottom','bottom':'top','left':'right','right':'left'}; - if (prefix && p5) { - // `to top` to `bottom` etc. - if (p6) { - result += sides[p6]; - } - if (p7) { - result += ' ' + sides[p8]; - } - } else if (!prefix && !p5) { - // `top` to `to bottom` etc. - if (p6) { - result += 'to ' + sides[p6]; - } - if (p7) { - result += ' ' + sides[p8]; - } - } else if (p4) { - result += p4; - } - return result; + result = result.replace(RE_GRADIENT_VAL, function(){ + args = [].slice.call(arguments, 1); + return normalizeGradient(args, prefix); }); /* Adding prefixes to the legacy gradients */ - if (prefix) { - result = result.replace(/((repeating-)?(linear|radial)-gradient\()/g,'-' + prefix + '-$1'); - } + if (prefix) result = result.replace(RE_GRADIENT_TYPE, '-' + prefix + '-$1'); } /* Adding prefixes to the `transform` values of legacy `transition` property */ if (prefix && (property == "'transition'" || property == "'transition-property'")) { - result = result.replace(/\b(transform)\b/g,'-' + prefix + '-$1'); + result = result.replace(RE_TRANSFORM, '-' + prefix + '-$1'); } /* Removing `fill` keyword from the legacy `border-image` property */ if (prefix && (property == "'border-image'" || property == "'border-image-slice'")) { - result = result.replace(/\s*\b(fill)\b\s*/g,' '); + result = result.replace(RE_FILL_KEYWORD, ' '); } return new nodes.Ident(result); } + +function normalizeGradient(parts, prefix){ + /* Fix the degrees to the legacy syntax */ + var val = parts[0]; + if (parts[1]) val += (prefix ? parseFloat((Math.abs(450 - parts[1]) % 360).toFixed(3)) : parts[1]) + 'deg'; + + /* Fix the directions to the legacy syntax */ + if (prefix && parts[4]) { + // `to top` to `bottom` etc. + if (parts[5]) val += DIRECTIONS[parts[5]]; + if (parts[6]) val += ' ' + DIRECTIONS[parts[7]]; + } else if (!prefix && !parts[4]) { + // `top` to `to bottom` etc. + if (parts[5]) val += 'to ' + DIRECTIONS[parts[5]]; + if (parts[6]) val += ' ' + DIRECTIONS[parts[7]]; + } else { + if (parts[3]) val += parts[3]; + } + + return val; +} From fdf2c39b28ed04c2c2f8b23c7672a24cc7d747ac Mon Sep 17 00:00:00 2001 From: kizu Date: Thu, 11 Oct 2012 16:21:36 +0400 Subject: [PATCH 195/254] More tests + accept em&px for normalizing color stops --- lib/nodes/vendor-helpers.js | 7 ++--- test/cases/linear-gradient.css | 56 +++++++++++++++++++++++++++++++++ test/cases/linear-gradient.styl | 24 ++++++++++++++ 3 files changed, 83 insertions(+), 4 deletions(-) diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 2a0c0370..e1decd01 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -18,10 +18,9 @@ module.exports = function(property,value,prefix) { if (result.indexOf('gradient(') > -1) { /* Normalize color stops */ - if (result.indexOf('%') > -1) { - result = result.replace(/([\(\,]\s*)(-?(?:\d*\.)?\d+%)(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g,'$1$4$3$2'); - } + result = result.replace(/([\(\,]\s*)(-?(?:\d*\.)?\d+(?:%|px|em))(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g,'$1$4$3$2'); + /* Normalize legacy gradients */ result = result.replace(/(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g,function(match,p1,p2,p3,p4,p5,p6,p7,p8){ /* Fix the degrees to the legacy syntax */ var result = p1; @@ -53,8 +52,8 @@ module.exports = function(property,value,prefix) { return result; }); + /* Adding prefixes to the legacy gradients */ if (prefix) { - /* Adding prefixes to the legacy gradients */ result = result.replace(/((repeating-)?(linear|radial)-gradient\()/g,'-' + prefix + '-$1'); } } diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index a82dbcee..b4a664cb 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -12,6 +12,34 @@ body { background: -ms-linear-gradient(top, #fff, #000); background: linear-gradient(to bottom, #fff, #000); } +body { + background: -webkit-linear-gradient(bottom, #fff, #000); + background: -moz-linear-gradient(bottom, #fff, #000); + background: -o-linear-gradient(bottom, #fff, #000); + background: -ms-linear-gradient(bottom, #fff, #000); + background: linear-gradient(to top, #fff, #000); +} +body { + background: -webkit-linear-gradient(top left, #fff, #000); + background: -moz-linear-gradient(top left, #fff, #000); + background: -o-linear-gradient(top left, #fff, #000); + background: -ms-linear-gradient(top left, #fff, #000); + background: linear-gradient(to bottom right, #fff, #000); +} +body { + background: -webkit-linear-gradient(45deg, #fff, #000); + background: -moz-linear-gradient(45deg, #fff, #000); + background: -o-linear-gradient(45deg, #fff, #000); + background: -ms-linear-gradient(45deg, #fff, #000); + background: linear-gradient(45deg, #fff, #000); +} +body { + background: -webkit-linear-gradient(135deg, #fff, #000); + background: -moz-linear-gradient(135deg, #fff, #000); + background: -o-linear-gradient(135deg, #fff, #000); + background: -ms-linear-gradient(135deg, #fff, #000); + background: linear-gradient(-45deg, #fff, #000); +} body { background: -webkit-linear-gradient(top left, #fff, #f00, #00f, #000); background: -moz-linear-gradient(top left, #fff, #f00, #00f, #000); @@ -33,6 +61,34 @@ body { background: -ms-linear-gradient(right bottom, #fff, #000 80%); background: linear-gradient(to left top, #fff, #000 80%); } +body { + background: -webkit-linear-gradient(right bottom, #fff 80%, #000); + background: -moz-linear-gradient(right bottom, #fff 80%, #000); + background: -o-linear-gradient(right bottom, #fff 80%, #000); + background: -ms-linear-gradient(right bottom, #fff 80%, #000); + background: linear-gradient(to left top, #fff 80%, #000); +} +body { + background: -webkit-linear-gradient(right bottom, rgba(0,0,0,0.5) 80%, #000); + background: -moz-linear-gradient(right bottom, rgba(0,0,0,0.5) 80%, #000); + background: -o-linear-gradient(right bottom, rgba(0,0,0,0.5) 80%, #000); + background: -ms-linear-gradient(right bottom, rgba(0,0,0,0.5) 80%, #000); + background: linear-gradient(to left top, rgba(0,0,0,0.5) 80%, #000); +} +body { + background: -webkit-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); + background: -moz-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); + background: -o-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); + background: -ms-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); + background: linear-gradient(to left top, hsla(0,0,0,0.5) 80.5%, #000); +} +body { + background: -webkit-linear-gradient(right bottom, #fff 20px, #000); + background: -moz-linear-gradient(right bottom, #fff 20px, #000); + background: -o-linear-gradient(right bottom, #fff 20px, #000); + background: -ms-linear-gradient(right bottom, #fff 20px, #000); + background: linear-gradient(to left top, #fff 20px, #000); +} body { background: -webkit-linear-gradient(top, #fff, #000); background: -moz-linear-gradient(top, #fff, #000); diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 07257154..cb5f22be 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -8,6 +8,18 @@ body body background: linear-gradient(top, white, black) +body + background: linear-gradient(to top, white, black) + +body + background: linear-gradient(to bottom right, white, black) + +body + background: linear-gradient(45deg, white, black) + +body + background: linear-gradient(-45deg, white, black) + body background: linear-gradient(top left, white, red, blue, black) @@ -17,6 +29,18 @@ body body background: linear-gradient(right bottom, white, 80% black) +body + background: linear-gradient(right bottom, 80% white, black) + +body + background: linear-gradient(right bottom, 80% rgba(#000,0.5), black) + +body + background: linear-gradient(right bottom, 80.5% hsla(0,0,0,0.5), black) + +body + background: linear-gradient(right bottom, 20px white, black) + vendor-prefixes = webkit moz ms o official body From ac884696dc1b4939459aa26e932988c59590bc0e Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 15 Jun 2013 22:22:58 -0500 Subject: [PATCH 196/254] added check leaks to mocha.opts --- test/mocha.opts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mocha.opts b/test/mocha.opts index fe915b2f..6b7a1381 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,2 +1,3 @@ --require should -test/runner.js \ No newline at end of file +--check-leaks +test/runner.js From 81b31820fcb5eb0ee78189b1433e1343e9f95c02 Mon Sep 17 00:00:00 2001 From: kizu Date: Sun, 28 Jul 2013 21:32:43 +0400 Subject: [PATCH 197/254] Changed the vendor plugin to be used in .styl, so literal nib import would work --- lib/nib.js | 4 ---- lib/nib/vendor.styl | 5 +++-- lib/nodes/vendor-helpers.js | 22 +++++++++++----------- package.json | 2 +- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/nib.js b/lib/nib.js index 0d543ccf..5d02791e 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -27,8 +27,6 @@ try { // ignore } -var vendorHelpers = require('./nodes/vendor-helpers') - /** * Library version. */ @@ -66,7 +64,5 @@ function plugin() { } else { style.define('has-canvas', nodes.false); } - - style.define('normalize', vendorHelpers); } } diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index 6c6c8d97..fcf24138 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -1,3 +1,4 @@ +use('../nodes/vendor-helpers.js') @import 'https://github.com/config' /* @@ -504,13 +505,13 @@ border-radius() * // The comma is important * .placeholder-red * placeholder(color red,) - * + * * // We can pass a function * green-placeholder() * color green * .placeholder-green * placeholder(green-placeholder) - * + * * // We can pass a hash * textarea * placeholder((font-style italic) (font-weight bold) (padding '4px 10px')) diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 11ca22c5..8b9318d7 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -1,11 +1,3 @@ - -/** - * Module dependencies. - */ - -var stylus = require('stylus') - , nodes = stylus.nodes; - var RE_GRADIENT_STOPS = /([\(\,]\s*)(-?(?:\d*\.)?\d+(?:%|px|em))(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g , RE_GRADIENT_VAL = /(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g , RE_GRADIENT_TYPE = /((repeating-)?(linear|radial)-gradient\()/g @@ -18,8 +10,6 @@ var DIRECTIONS = { top: 'bottom', bottom: 'top', left: 'right', right:'left' }; * Expose `normalize`. */ -exports = module.exports = normalize; - function normalize(property, value, prefix){ var result = value.toString() , args; @@ -50,7 +40,7 @@ function normalize(property, value, prefix){ result = result.replace(RE_FILL_KEYWORD, ' '); } - return new nodes.Ident(result); + return result; } function normalizeGradient(parts, prefix){ @@ -73,3 +63,13 @@ function normalizeGradient(parts, prefix){ return val; } + +var plugin = function(){ + return function(style){ + var nodes = this.nodes; + style.define('normalize', function(property, value, prefix) { + return new nodes.Ident(normalize(property, value, prefix)); + }); + }; +}; +module.exports = plugin; diff --git a/package.json b/package.json index 9913f1f3..c315d294 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "0.31.x" + "stylus": "0.34.x" }, "devDependencies": { "connect": "1.x", From 4f74ecc0f0ec37ce95418b4bfef25b5e35d63340 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 31 Jul 2013 07:21:02 -0500 Subject: [PATCH 198/254] added a bit of documentation for vendorize --- lib/nodes/vendor-helpers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 8b9318d7..12c7d4aa 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -46,6 +46,10 @@ function normalize(property, value, prefix){ function normalizeGradient(parts, prefix){ /* Fix the degrees to the legacy syntax */ var val = parts[0]; + + // when the gradients were unprefixed, the w3c changed the way that the + // angle direction is interpreted. see: + // http://blogs.msdn.com/b/ie/archive/2012/06/25/unprefixed-css3-gradients-in-ie10.aspx if (parts[1]) val += (prefix ? parseFloat((Math.abs(450 - parts[1]) % 360).toFixed(3)) : parts[1]) + 'deg'; /* Fix the directions to the legacy syntax */ From 8787f56681c1c7407444ea0f2b273428c78e787b Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 31 Jul 2013 10:20:40 -0500 Subject: [PATCH 199/254] added back `is-width` flexbox relies on it --- lib/nib/vendor.styl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index fcf24138..e6b5fef6 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -8,9 +8,21 @@ use('../nodes/vendor-helpers.js') no-wrap = unquote('nowrap') /* - * Vendor support for the given prop / arguments, - * optionally specifying the only prefixes to utilize, - * or those which should be ignored. + * Helper to find out if a given value is a width + */ + +is-width(val) + if auto == val + return true + else if val && 'unit' == type(val) + // Stylus does not short circuit so we need to perform this as a distinct + // operation to prevent errors + return '' != unit(val) + return false + +/* + * Vendor support for the given prop / arguments, optionally specifying the + * only prefixes to utilize, or those which should be ignored. */ vendor(prop, args, only = null, ignore = null, vendor-property = true) From 7da46e4010c9952adc6dc5bd2fe101de45df0651 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Thu, 15 Aug 2013 09:27:20 -0500 Subject: [PATCH 200/254] 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c315d294..939b9f7a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "0.9.2", + "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From 26f87827371bfcc563115bb45540d4380e401d4e Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Tue, 20 Aug 2013 11:33:05 -0500 Subject: [PATCH 201/254] increase stylus version to 0.35.1 see #213 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 939b9f7a..16439828 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "0.34.x" + "stylus": "~0.35.1" }, "devDependencies": { "connect": "1.x", From 6dedb826ce752e577068da32eeb470b3b218ba4e Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Tue, 20 Aug 2013 18:46:48 -0500 Subject: [PATCH 202/254] Delete History.md moved to https://github.com/visionmedia/nib/releases --- History.md | 160 ----------------------------------------------------- 1 file changed, 160 deletions(-) delete mode 100644 History.md diff --git a/History.md b/History.md deleted file mode 100644 index a974e633..00000000 --- a/History.md +++ /dev/null @@ -1,160 +0,0 @@ - -0.9.1 / 2013-01-04 -================== - - * Quote -ms-filter selector value - * Vendor font-smoothing property - * fix call stack explosion when using `flex-wrap: wrap` - -0.9.0 / 2012-11-24 -================== - - * flex box update - -0.8.2 / 2012-08-28 -================== - - * fix `!important` preservation for all mixins [kizu] - -0.8.1 / 2012-08-21 -================== - - * add 'replace-text' mixin to nib/text index.styl - * revert "Remove obsolete FlexBox vendor-prefixes" [caseywebdev] - -0.8.0 / 2012-08-17 -================== - - * add prefixing of `transform` [kizu] - * add text-overflow vendor - * add overflow-scrolling vendor - -0.7.0 / 2012-07-09 -================== - - * add `image(path, [w], [h])` mixing - -0.6.0 / 2012-07-05 -================== - - * add support for `linear-gradient(stops...)`. Closes #110 - * replace hide-text() w/ text-indent: 100% method - -0.5.0 / 2012-05-28 -================== - - * Added perspective-origin property - * Added tab-size property - * Updated stylus dependency, fixes #89 - * Update opacity to clear issue with IE rendering value of 100 (to override previous semi-opaque state) and support IE5-8 in all the different varieties of life (http://www.quirksmode.org/css/opacity.html) - * Deprecated a couple EOL moz prefixes, removed -o-background-size - * Remove duplicate imports and defines (fixes #81) - * Refactored background-clip, added background-origin. - * Preserving importance for opacity - -0.4.1 / 2012-04-15 -================== - - * There is a moz-box-flex-group actually [kizu] - * There were no importance for overflow [kizu] - * Appearance is only webkit/moz now [kizu] - * Still no hyphens in Opera [kizu] - * There would be animations in IE10 and probably (there were an experimental build of it) in Opera 12) [kizu] - * Updated fexbox prefixes (flex-group is only in webkit, no ordinal-group in Opera) [kizu] - * 3D transforms now in IE10 and in Fx, but still not in Opera [kizu] - * There would be transitions in IE10 [kizu] - * Fixed the background-clip prefixes: it have different syntax for old webkit and moz, also it have only webkit for text [kizu] - * Added column-span and column-fill [kizu] - * Correct prefixes for column-clip, moved it in place with other column- props [kizu] - * There would be -ms-user-select in IE10 [kizu] - -0.4.0 / 2012-04-03 -================== - - * Added `box-ordinal-group` support [panosru] - * Added `transform-origin` support [panosru] - * Added `perspective` support - * Added `transform-style` support - * Added `display: box` vendor support - * Removed buttons - * Changed: use mocha for test runner - -0.3.2 / 2012-01-09 -================== - - * Remove `` from the `global-reset()` helper [TooTallNate] - -0.3.1 / 2011-11-30 -================== - - * Added vendor `appearance` property - * Updated `replace()` - * Fixed tests - -0.3.0 / 2011-11-17 -================== - - * Added support for o and ms prefixes to text-overflow helper [Ian Storm] - * Added "overflow: ellipsis" support [Ian Storm] - -0.2.0 / 2011-08-26 -================== - - * Added `color-image` stylus function [guillermo] - -0.1.0 / 2011-08-04 -================== - - * Added `box` style mixin [podviaznikov] - * Added `box-flex-group` to vendor.styl [podviaznikov] - * Added `box-direction` support [podviaznikov] - * Added `backface-visibility` [podviaznikov] - * Added `columns` support [podviaznikov] - * Added animations into vendor [podviaznikov] - * Lowered text-indent to a moderate -99999em, since my browser (Chromium 13.0.767.1 on Linux amd64) won't hide text if text-indent is below -6990506em. - -0.0.8 / 2011-05-24 -================== - - * Added _config.styl_ - * Added linear gradients for Opera, IE10 and WebKit (non-legacy) - * Moved `no-wrap` back to _vendor.styl_ - -0.0.7 / 2011-04-24 -================== - - * Added moz to `transition()`. Closes #4 - * Refactored reset - -0.0.6 / 2011-04-15 -================== - - * Added `has-canvas` global - * Added `clearfix()` [Isaac Johnston] - * Added `relative()` - * Fixed; ignore size unit for `linear-gradient()` when node-canvas is not available - -0.0.5 / 2011-04-12 -================== - - * `.include(nib.path)` within the plugin - -0.0.4 / 2011-04-12 -================== - - * Removed display inline - -0.0.3 / 2011-04-11 -================== - - * Fixed no-wrap backwards assignment - -0.0.2 / 2011-04-11 -================== - - * Fixed `no-wrap`, now a literal of `nowrap` - -0.0.1 / 2011-04-11 -================== - - * Initial release From cecf6b359dcac104d69be0c8bd733db9dc1d5070 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Tue, 20 Aug 2013 20:26:49 -0500 Subject: [PATCH 203/254] removed canvas from devDependancies Travis keeps failing because cairo isn't installed and our readme explains that it's needed anyway. --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 16439828..aae31e35 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "connect": "1.x", "jade": "0.22.0", "mocha": "*", - "should": "*", - "canvas": "*" + "should": "*" }, "author": "TJ Holowaychuk ", "main": "lib/nib.js", From 1bd9a789efc529ae5662cc0e6f954c0971fb5f33 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 21 Aug 2013 03:56:11 -0500 Subject: [PATCH 204/254] 1.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aae31e35..2957d2f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.0.0", + "version": "1.0.1", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From d6f95aa549d1470a3d18b4c1e1096e1d2cb37263 Mon Sep 17 00:00:00 2001 From: old9 Date: Fri, 23 Aug 2013 11:22:51 +0800 Subject: [PATCH 205/254] Added inline-flex for both IE 10 and others --- lib/nib/flex.styl | 8 ++++++-- test/cases/flex.css | 36 ++++++++++++++++++++++++++++++++++++ test/cases/flex.styl | 17 +++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 6ca3d5ac..4421da46 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -11,8 +11,12 @@ flex-version ?= box flex display(type, args...) if flex == type || inline-flex == type if box in flex-version - display: -ms-flexbox args - display: vendor-value(box args, only: moz webkit) + if flex == type + display: -ms-flexbox args + display: vendor-value(box args, only: moz webkit) + else + display: -ms-inline-flexbox args + display: vendor-value(inline-box args, only: moz webkit) if flex in flex-version display: vendor-value(arguments, only: webkit official) // overwrites old webkit else diff --git a/test/cases/flex.css b/test/cases/flex.css index fcee2157..49665e64 100644 --- a/test/cases/flex.css +++ b/test/cases/flex.css @@ -21,6 +21,14 @@ section div { -ms-flex: 1 0; flex: 1 0; } +section { + display: -webkit-inline-box; + display: -moz-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-box; + display: inline-flex; +} flex-flow { -webkit-box-direction: reverse; -moz-box-direction: reverse; @@ -196,6 +204,14 @@ section { display: box !important; display: flex !important; } +section { + display: -webkit-inline-box !important; + display: -moz-inline-box !important; + display: -webkit-inline-flex !important; + display: -ms-inline-flexbox !important; + display: inline-box !important; + display: inline-flex !important; +} section { display: -webkit-box; display: -moz-box; @@ -211,12 +227,24 @@ section div { -o-box-flex: 1; box-flex: 1; } +section { + display: -webkit-inline-box; + display: -moz-inline-box; + display: -ms-inline-flexbox; + display: inline-box; +} section { display: -webkit-box !important; display: -moz-box !important; display: -ms-flexbox !important; display: box !important; } +section { + display: -webkit-inline-box !important; + display: -moz-inline-box !important; + display: -ms-inline-flexbox !important; + display: inline-box !important; +} section { display: -webkit-flex; display: flex; @@ -229,7 +257,15 @@ section div { -ms-flex: 1 0; flex: 1 0; } +section { + display: -webkit-inline-flex; + display: inline-flex; +} section { display: -webkit-flex !important; display: flex !important; } +section { + display: -webkit-inline-flex !important; + display: inline-flex !important; +} diff --git a/test/cases/flex.styl b/test/cases/flex.styl index e561e98a..95c2fa83 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -9,6 +9,9 @@ section div flex: 1 0 +section + display: inline-flex + flex-flow flex-flow row-reverse flex-flow row wrap @@ -49,6 +52,8 @@ order section display: flex !important +section + display: inline-flex !important // Obsolete property conditional rendering flex-version = box @@ -59,9 +64,15 @@ section div flex: 1 0 +section + display: inline-flex + section display: flex !important +section + display: inline-flex !important + // New property conditional rendering flex-version = flex @@ -72,5 +83,11 @@ section div flex: 1 0 +section + display: inline-flex + section display: flex !important + +section + display: inline-flex !important From 5afa79786e7ea6390d24b2eb523f801f99545410 Mon Sep 17 00:00:00 2001 From: Roman Komarov Date: Fri, 23 Aug 2013 16:20:06 +0400 Subject: [PATCH 206/254] Removed not needed anymore `replace` function --- lib/nib/gradients.styl | 23 ----------------------- package.json | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index 461e5797..f1fbbad2 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -1,20 +1,6 @@ @import 'https://github.com/config' -/* - * Replace the given str with val in the expr. - */ - -replace(expr, str, val) - expr = clone(expr) - for e, i in expr - if length(e) > 1 - expr[i] = replace(e, str, val) - else - if str == e - expr[i] = val - expr - /* * Implicit color stop position. */ @@ -85,15 +71,6 @@ std-stop(color, pos) linear-gradient(start, stops...) error('color stops required') unless length(stops) - // if current-property - // if start is a 'color' - // unshift(stops, start) - // start = top - // if start[0] is a 'unit' - // if has-canvas - // img = linear-gradient-image(start, stops) - // add-property(prop, replace(val, '__CALL__', img)) - // start = start[1] unquote('linear-gradient(' + join(', ',arguments) + ')') diff --git a/package.json b/package.json index 2957d2f1..25c8996f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "~0.35.1" + "stylus": "~0.37.0" }, "devDependencies": { "connect": "1.x", From c5913b4a874352163f492fe19c34cb9389fec879 Mon Sep 17 00:00:00 2001 From: Niggler Date: Sun, 29 Sep 2013 09:26:36 -0700 Subject: [PATCH 207/254] added license to package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 25c8996f..e2a58559 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "nib", "description": "Stylus mixins and utilities", "version": "1.0.1", + "license": "MIT", "repository": { "type": "git", "url": "git://github.com/visionmedia/nib.git" From bc3effeed592952a1daa7638bc7a8afc93c9893a Mon Sep 17 00:00:00 2001 From: Eli Luberoff Date: Thu, 24 Oct 2013 14:53:21 -0700 Subject: [PATCH 208/254] adding test cases for variable numbers of args --- test/cases/absolute.css | 17 +++++++++++++++++ test/cases/absolute.styl | 11 ++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/test/cases/absolute.css b/test/cases/absolute.css index 661df5d1..bfdba536 100644 --- a/test/cases/absolute.css +++ b/test/cases/absolute.css @@ -7,4 +7,21 @@ position: absolute; top: 5px; left: 10px; +} +#login { + position: absolute; + top: 5px; + right: 5px; + bottom: 5px; +} +#login { + position: absolute; + top: 0; +} +#login { + position: absolute; + top: 0; + right: 5px; + bottom: 0; + left: 10px; } \ No newline at end of file diff --git a/test/cases/absolute.styl b/test/cases/absolute.styl index a4f789d5..6ac69571 100644 --- a/test/cases/absolute.styl +++ b/test/cases/absolute.styl @@ -5,4 +5,13 @@ absolute bottom right #login - absolute top 5px left 10px \ No newline at end of file + absolute top 5px left 10px + +#login + absolute top 5px right 5px bottom 5px + +#login + absolute top + +#login + absolute top right 5px bottom left 10px \ No newline at end of file From a024d628c798b5f9c1355847896dedae987e48aa Mon Sep 17 00:00:00 2001 From: Eli Luberoff Date: Thu, 24 Oct 2013 14:54:03 -0700 Subject: [PATCH 209/254] updating code to allow multiple arguments --- lib/nib/positions.styl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/nib/positions.styl b/lib/nib/positions.styl index 654d4440..2b526ea9 100644 --- a/lib/nib/positions.styl +++ b/lib/nib/positions.styl @@ -3,8 +3,10 @@ -pos(type, args) i = 0 position: unquote(type) - {args[i]}: args[i + 1] is a 'unit' ? args[i += 1] : 0 - {args[i += 1]}: args[i + 1] is a 'unit' ? args[i += 1] : 0 + for j in (1..4) + if length(args) > i + {args[i]}: args[i + 1] is a 'unit' ? args[i += 1] : 0 + i += 1 /* * Position utility. From bf7c48a78479bcc26b93d9e46b821cbfe41a40ce Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 4 Dec 2013 11:59:00 -0600 Subject: [PATCH 210/254] fix incorrect version number just read it from package.json so we don't need to change two places --- lib/nib.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nib.js b/lib/nib.js index 5d02791e..3128187f 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -10,6 +10,7 @@ */ var stylus = require('stylus') + , path = require('path') , nodes = stylus.nodes , utils = stylus.utils , Canvas @@ -31,7 +32,7 @@ try { * Library version. */ -exports.version = '0.8.2'; +exports.version = require(path.join(__dirname, '../package.json')).version; /** * Stylus path. From e271bf53f48924b9ad0cf2b26b2b8f20b4a6ca64 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 6 Jan 2014 10:23:38 -0600 Subject: [PATCH 211/254] move license into separate file --- LICENSE | 20 ++++++++++++++++++++ Readme.md | 25 ------------------------- 2 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..5aef4031 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2011 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Readme.md b/Readme.md index 89c03d6d..5c20edf1 100644 --- a/Readme.md +++ b/Readme.md @@ -91,28 +91,3 @@ I would love more contributors. And if you have helped out, you are awesome! I w - [Sean Lang](https://github.com/slang800) (Current Maintainer) - [Isaac Johnston](https://github.com/superstructor) - [Everyone Else](https://github.com/visionmedia/nib/contributors) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 81775c94e17ac566e21ef3c43fb605ffa6ae0b31 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 6 Jan 2014 10:25:09 -0600 Subject: [PATCH 212/254] 1.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e2a58559..c32522ec 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "repository": { "type": "git", From 87a85b17bbc350de2f2e0246857dc25865a4a640 Mon Sep 17 00:00:00 2001 From: PatrickJS Date: Mon, 3 Feb 2014 23:10:09 -0800 Subject: [PATCH 213/254] update copyright year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 5aef4031..8200e144 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2011 TJ Holowaychuk +Copyright (c) 2014 TJ Holowaychuk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From c9661e3f22de601e96b1b228bc03ee615d988a04 Mon Sep 17 00:00:00 2001 From: iam4x <127086@supinfo.com> Date: Thu, 10 Jan 2013 15:49:22 +0100 Subject: [PATCH 214/254] mixin for text stroke --- lib/nib/text/index.styl | 1 + lib/nib/text/stroke.styl | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 lib/nib/text/stroke.styl diff --git a/lib/nib/text/index.styl b/lib/nib/text/index.styl index 71d805c2..0378055e 100644 --- a/lib/nib/text/index.styl +++ b/lib/nib/text/index.styl @@ -2,3 +2,4 @@ @import 'https://github.com/ellipsis' @import 'https://github.com/hide-text' @import 'https://github.com/replace-text' +@import 'https://github.com/stroke' \ No newline at end of file diff --git a/lib/nib/text/stroke.styl b/lib/nib/text/stroke.styl new file mode 100644 index 00000000..2af52e32 --- /dev/null +++ b/lib/nib/text/stroke.styl @@ -0,0 +1,2 @@ +stroke(n) + text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n \ No newline at end of file From db27261892cf68aa31f16d773ad5518a8a93ded5 Mon Sep 17 00:00:00 2001 From: Maxime Tyler <127086@supinfo.com> Date: Mon, 17 Mar 2014 13:04:11 +0100 Subject: [PATCH 215/254] style(stroke): add newline at end of file --- lib/nib/text/stroke.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/text/stroke.styl b/lib/nib/text/stroke.styl index 2af52e32..dc0afff1 100644 --- a/lib/nib/text/stroke.styl +++ b/lib/nib/text/stroke.styl @@ -1,2 +1,2 @@ stroke(n) - text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n \ No newline at end of file + text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n From 4f8824b89a23d5acd7867776846e13e3d8266585 Mon Sep 17 00:00:00 2001 From: Maxime Tyler <127086@supinfo.com> Date: Mon, 17 Mar 2014 13:04:31 +0100 Subject: [PATCH 216/254] test(stroke): added tests on stroke --- test/cases/text.stroke.css | 9 +++++++++ test/cases/text.stroke.styl | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/cases/text.stroke.css create mode 100644 test/cases/text.stroke.styl diff --git a/test/cases/text.stroke.css b/test/cases/text.stroke.css new file mode 100644 index 00000000..8a28c228 --- /dev/null +++ b/test/cases/text.stroke.css @@ -0,0 +1,9 @@ +button { + text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; +} +button { + text-shadow: -1px -1px 0 rgba(0,0,0,0.5), 1px -1px 0 rgba(0,0,0,0.5), -1px 1px 0 rgba(0,0,0,0.5), 1px 1px 0 rgba(0,0,0,0.5); +} +button { + text-shadow: -1px -1px 0 #f00, 1px -1px 0 #f00, -1px 1px 0 #f00, 1px 1px 0 #f00; +} diff --git a/test/cases/text.stroke.styl b/test/cases/text.stroke.styl new file mode 100644 index 00000000..99fa4c01 --- /dev/null +++ b/test/cases/text.stroke.styl @@ -0,0 +1,10 @@ +@import 'https://github.com/nib/text/stroke' + +button + stroke(#000) + +button + stroke(rgba(0, 0, 0, 0.5)) + +button + stroke(red) From 22aa2b0b445e950f4decdbb6c61d87ec6d0e2f27 Mon Sep 17 00:00:00 2001 From: Maxime Tyler <127086@supinfo.com> Date: Sat, 22 Mar 2014 00:36:22 +0100 Subject: [PATCH 217/254] chore(name): changed `stroke` to `shadow-stroke` --- lib/nib/text/index.styl | 2 +- lib/nib/text/{stroke.styl => shadow-stroke.styl} | 2 +- test/cases/{text.stroke.css => shadow-stroke.css} | 0 test/cases/shadow-stroke.styl | 10 ++++++++++ test/cases/text.stroke.styl | 10 ---------- 5 files changed, 12 insertions(+), 12 deletions(-) rename lib/nib/text/{stroke.styl => shadow-stroke.styl} (80%) rename test/cases/{text.stroke.css => shadow-stroke.css} (100%) create mode 100644 test/cases/shadow-stroke.styl delete mode 100644 test/cases/text.stroke.styl diff --git a/lib/nib/text/index.styl b/lib/nib/text/index.styl index 0378055e..f874ab1e 100644 --- a/lib/nib/text/index.styl +++ b/lib/nib/text/index.styl @@ -2,4 +2,4 @@ @import 'https://github.com/ellipsis' @import 'https://github.com/hide-text' @import 'https://github.com/replace-text' -@import 'https://github.com/stroke' \ No newline at end of file +@import 'https://github.com/shadow-stroke' diff --git a/lib/nib/text/stroke.styl b/lib/nib/text/shadow-stroke.styl similarity index 80% rename from lib/nib/text/stroke.styl rename to lib/nib/text/shadow-stroke.styl index dc0afff1..1f1143ad 100644 --- a/lib/nib/text/stroke.styl +++ b/lib/nib/text/shadow-stroke.styl @@ -1,2 +1,2 @@ -stroke(n) +shadow-stroke(n) text-shadow: -1px -1px 0 n, 1px -1px 0 n, -1px 1px 0 n, 1px 1px 0 n diff --git a/test/cases/text.stroke.css b/test/cases/shadow-stroke.css similarity index 100% rename from test/cases/text.stroke.css rename to test/cases/shadow-stroke.css diff --git a/test/cases/shadow-stroke.styl b/test/cases/shadow-stroke.styl new file mode 100644 index 00000000..8eb0bd32 --- /dev/null +++ b/test/cases/shadow-stroke.styl @@ -0,0 +1,10 @@ +@import 'https://github.com/nib/text/shadow-stroke' + +button + shadow-stroke(#000) + +button + shadow-stroke(rgba(0, 0, 0, 0.5)) + +button + shadow-stroke(red) diff --git a/test/cases/text.stroke.styl b/test/cases/text.stroke.styl deleted file mode 100644 index 99fa4c01..00000000 --- a/test/cases/text.stroke.styl +++ /dev/null @@ -1,10 +0,0 @@ -@import 'https://github.com/nib/text/stroke' - -button - stroke(#000) - -button - stroke(rgba(0, 0, 0, 0.5)) - -button - stroke(red) From 58f0ac21ac628c5b9f4c3c8e61831182c8b44ed7 Mon Sep 17 00:00:00 2001 From: Leny Date: Thu, 24 Apr 2014 19:22:15 +0200 Subject: [PATCH 218/254] Add failing test for inherit and initial keywords --- test/cases/vendor.inherit.css | 167 +++++++++++++++++++++++++++++++++ test/cases/vendor.inherit.styl | 89 ++++++++++++++++++ test/cases/vendor.initial.css | 167 +++++++++++++++++++++++++++++++++ test/cases/vendor.initial.styl | 89 ++++++++++++++++++ 4 files changed, 512 insertions(+) create mode 100644 test/cases/vendor.inherit.css create mode 100644 test/cases/vendor.inherit.styl create mode 100644 test/cases/vendor.initial.css create mode 100644 test/cases/vendor.initial.styl diff --git a/test/cases/vendor.inherit.css b/test/cases/vendor.inherit.css new file mode 100644 index 00000000..ef1ff652 --- /dev/null +++ b/test/cases/vendor.inherit.css @@ -0,0 +1,167 @@ +button { + -webkit-box-shadow: inherit; + box-shadow: inherit; +} +button { + opacity: inherit; + -ms-filter: inherit; + filter: inherit; +} +button { + opacity: inherit; + white-space: inherit; +} +button { + -webkit-animation-name: inherit; + -moz-animation-name: inherit; + animation-name: inherit; + -webkit-animation-delay: inherit; + -moz-animation-delay: inherit; + animation-delay: inherit; + -webkit-animation-duration: inherit; + -moz-animation-duration: inherit; + animation-duration: inherit; + -webkit-animation-iteration-count: inherit; + -moz-animation-iteration-count: inherit; + animation-iteration-count: inherit; + -webkit-animation-direction: inherit; + -moz-animation-direction: inherit; + animation-direction: inherit; + -webkit-animation-fill-mode: inherit; + -moz-animation-fill-mode: inherit; + animation-fill-mode: inherit; + -webkit-animation-play-state: inherit; + -moz-animation-play-state: inherit; + animation-play-state: inherit; + -webkit-animation-timing-function: inherit; + -moz-animation-timing-function: inherit; + animation-timing-function: inherit; +} +button { + -webkit-animation: inherit; + -moz-animation: inherit; + animation: inherit; +} +button { + -webkit-appearance: inherit; + -moz-appearance: inherit; + appearance: inherit; +} +section { + -webkit-column-count: inherit; + -moz-column-count: inherit; + column-count: inherit; + -webkit-column-rule: inherit; + -moz-column-rule: inherit; + column-rule: inherit; + -webkit-column-gap: inherit; + -moz-column-gap: inherit; + column-gap: inherit; +} +section { + -webkit-column-count: inherit; + -moz-column-count: inherit; + column-count: inherit; + -webkit-column-rule-width: inherit; + -moz-column-rule-width: inherit; + column-rule-width: inherit; + -webkit-column-rule-style: inherit; + -moz-column-rule-style: inherit; + column-rule-style: inherit; + -webkit-column-rule-color: inherit; + -moz-column-rule-color: inherit; + column-rule-color: inherit; + -webkit-column-width: inherit; + -moz-column-width: inherit; + column-width: inherit; +} +section { + -webkit-column-count: inherit; + -moz-column-count: inherit; + column-count: inherit; + -webkit-column-rule-width: inherit; + -moz-column-rule-width: inherit; + column-rule-width: inherit; + -webkit-column-rule-style: inherit; + -moz-column-rule-style: inherit; + column-rule-style: inherit; + -webkit-column-rule-color: inherit; + -moz-column-rule-color: inherit; + column-rule-color: inherit; + -webkit-column-gap: inherit; + -moz-column-gap: inherit; + column-gap: inherit; +} +button { + -webkit-background-origin: inherit; + -moz-background-origin: inherit; + background-origin: inherit; + -webkit-background-clip: inherit; + -moz-background-clip: inherit; + background-clip: inherit; +} +button { + -o-transition: inherit; + -webkit-transition: inherit; + -moz-transition: inherit; + transition: inherit; + -webkit-backface-visibility: inherit; + -moz-backface-visibility: inherit; + backface-visibility: inherit; +} +button { + -o-transition-property: inherit; + -webkit-transition-property: inherit; + -moz-transition-property: inherit; + transition-property: inherit; + -o-transition-duration: inherit; + -webkit-transition-duration: inherit; + -moz-transition-duration: inherit; + transition-duration: inherit; + -o-transition-timing-function: inherit; + -webkit-transition-timing-function: inherit; + -moz-transition-timing-function: inherit; + transition-timing-function: inherit; + -o-transition-delay: inherit; + -webkit-transition-delay: inherit; + -moz-transition-delay: inherit; + transition-delay: inherit; +} +button { + -o-transform: inherit; + -webkit-transform: inherit; + -moz-transform: inherit; + transform: inherit; +} +button { + -o-transform: inherit; + -webkit-transform: inherit; + -moz-transform: inherit; + transform: inherit; +} +button { + -webkit-perspective: inherit; + -moz-perspective: inherit; + perspective: inherit; +} +section { + -o-border-image: inherit; + -webkit-border-image: inherit; + -moz-border-image: inherit; + border-image: inherit; +} +section { + -o-border-image: inherit; + -webkit-border-image: inherit; + -moz-border-image: inherit; + border-image: inherit; +} +p { + -webkit-hyphens: inherit; + -moz-hyphens: inherit; + hyphens: inherit; +} +section { + -webkit-overflow-scrolling: inherit; + overflow-scrolling: inherit; +} diff --git a/test/cases/vendor.inherit.styl b/test/cases/vendor.inherit.styl new file mode 100644 index 00000000..57f1319b --- /dev/null +++ b/test/cases/vendor.inherit.styl @@ -0,0 +1,89 @@ + +@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/gradients' + +vendor-prefixes = webkit moz official + +button + box-shadow: inherit + +button + opacity: inherit + +support-for-ie = false + +button + opacity: inherit + whitespace: inherit + +button + animation-name: inherit; + animation-delay: inherit; + animation-duration: inherit; + animation-iteration-count: inherit; + animation-direction: inherit; + animation-fill-mode: inherit; + animation-play-state: inherit; + animation-timing-function: inherit + +button + animation: inherit; + +button + appearance: inherit; + +section + column-count: inherit; + column-rule: inherit; + column-gap: inherit; + +section + column-count: inherit; + column-rule-width: inherit; + column-rule-style: inherit; + column-rule-color: inherit; + column-width: inherit; + +section + column-count: inherit; + column-rule-width: inherit; + column-rule-style: inherit; + column-rule-color: inherit; + column-gap: inherit; + +prepend(vendor-prefixes, o) + +button + background-origin: inherit; + background-clip: inherit; + +button + transition: inherit + backface-visibility: inherit + +button + transition-property: inherit + transition-duration: inherit + transition-timing-function: inherit + transition-delay: inherit + +button + transform: inherit + +button + transform: inherit + +button + perspective: inherit + +section + border-image: inherit + +section + border-image: inherit; + +p + hyphens: inherit + +section + overflow-scrolling: inherit diff --git a/test/cases/vendor.initial.css b/test/cases/vendor.initial.css new file mode 100644 index 00000000..7f82fea4 --- /dev/null +++ b/test/cases/vendor.initial.css @@ -0,0 +1,167 @@ +button { + -webkit-box-shadow: initial; + box-shadow: initial; +} +button { + opacity: initial; + -ms-filter: initial; + filter: initial; +} +button { + opacity: initial; + white-space: initial; +} +button { + -webkit-animation-name: initial; + -moz-animation-name: initial; + animation-name: initial; + -webkit-animation-delay: initial; + -moz-animation-delay: initial; + animation-delay: initial; + -webkit-animation-duration: initial; + -moz-animation-duration: initial; + animation-duration: initial; + -webkit-animation-iteration-count: initial; + -moz-animation-iteration-count: initial; + animation-iteration-count: initial; + -webkit-animation-direction: initial; + -moz-animation-direction: initial; + animation-direction: initial; + -webkit-animation-fill-mode: initial; + -moz-animation-fill-mode: initial; + animation-fill-mode: initial; + -webkit-animation-play-state: initial; + -moz-animation-play-state: initial; + animation-play-state: initial; + -webkit-animation-timing-function: initial; + -moz-animation-timing-function: initial; + animation-timing-function: initial; +} +button { + -webkit-animation: initial; + -moz-animation: initial; + animation: initial; +} +button { + -webkit-appearance: initial; + -moz-appearance: initial; + appearance: initial; +} +section { + -webkit-column-count: initial; + -moz-column-count: initial; + column-count: initial; + -webkit-column-rule: initial; + -moz-column-rule: initial; + column-rule: initial; + -webkit-column-gap: initial; + -moz-column-gap: initial; + column-gap: initial; +} +section { + -webkit-column-count: initial; + -moz-column-count: initial; + column-count: initial; + -webkit-column-rule-width: initial; + -moz-column-rule-width: initial; + column-rule-width: initial; + -webkit-column-rule-style: initial; + -moz-column-rule-style: initial; + column-rule-style: initial; + -webkit-column-rule-color: initial; + -moz-column-rule-color: initial; + column-rule-color: initial; + -webkit-column-width: initial; + -moz-column-width: initial; + column-width: initial; +} +section { + -webkit-column-count: initial; + -moz-column-count: initial; + column-count: initial; + -webkit-column-rule-width: initial; + -moz-column-rule-width: initial; + column-rule-width: initial; + -webkit-column-rule-style: initial; + -moz-column-rule-style: initial; + column-rule-style: initial; + -webkit-column-rule-color: initial; + -moz-column-rule-color: initial; + column-rule-color: initial; + -webkit-column-gap: initial; + -moz-column-gap: initial; + column-gap: initial; +} +button { + -webkit-background-origin: initial; + -moz-background-origin: initial; + background-origin: initial; + -webkit-background-clip: initial; + -moz-background-clip: initial; + background-clip: initial; +} +button { + -o-transition: initial; + -webkit-transition: initial; + -moz-transition: initial; + transition: initial; + -webkit-backface-visibility: initial; + -moz-backface-visibility: initial; + backface-visibility: initial; +} +button { + -o-transition-property: initial; + -webkit-transition-property: initial; + -moz-transition-property: initial; + transition-property: initial; + -o-transition-duration: initial; + -webkit-transition-duration: initial; + -moz-transition-duration: initial; + transition-duration: initial; + -o-transition-timing-function: initial; + -webkit-transition-timing-function: initial; + -moz-transition-timing-function: initial; + transition-timing-function: initial; + -o-transition-delay: initial; + -webkit-transition-delay: initial; + -moz-transition-delay: initial; + transition-delay: initial; +} +button { + -o-transform: initial; + -webkit-transform: initial; + -moz-transform: initial; + transform: initial; +} +button { + -o-transform: initial; + -webkit-transform: initial; + -moz-transform: initial; + transform: initial; +} +button { + -webkit-perspective: initial; + -moz-perspective: initial; + perspective: initial; +} +section { + -o-border-image: initial; + -webkit-border-image: initial; + -moz-border-image: initial; + border-image: initial; +} +section { + -o-border-image: initial; + -webkit-border-image: initial; + -moz-border-image: initial; + border-image: initial; +} +p { + -webkit-hyphens: initial; + -moz-hyphens: initial; + hyphens: initial; +} +section { + -webkit-overflow-scrolling: initial; + overflow-scrolling: initial; +} diff --git a/test/cases/vendor.initial.styl b/test/cases/vendor.initial.styl new file mode 100644 index 00000000..b4a6beb2 --- /dev/null +++ b/test/cases/vendor.initial.styl @@ -0,0 +1,89 @@ + +@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/gradients' + +vendor-prefixes = webkit moz official + +button + box-shadow: initial + +button + opacity: initial + +support-for-ie = false + +button + opacity: initial + whitespace: initial + +button + animation-name: initial; + animation-delay: initial; + animation-duration: initial; + animation-iteration-count: initial; + animation-direction: initial; + animation-fill-mode: initial; + animation-play-state: initial; + animation-timing-function: initial + +button + animation: initial; + +button + appearance: initial; + +section + column-count: initial; + column-rule: initial; + column-gap: initial; + +section + column-count: initial; + column-rule-width: initial; + column-rule-style: initial; + column-rule-color: initial; + column-width: initial; + +section + column-count: initial; + column-rule-width: initial; + column-rule-style: initial; + column-rule-color: initial; + column-gap: initial; + +prepend(vendor-prefixes, o) + +button + background-origin: initial; + background-clip: initial; + +button + transition: initial + backface-visibility: initial + +button + transition-property: initial + transition-duration: initial + transition-timing-function: initial + transition-delay: initial + +button + transform: initial + +button + transform: initial + +button + perspective: initial + +section + border-image: initial + +section + border-image: initial; + +p + hyphens: initial + +section + overflow-scrolling: initial From 61c2a08c35e5aed9ee590ba4e4896d5904a7255e Mon Sep 17 00:00:00 2001 From: Leny Date: Thu, 24 Apr 2014 19:50:32 +0200 Subject: [PATCH 219/254] Allows opacity to receive inherit or initial value --- lib/nib/vendor.styl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index e6b5fef6..a9d8bcf8 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -268,13 +268,17 @@ perspective-origin() opacity(n, args...) opacity: n args if support-for-ie - val = round(n * 100) - if val == 100 - -ms-filter: none - filter: none + if n == inherit or n == initial + -ms-filter: n args + filter: n args else - -ms-filter: '"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)"' % val args - filter: 'alpha(opacity=%s)' % val args + val = round(n * 100) + if val == 100 + -ms-filter: none + filter: none + else + -ms-filter: '"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)"' % val args + filter: 'alpha(opacity=%s)' % val args /* * Vendor "text-size-adjust" From d17bea08aaaf9602ef7691384d7fc16c229a0ac6 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Thu, 19 Jun 2014 18:16:43 -0400 Subject: [PATCH 220/254] 1.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c32522ec..7a255edb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "repository": { "type": "git", From 7a9f0b5f31e95146af2c2b9f3a3d3698460b29de Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 25 Jun 2014 09:53:58 -0400 Subject: [PATCH 221/254] upgrade stylus to 0.45 0.46 breaks a test case, but we can get to 0.45 without any changes --- package.json | 2 +- test/cases/absolute.styl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7a255edb..b369457a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "~0.37.0" + "stylus": "0.45.x" }, "devDependencies": { "connect": "1.x", diff --git a/test/cases/absolute.styl b/test/cases/absolute.styl index 6ac69571..cbeaaeab 100644 --- a/test/cases/absolute.styl +++ b/test/cases/absolute.styl @@ -14,4 +14,4 @@ absolute top #login - absolute top right 5px bottom left 10px \ No newline at end of file + absolute top right 5px bottom left 10px From 83342d5aeeecdf5a7b95130232c77b6abec5bc64 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 25 Jun 2014 09:55:30 -0400 Subject: [PATCH 222/254] add an editorconfig --- .editorconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..e09b844f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 From 333386b2fd008fa9f6fd98a5d6eb420d918f3ad8 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 25 Jun 2014 10:12:08 -0400 Subject: [PATCH 223/254] update to match editorconfig & JSHint (mostly) --- Readme.md | 22 ++++++++++---------- iconic/demo.html | 4 ++-- lib/nib.js | 25 +++++++++++------------ lib/nib/border.styl | 1 - lib/nib/clearfix.styl | 1 - lib/nib/color-image.styl | 1 - lib/nib/gradients.styl | 1 - lib/nib/iconic.styl | 1 - lib/nib/image.styl | 1 - lib/nib/positions.styl | 30 ++++++++++++++-------------- lib/nib/reset.styl | 1 - lib/nib/size.styl | 12 +++++------ lib/nib/text/aliases.styl | 3 +-- lib/nib/text/ellipsis.styl | 3 +-- lib/nib/text/hide-text.styl | 2 +- lib/nodes/color-image.js | 11 +++++----- lib/nodes/gradient.js | 26 +++++++++++------------- lib/nodes/vendor-helpers.js | 14 ++++++------- test/cases/absolute.css | 2 +- test/cases/border.styl | 1 - test/cases/clearfix.css | 2 +- test/cases/clearfix.styl | 1 - test/cases/fixed.css | 2 +- test/cases/fixed.styl | 1 - test/cases/flex.styl | 1 - test/cases/importance.styl | 1 - test/cases/linear-gradient.styl | 1 - test/cases/multiple-gradients.styl | 1 - test/cases/radial-gradient.styl | 1 - test/cases/relative.css | 3 +-- test/cases/text.ellipsis.css | 2 +- test/cases/text.ellipsis.styl | 3 +-- test/cases/vendor.border-radius.styl | 1 - test/cases/vendor.inherit.styl | 1 - test/cases/vendor.initial.styl | 1 - test/cases/vendor.placeholder.css | 2 +- test/cases/vendor.placeholder.styl | 2 -- test/cases/vendor.styl | 1 - test/cases/vendor.values.styl | 1 - test/color-images.styl | 1 - test/gradients.styl | 2 +- test/runner.js | 10 +++++----- test/server.js | 8 ++++---- test/test.styl | 1 - 44 files changed, 90 insertions(+), 122 deletions(-) diff --git a/Readme.md b/Readme.md index 5c20edf1..78eb1972 100644 --- a/Readme.md +++ b/Readme.md @@ -11,8 +11,8 @@ $ npm install nib ``` If the image generation features of Nib are desired, such as generating the linear gradient images, install [node-canvas](http://github.com/learnboost/node-canvas): - -```bash + +```bash $ npm install canvas ``` @@ -47,14 +47,14 @@ server.use(stylus.middleware({ ```css @import 'https://github.com/nib' ``` - + Or you may also pick and choose based on the directory structure in `./lib`, for example: - + ```css @import 'https://github.com/nib/gradients' @import 'https://github.com/nib/overflow' ``` - + to be continued.... ## More Information @@ -64,23 +64,23 @@ to be continued.... ## Testing You will first need to install the dependencies: - + ```bash $ npm install -d ``` - + Run the automated test cases: - + ```bash $ npm test ``` - + For visual testing run the test server: - + ```bash $ npm run-script test-server ``` - + Then visit `localhost:3000` in your browser. ## Contributors diff --git a/iconic/demo.html b/iconic/demo.html index 2ce8cdd0..f70302ba 100644 --- a/iconic/demo.html +++ b/iconic/demo.html @@ -9,7 +9,7 @@ -
    +
    • Home
    • At Symbol
    • Quote
    • @@ -92,4 +92,4 @@
    • Beaker (alternate)
    - \ No newline at end of file + diff --git a/lib/nib.js b/lib/nib.js index 3128187f..0d70034a 100644 --- a/lib/nib.js +++ b/lib/nib.js @@ -1,4 +1,3 @@ - /*! * nib * Copyright (c) 2010 TJ Holowaychuk @@ -9,11 +8,11 @@ * Module dependencies. */ -var stylus = require('stylus') - , path = require('path') - , nodes = stylus.nodes - , utils = stylus.utils - , Canvas +var stylus = require('stylus'), + path = require('path'), + nodes = stylus.nodes, + utils = stylus.utils, + Canvas; exports = module.exports = plugin; @@ -22,8 +21,8 @@ exports = module.exports = plugin; try { Canvas = require('canvas'); - var gradient = require('./nodes/gradient') - , colorImage = require('./nodes/color-image') + var gradient = require('./nodes/gradient'), + colorImage = require('./nodes/color-image'); } catch (err) { // ignore } @@ -55,15 +54,15 @@ function plugin() { style.define('has-canvas', nodes.true); // gradients - style.define('create-gradient-image', gradient.create) - style.define('gradient-data-uri', gradient.dataURL) - style.define('add-color-stop', gradient.addColorStop) + style.define('create-gradient-image', gradient.create); + style.define('gradient-data-uri', gradient.dataURL); + style.define('add-color-stop', gradient.addColorStop); // color images - style.define('create-color-image', colorImage.create) + style.define('create-color-image', colorImage.create); style.define('color-data-uri', colorImage.dataURL); } else { style.define('has-canvas', nodes.false); } - } + }; } diff --git a/lib/nib/border.styl b/lib/nib/border.styl index b65ffb43..be4c2ec0 100644 --- a/lib/nib/border.styl +++ b/lib/nib/border.styl @@ -1,4 +1,3 @@ - /* * border: * border: ... diff --git a/lib/nib/clearfix.styl b/lib/nib/clearfix.styl index 2da51e41..4f44cda9 100644 --- a/lib/nib/clearfix.styl +++ b/lib/nib/clearfix.styl @@ -1,4 +1,3 @@ - /* * The Magnificent Micro Clearfix * diff --git a/lib/nib/color-image.styl b/lib/nib/color-image.styl index c799b455..21611cb6 100644 --- a/lib/nib/color-image.styl +++ b/lib/nib/color-image.styl @@ -1,4 +1,3 @@ - color-image(color) error('node-canvas is required for color-image()') unless has-canvas colorImage = create-color-image(color) diff --git a/lib/nib/gradients.styl b/lib/nib/gradients.styl index f1fbbad2..9f39610b 100644 --- a/lib/nib/gradients.styl +++ b/lib/nib/gradients.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/config' /* diff --git a/lib/nib/iconic.styl b/lib/nib/iconic.styl index ce87fbf9..4352c6d6 100644 --- a/lib/nib/iconic.styl +++ b/lib/nib/iconic.styl @@ -1,4 +1,3 @@ - iconic-stroke(path) @font-face font-family: 'IconicStroke' diff --git a/lib/nib/image.styl b/lib/nib/image.styl index 4ec22ddf..48672466 100644 --- a/lib/nib/image.styl +++ b/lib/nib/image.styl @@ -1,4 +1,3 @@ - /* * Define background-image as `path` with optional width and height, adding an * @2x variant. diff --git a/lib/nib/positions.styl b/lib/nib/positions.styl index 2b526ea9..86670410 100644 --- a/lib/nib/positions.styl +++ b/lib/nib/positions.styl @@ -10,18 +10,18 @@ /* * Position utility. - * + * * Synopsis: - * + * * fixed: [n] [n] - * + * * Examples: - * + * * fixed: top left * fixed: top 5px left * fixed: top left 5px * fixed: top 5px left 5px - * + * */ fixed() @@ -29,18 +29,18 @@ fixed() /* * Position utility. - * + * * Synopsis: - * + * * absolute: [n] [n] - * + * * Examples: - * + * * absolute: top left * absolute: top 5px left * absolute: top left 5px * absolute: top 5px left 5px - * + * */ absolute() @@ -48,18 +48,18 @@ absolute() /* * Position utility. - * + * * Synopsis: - * + * * relative: [n] [n] - * + * * Examples: - * + * * relative: top left * relative: top 5px left * relative: top left 5px * relative: top 5px left 5px - * + * */ relative() diff --git a/lib/nib/reset.styl b/lib/nib/reset.styl index e06db691..bed75fac 100644 --- a/lib/nib/reset.styl +++ b/lib/nib/reset.styl @@ -76,4 +76,3 @@ reset-html5() *zoom 1 audio:not([controls]),[hidden] display none - diff --git a/lib/nib/size.styl b/lib/nib/size.styl index fd3aaf62..8be69d30 100644 --- a/lib/nib/size.styl +++ b/lib/nib/size.styl @@ -1,22 +1,22 @@ /* * Size utility. - * + * * Synopsis: - * + * * size: | - * + * * Examples: - * + * * size: 100% 30px * yields: * width: 100% * height: 30px - * + * * size: 5px * yields: * width: 5px * height: 5px - * + * */ size() diff --git a/lib/nib/text/aliases.styl b/lib/nib/text/aliases.styl index 6e430467..01e9ba8b 100644 --- a/lib/nib/text/aliases.styl +++ b/lib/nib/text/aliases.styl @@ -1,4 +1,3 @@ - /* * Alias of "nowrap". */ @@ -10,4 +9,4 @@ no-wrap = unquote('nowrap') */ whitespace() - white-space: arguments \ No newline at end of file + white-space: arguments diff --git a/lib/nib/text/ellipsis.styl b/lib/nib/text/ellipsis.styl index 847c1981..b9930b8e 100644 --- a/lib/nib/text/ellipsis.styl +++ b/lib/nib/text/ellipsis.styl @@ -1,4 +1,3 @@ - /* * Ellipsis with wrapping disabled by default. */ @@ -7,4 +6,4 @@ ellipsis(no-wrap = true) if no-wrap white-space: nowrap overflow: hidden - text-overflow: ellipsis \ No newline at end of file + text-overflow: ellipsis diff --git a/lib/nib/text/hide-text.styl b/lib/nib/text/hide-text.styl index ea08477d..6251340c 100644 --- a/lib/nib/text/hide-text.styl +++ b/lib/nib/text/hide-text.styl @@ -5,4 +5,4 @@ hide-text() text-indent: 101% white-space: nowrap - overflow: hidden \ No newline at end of file + overflow: hidden diff --git a/lib/nodes/color-image.js b/lib/nodes/color-image.js index bcaf8b22..c0aaf0e6 100644 --- a/lib/nodes/color-image.js +++ b/lib/nodes/color-image.js @@ -1,12 +1,11 @@ - /** * Module dependencies. */ -var stylus = require('stylus') - , Canvas = require('canvas') - , nodes = stylus.nodes - , utils = stylus.utils +var stylus = require('stylus'), + Canvas = require('canvas'), + nodes = stylus.nodes, + utils = stylus.utils; /** * Expose `ColorImage`. @@ -53,7 +52,7 @@ function ColorImage(color) { this.ctx = this.canvas.getContext('2d'); this.ctx.fillStyle = color.toString(); this.ctx.fillRect(0, 0, 1, 1); -}; +} /** * Inherit from `nodes.Node.prototype`. diff --git a/lib/nodes/gradient.js b/lib/nodes/gradient.js index d1aea9bf..f1c9b58a 100644 --- a/lib/nodes/gradient.js +++ b/lib/nodes/gradient.js @@ -1,12 +1,11 @@ - /** * Module dependencies. */ -var stylus = require('stylus') - , Canvas = require('canvas') - , nodes = stylus.nodes - , utils = stylus.utils; +var stylus = require('stylus'), + Canvas = require('canvas'), + nodes = stylus.nodes, + utils = stylus.utils; /** * Expose `Gradient`. @@ -76,9 +75,9 @@ function Gradient(size, start) { this.setStartPosition(start); this.ctx = this.canvas.getContext('2d'); this.grad = this.ctx.createLinearGradient( - this.from[0], this.from[1] - , this.to[0], this.to[1]); -}; + this.from[0], this.from[1], + this.to[0], this.to[1]); +} /** * Inspect the gradient. @@ -88,8 +87,7 @@ function Gradient(size, start) { */ Gradient.prototype.toString = function(){ - return 'Gradient(' + this.size + 'px ' - + this.stops.map(function(stop){ + return 'Gradient(' + this.size + 'px ' + this.stops.map(function(stop){ return stop[0] + ' ' + stop[1]; }).join(', ') + ')'; }; @@ -102,8 +100,8 @@ Gradient.prototype.toString = function(){ */ Gradient.prototype.setStartPosition = function(start){ - var size = this.size - , canvas = this.canvas; + var size = this.size, + canvas = this.canvas; switch (start) { case 'top': @@ -151,8 +149,8 @@ Gradient.prototype.addColorStop = function(pos, color){ */ Gradient.prototype.toDataURL = function(){ - var canvas = this.canvas - , ctx = this.ctx; + var canvas = this.canvas, + ctx = this.ctx; ctx.fillStyle = this.grad; ctx.fillRect(0, 0, canvas.width, canvas.height); return canvas.toDataURL(); diff --git a/lib/nodes/vendor-helpers.js b/lib/nodes/vendor-helpers.js index 12c7d4aa..3b8e3ebc 100644 --- a/lib/nodes/vendor-helpers.js +++ b/lib/nodes/vendor-helpers.js @@ -1,8 +1,8 @@ -var RE_GRADIENT_STOPS = /([\(\,]\s*)(-?(?:\d*\.)?\d+(?:%|px|em))(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g - , RE_GRADIENT_VAL = /(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g - , RE_GRADIENT_TYPE = /((repeating-)?(linear|radial)-gradient\()/g - , RE_TRANSFORM = /\b(transform)\b/g - , RE_FILL_KEYWORD = /\s*\b(fill)\b\s*/g; +var RE_GRADIENT_STOPS = /([\(\,]\s*)(-?(?:\d*\.)?\d+(?:%|px|em))(\s+)((hsl|rgb)a?\([^\)]+\)|#[^\)\,]+)/g, + RE_GRADIENT_VAL = /(\(\s*)(?:(-?(\d*\.)?\d+)deg|((to )?(top|bottom|left|right)( (top|bottom|left|right))?))/g, + RE_GRADIENT_TYPE = /((repeating-)?(linear|radial)-gradient\()/g, + RE_TRANSFORM = /\b(transform)\b/g, + RE_FILL_KEYWORD = /\s*\b(fill)\b\s*/g; var DIRECTIONS = { top: 'bottom', bottom: 'top', left: 'right', right:'left' }; @@ -11,8 +11,8 @@ var DIRECTIONS = { top: 'bottom', bottom: 'top', left: 'right', right:'left' }; */ function normalize(property, value, prefix){ - var result = value.toString() - , args; + var result = value.toString(), + args; /* Fixing the gradients */ if (~result.indexOf('gradient(')) { diff --git a/test/cases/absolute.css b/test/cases/absolute.css index bfdba536..be73a12d 100644 --- a/test/cases/absolute.css +++ b/test/cases/absolute.css @@ -24,4 +24,4 @@ right: 5px; bottom: 0; left: 10px; -} \ No newline at end of file +} diff --git a/test/cases/border.styl b/test/cases/border.styl index f5158aae..9c3aeba7 100644 --- a/test/cases/border.styl +++ b/test/cases/border.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/border' .foo diff --git a/test/cases/clearfix.css b/test/cases/clearfix.css index ff51437e..6311856e 100644 --- a/test/cases/clearfix.css +++ b/test/cases/clearfix.css @@ -8,4 +8,4 @@ } #clearfix:after { clear: both; -} \ No newline at end of file +} diff --git a/test/cases/clearfix.styl b/test/cases/clearfix.styl index b556a136..ad50fb54 100644 --- a/test/cases/clearfix.styl +++ b/test/cases/clearfix.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/clearfix' support-for-ie = true diff --git a/test/cases/fixed.css b/test/cases/fixed.css index 4320c328..c856c780 100644 --- a/test/cases/fixed.css +++ b/test/cases/fixed.css @@ -17,4 +17,4 @@ position: fixed; bottom: 10px; right: 0; -} \ No newline at end of file +} diff --git a/test/cases/fixed.styl b/test/cases/fixed.styl index c3c9172b..95976940 100644 --- a/test/cases/fixed.styl +++ b/test/cases/fixed.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/positions' #login diff --git a/test/cases/flex.styl b/test/cases/flex.styl index 95c2fa83..e1a8df1c 100644 --- a/test/cases/flex.styl +++ b/test/cases/flex.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/flex' diff --git a/test/cases/importance.styl b/test/cases/importance.styl index 98bcdaa3..8f000389 100644 --- a/test/cases/importance.styl +++ b/test/cases/importance.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib' .test diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index cb5f22be..129c5413 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' diff --git a/test/cases/multiple-gradients.styl b/test/cases/multiple-gradients.styl index e97e8a7f..8e4a53c8 100644 --- a/test/cases/multiple-gradients.styl +++ b/test/cases/multiple-gradients.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' diff --git a/test/cases/radial-gradient.styl b/test/cases/radial-gradient.styl index ad822ce3..ef51373b 100644 --- a/test/cases/radial-gradient.styl +++ b/test/cases/radial-gradient.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' diff --git a/test/cases/relative.css b/test/cases/relative.css index 389aa3b6..ad3fbdb8 100644 --- a/test/cases/relative.css +++ b/test/cases/relative.css @@ -1,5 +1,4 @@ - #login { position: relative; left: 10px; -} \ No newline at end of file +} diff --git a/test/cases/text.ellipsis.css b/test/cases/text.ellipsis.css index cd96b7c4..fd3b7c67 100644 --- a/test/cases/text.ellipsis.css +++ b/test/cases/text.ellipsis.css @@ -11,4 +11,4 @@ button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -} \ No newline at end of file +} diff --git a/test/cases/text.ellipsis.styl b/test/cases/text.ellipsis.styl index 4c1767c5..8174c56b 100644 --- a/test/cases/text.ellipsis.styl +++ b/test/cases/text.ellipsis.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/text/ellipsis' @import 'https://github.com/nib/overflow' @@ -9,4 +8,4 @@ button ellipsis(false) button - overflow: ellipsis \ No newline at end of file + overflow: ellipsis diff --git a/test/cases/vendor.border-radius.styl b/test/cases/vendor.border-radius.styl index 12be550f..b0ee4684 100644 --- a/test/cases/vendor.border-radius.styl +++ b/test/cases/vendor.border-radius.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' button diff --git a/test/cases/vendor.inherit.styl b/test/cases/vendor.inherit.styl index 57f1319b..0dd7f82a 100644 --- a/test/cases/vendor.inherit.styl +++ b/test/cases/vendor.inherit.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' diff --git a/test/cases/vendor.initial.styl b/test/cases/vendor.initial.styl index b4a6beb2..51b78483 100644 --- a/test/cases/vendor.initial.styl +++ b/test/cases/vendor.initial.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' diff --git a/test/cases/vendor.placeholder.css b/test/cases/vendor.placeholder.css index 5597cedd..6c969572 100644 --- a/test/cases/vendor.placeholder.css +++ b/test/cases/vendor.placeholder.css @@ -73,4 +73,4 @@ textarea:-ms-input-placeholder { font-style: italic; font-weight: bold; padding: 4px 10px; -} \ No newline at end of file +} diff --git a/test/cases/vendor.placeholder.styl b/test/cases/vendor.placeholder.styl index 4820af02..6ef9978e 100644 --- a/test/cases/vendor.placeholder.styl +++ b/test/cases/vendor.placeholder.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' $placeholderFont = Helvetica, arial, sans-serif @@ -19,4 +18,3 @@ green-placeholder() textarea placeholder((font-style italic) (font-weight bold) (padding '4px 10px')) - \ No newline at end of file diff --git a/test/cases/vendor.styl b/test/cases/vendor.styl index defe38bd..68376230 100644 --- a/test/cases/vendor.styl +++ b/test/cases/vendor.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' @import 'https://github.com/nib/gradients' diff --git a/test/cases/vendor.values.styl b/test/cases/vendor.values.styl index 33364b0f..56de137a 100644 --- a/test/cases/vendor.values.styl +++ b/test/cases/vendor.values.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' button diff --git a/test/color-images.styl b/test/color-images.styl index 4bb17fe6..64845260 100644 --- a/test/color-images.styl +++ b/test/color-images.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/color-image' #color-images diff --git a/test/gradients.styl b/test/gradients.styl index b35418d1..e3cccaf4 100644 --- a/test/gradients.styl +++ b/test/gradients.styl @@ -53,4 +53,4 @@ background: linear-gradient-image(50px top, red, 50% green, blue) tr:nth-child(9) td:first-child - background: linear-gradient(50px top, red, green, yellow, blue) \ No newline at end of file + background: linear-gradient(50px top, red, green, yellow, blue) diff --git a/test/runner.js b/test/runner.js index 296acc81..b41c2af7 100644 --- a/test/runner.js +++ b/test/runner.js @@ -3,9 +3,9 @@ * Module dependencies. */ -var stylus = require('stylus') - , nib = require('../') - , fs = require('fs'); +var stylus = require('stylus'), + nib = require('../'), + fs = require('fs'); // test cases @@ -34,6 +34,6 @@ describe('integration', function(){ if (err) throw err; actual.trim().should.equal(css); }); - }) + }); }); -}) \ No newline at end of file +}); diff --git a/test/server.js b/test/server.js index ebd24ffe..e48166ea 100644 --- a/test/server.js +++ b/test/server.js @@ -2,10 +2,10 @@ * Module dependencies. */ -var stylus = require('stylus') - , connect = require('connect') - , jade = require('jade') - , nib = require('../'); +var stylus = require('stylus'), + connect = require('connect'), + jade = require('jade'), + nib = require('../'); /** * Server. diff --git a/test/test.styl b/test/test.styl index 07aaddc7..98ebbbea 100644 --- a/test/test.styl +++ b/test/test.styl @@ -1,4 +1,3 @@ - @import 'https://github.com/nib/vendor' gray = #ebebeb From c41a09d0083bfe0780fe7200b8b73dac0af0a86b Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 25 Jun 2014 11:26:59 -0400 Subject: [PATCH 224/254] start on docs --- docs/README.md | 311 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..ca4ebc76 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,311 @@ +# Mixins +## Gradient +Nib's gradient support is by far the largest feature it provides. Not only is the syntax extremely similar to what you would normally write, it's more forgiving, expands to vendor equivalents, and can even produce a PNG for older browsers with [node-canvas](http://github.com/learnboost/node-canvas). + +```stylus +body + background linear-gradient(top, white, black) +``` + +```css +body { + background: -webkit-gradient(linear, + left top, + left bottom, + color-stop(0, #fff), + color-stop(1, #000)); + background: -webkit-linear-gradient(top, #fff 0%, #000 100%); + background: -moz-linear-gradient(top, #fff 0%, #000 100%); + background: linear-gradient(top, #fff 0%, #000 100%); +} +``` + +![](http://f.cl.ly/items/1q25061X2Q2U0p472L02/Screenshot.png) + +Any number of color stops may be provided: + +```stylus +body + background linear-gradient(bottom left, white, red, blue, black) +``` + +![](http://f.cl.ly/items/2I0k3D0A2y0n3i443g2W/Screenshot.png) + +Units may be placed before or after the color: + +```stylus +body + background linear-gradient(left, 80% red, #000) + background linear-gradient(top, #eee, 90% white, 10% black) +``` + +![](http://f.cl.ly/items/2B1U3m0t2T1B420I3C3I/Screenshot.png) +![](http://f.cl.ly/items/1T1P1x0n1X3k132o3V0F/Screenshot.png) + +## Position + +The position mixins `absolute`, `fixed`, and `relative` provide a shorthand variant to what is otherwise three CSS properties. The syntax is as follows: + +``` +fixed|absolute|relative: top|bottom [n] left|right [n] +``` + +The following example will default to (0,0): + +```stylus +#back-to-top + fixed bottom right +``` + +```css +#back-to-top { + position: fixed; + bottom: 0; + right: 0; +} +``` + +You may also specify the units: + +```stylus +#back-to-top + fixed bottom 10px right 5px +``` + +```css +#back-to-top { + position: fixed; + bottom: 10px; + right: 5px; +} +``` + +## Clearfix +Clearfixing causes containers to expand to contain floated contents. A simple example is shown [here](http://learnlayout.com/clearfix.html). + +The clearfix mixin takes no arguments and expands to a form that provides extremely robust browser support. + +```stylus +.clearfix + clearfix() +``` + +```css +.clearfix { + zoom: 1; +} +.clearfix:before, +.clearfix:after { + content: ""; + display: table; +} +.clearfix:after { + clear: both; +} +``` + +## Border Radius +Nib's `border-radius` supports both the regular syntax as well as augmenting it to make the value more expressive. + +```stylus +button + border-radius 1px 2px / 3px 4px + + button + border-radius 5px + + button + border-radius bottom 10px` +``` + +```css +button { + -webkit-border-radius: 1px 2px/3px 4px; + -moz-border-radius: 1px 2px/3px 4px; + border-radius: 1px 2px/3px 4px; +} +button { + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +button { + -moz-border-radius-topleft: 10px; + -webkit-border-top-left-radius: 10px; + border-top-left-radius: 10px; + -moz-border-radius-bottomright: 10px; + -webkit-border-bottom-right-radius: 10px; + border-bottom-right-radius: 10px; +} +``` + +## Responsive Images +The `image` mixin allows you to define a `background-image` for both the normal image, and a doubled image for devices with a higher pixel ratio such as retina displays. This works by using a @media query to serve an "@2x" version of the file. + +```stylus +#logo + image '/images/branding/logo.main.png' + +#logo + image '/images/branding/logo.main.png' 50px 100px +``` + +```css +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: auto auto; + } +} +#logo { + background-image: url("https://github.com/images/branding/logo.main.png"); +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + #logo { + background-image: url("https://github.com/images/branding/logo.main@2x.png"); + background-size: 50px 100px; + } +} +``` + +## Ellipsis +The `overflow` property is augmented with a "ellipsis" value, expanding to what you see below. + +```stylus +button + overflow ellipsis +``` + +```css +button { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +``` + +## Reset +Nib comes bundled with Eric Meyer's style reset support, you can choose to apply the global or any specifics that you wish. To view the definitions view [reset.styl](https://github.com/visionmedia/nib/blob/master/lib/nib/reset.styl) + +- global-reset() +- nested-reset() +- reset-font() +- reset-box-model() +- reset-body() +- reset-table() +- reset-table-cell() +- reset-html5() + +## Border +This shorthand lets you create a border by just specifying a color, with defaults for width and style. + +```stylus +.foo + border red +``` + +```css +.foo { + border: 1px solid red; +} +``` + +## Shadow Stroke +Creates a text outline using text-shadow. + +```stylus +.foo + shadow-stroke(red) +``` + +```css +.foo { + text-shadow: -1px -1px 0 red, 1px -1px 0 red, -1px 1px 0 red, 1px 1px 0 red; +} +``` + +## Size +This shorthand lets you set width and height in one go. + +```stylus +.foo + size 5em 10em +``` + +```css +.foo { + width: 5em; + height: 10em; +} +``` + +## Transparent Mixins +These mixins expand vendor prefixes but do not modify the behavior of the property. + +For example: + +```stylus +* + box-sizing border-box +``` + +```css +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +``` + +Here is the full list of properties for which Nib provides transparent mixins: + +- box-shadow +- radial-gradient +- user-select +- column-count +- column-gap +- column-rule +- column-rule-color +- column-rule-width +- column-rule-style +- column-width +- background-size +- transform +- border-image +- transition +- transition-property +- transition-duration +- transition-timing-function +- transition-delay +- backface-visibility +- opacity +- box-sizing +- box-orient +- box-flex +- box-flex-group +- box-align +- box-pack +- box-direction +- animation +- animation-name +- animation-duration +- animation-delay +- animation-direction +- animation-iteration-count +- animation-timing-function +- animation-play-state +- animation-fill-mode +- border-image +- hyphens +- appearance + +# Aliases +These aliases are provided purely for convenience. + +official | aliases +----------- | ---------- +nowrap | no-wrap +white-space | whitespace From aef9b55f7116a3b5bac8643eb260906220ecd58b Mon Sep 17 00:00:00 2001 From: Naoaki Date: Tue, 2 Sep 2014 15:18:41 +0900 Subject: [PATCH 225/254] fix duplicated border-image in docs --- docs/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index ca4ebc76..d49611cb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -298,7 +298,6 @@ Here is the full list of properties for which Nib provides transparent mixins: - animation-timing-function - animation-play-state - animation-fill-mode -- border-image - hyphens - appearance From e65edbf84e00d9bce2554764f82fb4c9ebbebbd7 Mon Sep 17 00:00:00 2001 From: rajatsehgal Date: Wed, 17 Sep 2014 10:36:00 -0400 Subject: [PATCH 226/254] Remove -webkit-gradient from the output CSS According to https://github.com/visionmedia/nib/issues/94#issuecomment-19504293 the support for legacy -webkit-gradient has been dropped. This should be removed from the docs as well to avoid confusion. --- docs/README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index d49611cb..2bc3a34e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,14 +9,11 @@ body ```css body { - background: -webkit-gradient(linear, - left top, - left bottom, - color-stop(0, #fff), - color-stop(1, #000)); - background: -webkit-linear-gradient(top, #fff 0%, #000 100%); - background: -moz-linear-gradient(top, #fff 0%, #000 100%); - background: linear-gradient(top, #fff 0%, #000 100%); + background: -webkit-linear-gradient(top, #fff, #000); + background: -moz-linear-gradient(top, #fff, #000); + background: -o-linear-gradient(top, #fff, #000); + background: -ms-linear-gradient(top, #fff, #000); + background: linear-gradient(to bottom, #fff, #000); } ``` From b44795f6d448c2c9a75d98fe78a0333eafe9a84c Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 17 Sep 2014 11:12:51 -0400 Subject: [PATCH 227/254] remove some left-over html it was there when this was converted from an HTML page --- docs/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 2bc3a34e..0f59b367 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ Nib's gradient support is by far the largest feature it provides. Not only is th ```stylus body - background linear-gradient(top, white, black) + background linear-gradient(top, white, black) ``` ```css @@ -33,7 +33,7 @@ Units may be placed before or after the color: ```stylus body background linear-gradient(left, 80% red, #000) - background linear-gradient(top, #eee, 90% white, 10% black) + background linear-gradient(top, #eee, 90% white, 10% black) ``` ![](http://f.cl.ly/items/2B1U3m0t2T1B420I3C3I/Screenshot.png) @@ -112,7 +112,7 @@ button border-radius 5px button - border-radius bottom 10px` + border-radius bottom 10px ``` ```css From 93f383933ddeace01e5a2e65fb97f3479b6a775a Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 29 Sep 2014 12:02:56 -0400 Subject: [PATCH 228/254] 1.0.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b369457a..1f33864e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.0.3", + "version": "1.0.4", "license": "MIT", "repository": { "type": "git", From 247c372a5c1734e38c4e6b303c0b736017de34b6 Mon Sep 17 00:00:00 2001 From: ehoffmann Date: Wed, 29 Oct 2014 17:48:19 +0100 Subject: [PATCH 229/254] Update links; fixes #283 --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 78eb1972..c0cc1af8 100644 --- a/Readme.md +++ b/Readme.md @@ -1,8 +1,8 @@ -[![Build Status](https://travis-ci.org/visionmedia/nib.png?branch=master)](https://travis-ci.org/visionmedia/nib) +[![Build Status](https://travis-ci.org/tj/nib.png?branch=master)](https://travis-ci.org/visionmedia/nib) # Nib - Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://visionmedia.github.com/nib/). + Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://tj.github.com/nib/). ## Installation From 69a970639ba6ad4777369bbe53653cbaffc9f9bb Mon Sep 17 00:00:00 2001 From: ehoffmann Date: Wed, 29 Oct 2014 18:59:37 +0100 Subject: [PATCH 230/254] Update travis link --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index c0cc1af8..ebff0429 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/tj/nib.png?branch=master)](https://travis-ci.org/visionmedia/nib) +[![Build Status](https://travis-ci.org/tj/nib.png?branch=master)](https://travis-ci.org/tj/nib) # Nib From 53b2bed1c6f17e8ddfc4437ffbf5911c9cae9f0a Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sun, 16 Nov 2014 23:47:50 +0800 Subject: [PATCH 231/254] Readme: update docs URL and tj's github URL --- Readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index ebff0429..4696117d 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ # Nib - Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://tj.github.com/nib/). + Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://tj.github.io/nib/). ## Installation @@ -87,7 +87,7 @@ to be continued.... I would love more contributors. And if you have helped out, you are awesome! I want to give a huge thanks to these people: - - [TJ Holowaychuk](https://github.com/visionmedia) (Original Creator) + - [TJ Holowaychuk](https://github.com/tj) (Original Creator) - [Sean Lang](https://github.com/slang800) (Current Maintainer) - [Isaac Johnston](https://github.com/superstructor) - - [Everyone Else](https://github.com/visionmedia/nib/contributors) + - [Everyone Else](https://github.com/tj/nib/contributors) From 600cef55ed7ab85b63a4dcfc5f9b164b5a1e0eed Mon Sep 17 00:00:00 2001 From: Naoaki Yamada Date: Tue, 9 Dec 2014 21:29:50 +0900 Subject: [PATCH 232/254] Bump stylus to 0.49 and pass tests --- package.json | 2 +- test/cases/image.css | 8 ++++---- test/cases/linear-gradient.css | 17 ++++++++++++----- test/cases/linear-gradient.styl | 3 +++ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 1f33864e..043a6b49 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "0.45.x" + "stylus": "0.49.x" }, "devDependencies": { "connect": "1.x", diff --git a/test/cases/image.css b/test/cases/image.css index 1c5727b6..fffcb66a 100644 --- a/test/cases/image.css +++ b/test/cases/image.css @@ -1,7 +1,7 @@ #logo { background-image: url("https://github.com/images/branding/logo.main.png"); } -@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { +@media all and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1.5/1), (min-device-pixel-ratio: 1.5), (min-resolution: 138dpi), (min-resolution: 1.5dppx) { #logo { background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: auto auto; @@ -10,7 +10,7 @@ #logo { background-image: url("https://github.com/images/branding/logo.main.png"); } -@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { +@media all and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1.5/1), (min-device-pixel-ratio: 1.5), (min-resolution: 138dpi), (min-resolution: 1.5dppx) { #logo { background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: 50px 100px; @@ -19,7 +19,7 @@ #logo { background-image: url("https://github.com/images/branding/logo.main.png"); } -@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { +@media all and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1.5/1), (min-device-pixel-ratio: 1.5), (min-resolution: 138dpi), (min-resolution: 1.5dppx) { #logo { background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: cover; @@ -28,7 +28,7 @@ #logo { background-image: url("https://github.com/images/branding/logo.main.png"); } -@media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) { +@media all and (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1.5/1), (min-device-pixel-ratio: 1.5), (min-resolution: 138dpi), (min-resolution: 1.5dppx) { #logo { background-image: url("https://github.com/images/branding/logo.main@2x.png"); background-size: contain; diff --git a/test/cases/linear-gradient.css b/test/cases/linear-gradient.css index b4a664cb..f11f3fb2 100644 --- a/test/cases/linear-gradient.css +++ b/test/cases/linear-gradient.css @@ -76,11 +76,18 @@ body { background: linear-gradient(to left top, rgba(0,0,0,0.5) 80%, #000); } body { - background: -webkit-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); - background: -moz-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); - background: -o-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); - background: -ms-linear-gradient(right bottom, hsla(0,0,0,0.5) 80.5%, #000); - background: linear-gradient(to left top, hsla(0,0,0,0.5) 80.5%, #000); + background: -webkit-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: -moz-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: -o-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: -ms-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: linear-gradient(to left top, hsla(0,0%,0%,0.5) 80.5%, #000); +} +body { + background: -webkit-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: -moz-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: -o-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: -ms-linear-gradient(right bottom, hsla(0,0%,0%,0.5) 80.5%, #000); + background: linear-gradient(to left top, hsla(0,0%,0%,0.5) 80.5%, #000); } body { background: -webkit-linear-gradient(right bottom, #fff 20px, #000); diff --git a/test/cases/linear-gradient.styl b/test/cases/linear-gradient.styl index 129c5413..dc586ccb 100644 --- a/test/cases/linear-gradient.styl +++ b/test/cases/linear-gradient.styl @@ -37,6 +37,9 @@ body body background: linear-gradient(right bottom, 80.5% hsla(0,0,0,0.5), black) +body + background: linear-gradient(right bottom, 80.5% hsla(0,0%,0%,0.5), black) + body background: linear-gradient(right bottom, 20px white, black) From 72cf21856eba53c28395db9b55f388762bf9529e Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Fri, 12 Dec 2014 11:57:48 -0500 Subject: [PATCH 233/254] make sure npm is updated for travis --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 09d3ef37..3aae333f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,3 +2,6 @@ language: node_js node_js: - 0.8 - 0.10 + +before_install: + - npm install -g npm@~1.4.6 From afa4bfed12b7309d93d5bf4def3849f698d70a9f Mon Sep 17 00:00:00 2001 From: Maxim Chervonny Date: Fri, 12 Dec 2014 12:44:47 +0300 Subject: [PATCH 234/254] reseting opacity in IE when !important and add tests --- lib/nib/vendor.styl | 4 ++-- test/cases/importance.css | 3 +++ test/cases/importance.styl | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index a9d8bcf8..aed4b91b 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -274,8 +274,8 @@ opacity(n, args...) else val = round(n * 100) if val == 100 - -ms-filter: none - filter: none + -ms-filter: none args + filter: none args else -ms-filter: '"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)"' % val args filter: 'alpha(opacity=%s)' % val args diff --git a/test/cases/importance.css b/test/cases/importance.css index 5c089c8a..77bce35f 100644 --- a/test/cases/importance.css +++ b/test/cases/importance.css @@ -132,6 +132,9 @@ opacity: 0.5 !important; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)" !important; filter: alpha(opacity=50) !important; + opacity: 1 !important; + -ms-filter: none !important; + filter: none !important; resize: both !important; cursor: pointer !important; unicode-bidi: normal !important; diff --git a/test/cases/importance.styl b/test/cases/importance.styl index 8f000389..067b922c 100644 --- a/test/cases/importance.styl +++ b/test/cases/importance.styl @@ -122,6 +122,7 @@ opacity: 0.5 !important + opacity: 1 !important resize: both !important cursor: pointer !important From dfed0e157ab88af4aba0a5dad4e75ca43a079671 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sun, 16 Nov 2014 06:23:08 +0900 Subject: [PATCH 235/254] Add normalize Including docs & tests --- Readme.md | 3 +- docs/README.md | 42 ++++++-- lib/nib/index.styl | 1 + lib/nib/normalize/base.styl | 8 ++ lib/nib/normalize/embed.styl | 7 ++ lib/nib/normalize/forms.styl | 69 ++++++++++++ lib/nib/normalize/groups.styl | 17 +++ lib/nib/normalize/html5.styl | 19 ++++ lib/nib/normalize/index.styl | 19 ++++ lib/nib/normalize/links.styl | 6 ++ lib/nib/normalize/tables.styl | 7 ++ lib/nib/normalize/text.styl | 30 ++++++ test/cases/normalize-reset.css | 180 ++++++++++++++++++++++++++++++++ test/cases/normalize-reset.styl | 2 + 14 files changed, 399 insertions(+), 11 deletions(-) create mode 100644 lib/nib/normalize/base.styl create mode 100644 lib/nib/normalize/embed.styl create mode 100644 lib/nib/normalize/forms.styl create mode 100644 lib/nib/normalize/groups.styl create mode 100644 lib/nib/normalize/html5.styl create mode 100644 lib/nib/normalize/index.styl create mode 100644 lib/nib/normalize/links.styl create mode 100644 lib/nib/normalize/tables.styl create mode 100644 lib/nib/normalize/text.styl create mode 100644 test/cases/normalize-reset.css create mode 100644 test/cases/normalize-reset.styl diff --git a/Readme.md b/Readme.md index 4696117d..597528a6 100644 --- a/Readme.md +++ b/Readme.md @@ -53,9 +53,10 @@ server.use(stylus.middleware({ ```css @import 'https://github.com/nib/gradients' @import 'https://github.com/nib/overflow' + @import 'https://github.com/nib/normalize' ``` -to be continued.... +_To be continued..._ ## More Information diff --git a/docs/README.md b/docs/README.md index 0f59b367..fc95ca05 100644 --- a/docs/README.md +++ b/docs/README.md @@ -185,16 +185,38 @@ button { ``` ## Reset -Nib comes bundled with Eric Meyer's style reset support, you can choose to apply the global or any specifics that you wish. To view the definitions view [reset.styl](https://github.com/visionmedia/nib/blob/master/lib/nib/reset.styl) - -- global-reset() -- nested-reset() -- reset-font() -- reset-box-model() -- reset-body() -- reset-table() -- reset-table-cell() -- reset-html5() +Nib comes bundled with [Eric Meyer's style reset](eric-meyer) and [Nicolas Gallagher's _Normalize_](normalize) support and, you can choose to apply the global or any specifics that you wish. To view the definitions view [`reset.styl`](https://github.com/tj/nib/blob/master/lib/nib/reset.styl). + +[eric-meyer]: http://meyerweb.com/eric/tools/css/reset/ +[normalize]: https://github.com/necolas/normalize.css + +> CSS Reset + +- `global-reset()` +- `nested-reset()` +- `reset-font()` +- `reset-box-model()` +- `reset-body()` +- `reset-table()` +- `reset-table-cell()` +- `reset-html5()` + +> Normalize + +- `normalize-html5()` +- `normalize-base()` +- `normalize-links()` +- `normalize-text()` +- `normalize-embed()` +- `normalize-groups()` +- `normalize-forms()` +- `normalize-tables()` +- `normalize-css()` + +[Read more][normalize-about] about Normalize or see the original CSS [here][normalize-css]. + +[normalize-about]: http://nicolasgallagher.com/about-normalize-css/ +[normalize-css]: https://github.com/necolas/normalize.css/blob/master/normalize.css ## Border This shorthand lets you create a border by just specifying a color, with defaults for width and style. diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 40355fe2..0a6d18f9 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -5,6 +5,7 @@ @import 'https://github.com/gradients' @import 'https://github.com/iconic' @import 'https://github.com/image' +@import 'https://github.com/normalize' @import 'https://github.com/overflow' @import 'https://github.com/positions' @import 'https://github.com/reset' diff --git a/lib/nib/normalize/base.styl b/lib/nib/normalize/base.styl new file mode 100644 index 00000000..d026eb92 --- /dev/null +++ b/lib/nib/normalize/base.styl @@ -0,0 +1,8 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-base() + html // Prevent iOS text size adjust after orientation change. + font-family sans-serif + -ms-text-size-adjust 100% + -webkit-text-size-adjust 100% + body + margin 0 diff --git a/lib/nib/normalize/embed.styl b/lib/nib/normalize/embed.styl new file mode 100644 index 00000000..ab956cb3 --- /dev/null +++ b/lib/nib/normalize/embed.styl @@ -0,0 +1,7 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-embed() + img // No border when inside `a` in IE 8~10. + border 0 + + svg:not(:root) // Overflow should be hidden in IE 9~11. + overflow hidden diff --git a/lib/nib/normalize/forms.styl b/lib/nib/normalize/forms.styl new file mode 100644 index 00000000..7c080e66 --- /dev/null +++ b/lib/nib/normalize/forms.styl @@ -0,0 +1,69 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-forms() + // Known limitation: Chrome and Safari on OS X allow very limited + // styling of `select`, unless a `border` property is set. + button, input, optgroup, select, textarea + color inherit // Correct color not being inherited. + font inherit // Correct font properties not being inherited. + margin 0 // Fix margins in FF 4+, Safari, and Chrome. + + button // Fix `overflow` set to `hidden` in IE 8/9/10/11. + overflow visible + + button, select // Consistent text-transform across browsers. + text-transform none + + // Fix WebKit bug in Android 4.0, inability to style clickable `input` in + // iOS and improve usability and consistency of cursor style. + button, html input[type='button'], input[type='reset'], input[type='submit'] + cursor pointer + -webkit-appearance button + + // Reset default cursor for disabled elements. + button[disabled], html input[disabled] + cursor default + + // Remove inner padding and border in FF 4+. + button::-moz-focus-inner, input::-moz-focus-inner + border 0 + padding 0 + + input // Reset line-height again FF 4+ UA stylsheet. + line-height normal + + // Fix box sizing and excess padding in IE 8~10 + input[type='checkbox'], input[type='radio'] + box-sizing border-box + padding 0 + + // Fix the cursor style for Chrome's increment/decrement buttons. + input[type='number']::-webkit-inner-spin-button, + input[type='number']::-webkit-outer-spin-button + height auto + + // Consistent appearance and box-sizing in Safari and Chrome. + input[type='search'] + -webkit-appearance textfield + -moz-box-sizing content-box + -webkit-box-sizing content-box + box-sizing content-box + + // No inner padding and search cancel button in Safari and Chrome on OS X. + input[type='search']::-webkit-search-cancel-button, + input[type='search']::-webkit-search-decoration + -webkit-appearance none + + fieldset // Consistent border, margin, and padding. + border 1px solid #c0c0c0 + margin 0 2px + padding 0.35em 0.625em 0.75em + + legend // Hack to correct `color` not being inherited in IE 8/9/10/11. + border 0 + padding 0 + + textarea // Remove default vertical scrollbar in IE 8~11. + overflow auto + + optgroup // Don't inherit the `font-weight` applied above. + font-weight bold diff --git a/lib/nib/normalize/groups.styl b/lib/nib/normalize/groups.styl new file mode 100644 index 00000000..d9c0996d --- /dev/null +++ b/lib/nib/normalize/groups.styl @@ -0,0 +1,17 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-groups() + figure // Margin should exist in IE 8~9 / Safari. + margin 1em 40px + + hr // Consistency between FF and others. + -moz-box-sizing content-box + box-sizing content-box + height 0 + + pre // Contain overflow and wrap words. + overflow auto + + // Hack to fix odd `em`-unit font size rendering in all browsers. + code, kbd, pre, samp + font-family monospace, monospace + font-size 1em diff --git a/lib/nib/normalize/html5.styl b/lib/nib/normalize/html5.styl new file mode 100644 index 00000000..729c3b95 --- /dev/null +++ b/lib/nib/normalize/html5.styl @@ -0,0 +1,19 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-html5() + // `block` display for HTML5 elements in IE 8~11 and FF. + article, details, section, summary, + aside, main, menu, nav, figcaption, + figure, footer, header, hgroup + display block + + audio, canvas, progress, video + display inline-block // Set `inline-block` not defined in IE 8~9. + vertical-align baseline // Fix v-align of `progress` in Chrome, FF, and O. + + audio:not([controls]) + display none // Prevent displaying `audio` without controls. + height 0 // Remove excess height in iOS 5 devices. + + [hidden], // Address `[hidden]` styling not present in IE 8~10. + template // Hide the `template` element in IE 8~11, Safari, and FF < 22. + display none diff --git a/lib/nib/normalize/index.styl b/lib/nib/normalize/index.styl new file mode 100644 index 00000000..1896bfb7 --- /dev/null +++ b/lib/nib/normalize/index.styl @@ -0,0 +1,19 @@ +// Based in Nicolas Gallagher's git.io/normalize +@import 'https://github.com/base' +@import 'https://github.com/html5' +@import 'https://github.com/links' +@import 'https://github.com/text' +@import 'https://github.com/embed' +@import 'https://github.com/groups' +@import 'https://github.com/forms' +@import 'https://github.com/tables' + +normalize-css() + normalize-base() + normalize-html5() + normalize-links() + normalize-text() + normalize-embed() + normalize-groups() + normalize-forms() + normalize-tables() diff --git a/lib/nib/normalize/links.styl b/lib/nib/normalize/links.styl new file mode 100644 index 00000000..28c10329 --- /dev/null +++ b/lib/nib/normalize/links.styl @@ -0,0 +1,6 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-links() + a // No gray bg color in active links in IE 10. + background-color transparent + &:active, &:hover + outline 0 // + readability when focused. diff --git a/lib/nib/normalize/tables.styl b/lib/nib/normalize/tables.styl new file mode 100644 index 00000000..da7c4784 --- /dev/null +++ b/lib/nib/normalize/tables.styl @@ -0,0 +1,7 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-tables() + table // Remove most spacing between table cells. + border-collapse collapse + border-spacing 0 + td, th + padding 0 diff --git a/lib/nib/normalize/text.styl b/lib/nib/normalize/text.styl new file mode 100644 index 00000000..e4328ccc --- /dev/null +++ b/lib/nib/normalize/text.styl @@ -0,0 +1,30 @@ +// Based in Nicolas Gallagher's git.io/normalize +normalize-text() + abbr[title] // + style not present in IE 8~11, Safari, and Chrome. + border-bottom 1px dotted + + dfn // + style not present in Safari and Chrome. + font-style italic + + mark // + style not present in IE 8/9. + background #ff0; color #000 + + b, strong // Fix `font-weight: bolder` in FF 4+, Safari, and Chrome. + font-weight bold + + h1 // `h1` inside `section` and `article` fix for FF 4+, Safari & Chrome. + font-size 2em + margin 0.67em 0 + + small // Consistent font-size across browsers. + font-size 80% + + sub, sup // Prevent `sub` and `sup` affecting `line-height`. + font-size 75% + line-height 0 + position relative + vertical-align baseline + sup + top -0.5em + sub + bottom -0.25em diff --git a/test/cases/normalize-reset.css b/test/cases/normalize-reset.css new file mode 100644 index 00000000..090e76e4 --- /dev/null +++ b/test/cases/normalize-reset.css @@ -0,0 +1,180 @@ +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +details, +section, +summary, +aside, +main, +menu, +nav, +figcaption, +figure, +footer, +header, +hgroup { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +dfn { + font-style: italic; +} +mark { + background: #ff0; + color: #000; +} +b, +strong { + font-weight: bold; +} +h1 { + font-size: 2em; + margin: 0.67em 0; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type='button'], +input[type='reset'], +input[type='submit'] { + cursor: pointer; + -webkit-appearance: button; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +input { + line-height: normal; +} +input[type='checkbox'], +input[type='radio'] { + box-sizing: border-box; + padding: 0; +} +input[type='number']::-webkit-inner-spin-button, +input[type='number']::-webkit-outer-spin-button { + height: auto; +} +input[type='search'] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} +input[type='search']::-webkit-search-cancel-button, +input[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +legend { + border: 0; + padding: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} diff --git a/test/cases/normalize-reset.styl b/test/cases/normalize-reset.styl new file mode 100644 index 00000000..2aaa0d02 --- /dev/null +++ b/test/cases/normalize-reset.styl @@ -0,0 +1,2 @@ +@import 'https://github.com/nib/normalize' +normalize-css() From a24215d87318f0d553f2b88ed2859b82b4188c10 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Mon, 19 Jan 2015 10:53:50 -0500 Subject: [PATCH 236/254] improve comments for test runner --- test/runner.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/runner.js b/test/runner.js index b41c2af7..d779a59a 100644 --- a/test/runner.js +++ b/test/runner.js @@ -1,20 +1,24 @@ - /** * Module dependencies. */ - var stylus = require('stylus'), nib = require('../'), fs = require('fs'); -// test cases - +/** + * Read test/cases directory and filter all `.styl` files, then remove + * this extension for each file in the collection and prepare to test. + */ var cases = fs.readdirSync('test/cases').filter(function(file){ - return ~file.indexOf('.styl'); + return ~file.indexOf('.styl'); // bitwise flip to treat result as truthy. }).map(function(file){ return file.replace('.styl', ''); }); +/* + * For each `.styl` and `.css` pair in `test/cases`, compile stylus to css + * and compare actual result to expected css. + */ describe('integration', function(){ cases.forEach(function(test){ var name = test.replace(/[-.]/g, ' '); From 061612cf80110e53ef5a3749980e0bf4cdc124fa Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Mon, 19 Jan 2015 11:38:34 -0500 Subject: [PATCH 237/254] 1.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 043a6b49..c4161941 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.0.4", + "version": "1.1.0", "license": "MIT", "repository": { "type": "git", From 231c14a09e4ee14870439de22bffa55d6ec85830 Mon Sep 17 00:00:00 2001 From: netlemur Date: Thu, 11 Jun 2015 14:00:49 +0200 Subject: [PATCH 238/254] extract border-radius into own file --- lib/nib/border-radius.styl | 54 +++++++++++++++++++ lib/nib/index.styl | 1 + lib/nib/vendor.styl | 54 ------------------- ...or.border-radius.css => border-radius.css} | 0 ....border-radius.styl => border-radius.styl} | 2 +- 5 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 lib/nib/border-radius.styl rename test/cases/{vendor.border-radius.css => border-radius.css} (100%) rename test/cases/{vendor.border-radius.styl => border-radius.styl} (94%) diff --git a/lib/nib/border-radius.styl b/lib/nib/border-radius.styl new file mode 100644 index 00000000..ed091265 --- /dev/null +++ b/lib/nib/border-radius.styl @@ -0,0 +1,54 @@ +/* + * Helper for border-radius(). + */ + +-apply-border-radius(pos, importance) + if length(pos) == 3 + // border-radius: + y = pos[0] + x = pos[1] + // We don't use moz for simple boder-radius anymore + // vendor('border-radius-%s%s' % pos, pos[2], only: moz) + vendor('border-%s-%s-radius' % pos, pos[2] importance, only: webkit official) + else if pos[0] in (top bottom) + // border-radius: + -apply-border-radius(pos[0] left pos[1], importance) + -apply-border-radius(pos[0] right pos[1], importance) + else if pos[0] in (left right) + // border-radius: + unshift(pos, top); + -apply-border-radius(pos, importance) + pos[0] = bottom + -apply-border-radius(pos, importance) + +/* + * border-radius supporting vendor prefixes and + * augmented behavior. + * + * Examples: + * + * border-radius: 2px 5px + * border-radius: top 5px bottom 10px + * border-radius: left 5px + * border-radius: top left 5px + * border-radius: top left 10px bottom right 5px + * border-radius: top left 10px, bottom right 5px + * + */ + +border-radius() + pos = () + augmented = false + importance = arguments[length(arguments) - 1] == !important ? !important : unquote('') + + for args in arguments + for arg in args + if arg is a 'ident' + append(pos, arg) + augmented = true + else + append(pos, arg) + if augmented + -apply-border-radius(pos, importance) + pos = () + vendor('border-radius', pos, only: webkit official) unless augmented diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 0a6d18f9..02d72c1d 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -1,4 +1,5 @@ @import 'https://github.com/border' +@import 'https://github.com/border-radius' @import 'https://github.com/clearfix' @import 'https://github.com/color-image' @import 'https://github.com/flex' diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index aed4b91b..c0cfb859 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -455,60 +455,6 @@ text-size-adjust() font-smoothing() vendor('font-smoothing', arguments, only: webkit) -/* - * Helper for border-radius(). - */ - --apply-border-radius(pos, importance) - if length(pos) == 3 - // border-radius: - y = pos[0] - x = pos[1] - // We don't use moz for simple boder-radius anymore - // vendor('border-radius-%s%s' % pos, pos[2], only: moz) - vendor('border-%s-%s-radius' % pos, pos[2] importance, only: webkit official) - else if pos[0] in (top bottom) - // border-radius: - -apply-border-radius(pos[0] left pos[1], importance) - -apply-border-radius(pos[0] right pos[1], importance) - else if pos[0] in (left right) - // border-radius: - unshift(pos, top); - -apply-border-radius(pos, importance) - pos[0] = bottom - -apply-border-radius(pos, importance) - -/* - * border-radius supporting vendor prefixes and - * augmented behavior. - * - * Examples: - * - * border-radius: 2px 5px - * border-radius: top 5px bottom 10px - * border-radius: left 5px - * border-radius: top left 5px - * border-radius: top left 10px bottom right 5px - * border-radius: top left 10px, bottom right 5px - * - */ - -border-radius() - pos = () - augmented = false - importance = arguments[length(arguments) - 1] == !important ? !important : unquote('') - - for args in arguments - for arg in args - if arg is a 'ident' - append(pos, arg) - augmented = true - else - append(pos, arg) - if augmented - -apply-border-radius(pos, importance) - pos = () - vendor('border-radius', pos, only: webkit official) unless augmented /** * Vendor input-placeholder/placeholder support. diff --git a/test/cases/vendor.border-radius.css b/test/cases/border-radius.css similarity index 100% rename from test/cases/vendor.border-radius.css rename to test/cases/border-radius.css diff --git a/test/cases/vendor.border-radius.styl b/test/cases/border-radius.styl similarity index 94% rename from test/cases/vendor.border-radius.styl rename to test/cases/border-radius.styl index b0ee4684..4e33f8e0 100644 --- a/test/cases/vendor.border-radius.styl +++ b/test/cases/border-radius.styl @@ -1,4 +1,4 @@ -@import 'https://github.com/nib/vendor' +@import 'https://github.com/nib/border-radius' button border-radius: 1px 2px / 3px 4px From 67f08de5e9d02e0610d7c8bb7c2bfda48fd95030 Mon Sep 17 00:00:00 2001 From: netlemur Date: Thu, 11 Jun 2015 14:02:59 +0200 Subject: [PATCH 239/254] remove vendor prefix for border-radius --- lib/nib/border-radius.styl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/nib/border-radius.styl b/lib/nib/border-radius.styl index ed091265..53922dc5 100644 --- a/lib/nib/border-radius.styl +++ b/lib/nib/border-radius.styl @@ -7,9 +7,9 @@ // border-radius: y = pos[0] x = pos[1] - // We don't use moz for simple boder-radius anymore - // vendor('border-radius-%s%s' % pos, pos[2], only: moz) - vendor('border-%s-%s-radius' % pos, pos[2] importance, only: webkit official) + // We don't use vendor for boder-radius anymore + // vendor('border-radius-%s%s' % pos, pos[2], only: webkit official) + 'border-%s-%s-radius' % pos, pos[2] importance else if pos[0] in (top bottom) // border-radius: -apply-border-radius(pos[0] left pos[1], importance) @@ -22,8 +22,7 @@ -apply-border-radius(pos, importance) /* - * border-radius supporting vendor prefixes and - * augmented behavior. + * border-radius supporting augmented behavior. * * Examples: * @@ -51,4 +50,4 @@ border-radius() if augmented -apply-border-radius(pos, importance) pos = () - vendor('border-radius', pos, only: webkit official) unless augmented + border-radius pos unless augmented From 8ad9722099c1a2754f12991aa95ebe2b5ffcd547 Mon Sep 17 00:00:00 2001 From: netlemur Date: Thu, 11 Jun 2015 14:43:01 +0200 Subject: [PATCH 240/254] fix border-radius prop output --- lib/nib/border-radius.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nib/border-radius.styl b/lib/nib/border-radius.styl index 53922dc5..148fdc33 100644 --- a/lib/nib/border-radius.styl +++ b/lib/nib/border-radius.styl @@ -4,12 +4,12 @@ -apply-border-radius(pos, importance) if length(pos) == 3 - // border-radius: + // border-radius: y = pos[0] x = pos[1] // We don't use vendor for boder-radius anymore // vendor('border-radius-%s%s' % pos, pos[2], only: webkit official) - 'border-%s-%s-radius' % pos, pos[2] importance + {'border-%s-%s-radius' % pos}: pos[2] importance else if pos[0] in (top bottom) // border-radius: -apply-border-radius(pos[0] left pos[1], importance) From 69412f1ed8e8fa3934fcd425a51465d8e39b0229 Mon Sep 17 00:00:00 2001 From: netlemur Date: Thu, 11 Jun 2015 14:43:12 +0200 Subject: [PATCH 241/254] update testcases --- test/cases/border-radius.css | 15 --------------- test/cases/importance.css | 1 - 2 files changed, 16 deletions(-) diff --git a/test/cases/border-radius.css b/test/cases/border-radius.css index 82ba9816..20b918c5 100644 --- a/test/cases/border-radius.css +++ b/test/cases/border-radius.css @@ -1,48 +1,33 @@ button { - -webkit-border-radius: 1px 2px/3px 4px; border-radius: 1px 2px/3px 4px; } button { - -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; } button { - -webkit-border-top-left-radius: 10px !important; border-top-left-radius: 10px !important; } button { - -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } button { - -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; - -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; - -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; - -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; - -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; - -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } button { - -webkit-border-radius: 5px; border-radius: 5px; } diff --git a/test/cases/importance.css b/test/cases/importance.css index 77bce35f..8f9f9ccd 100644 --- a/test/cases/importance.css +++ b/test/cases/importance.css @@ -55,7 +55,6 @@ border-right: 1px !important; border-bottom: 1px !important; border-left: 1px !important; - -webkit-border-radius: 50% !important; border-radius: 50% !important; border-top-right-radius: 50% !important; border-top-left-radius: 50% !important; From 303fe96b2d34a0209a5ad0b80ee4b05989c8f312 Mon Sep 17 00:00:00 2001 From: netlemur Date: Thu, 11 Jun 2015 14:51:43 +0200 Subject: [PATCH 242/254] update README to reflect updated testcase --- docs/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index fc95ca05..a1bf667c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -117,21 +117,13 @@ button ```css button { - -webkit-border-radius: 1px 2px/3px 4px; - -moz-border-radius: 1px 2px/3px 4px; border-radius: 1px 2px/3px 4px; } button { - -webkit-border-radius: 5px; - -moz-border-radius: 5px; border-radius: 5px; } button { - -moz-border-radius-topleft: 10px; - -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; - -moz-border-radius-bottomright: 10px; - -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; } ``` From 9f6b5d35aea532765132d8aa5652f9164f660dc4 Mon Sep 17 00:00:00 2001 From: Andrew Lewisohn Date: Mon, 6 Jun 2016 16:45:01 -0400 Subject: [PATCH 243/254] feat: update Stylus dependency to version 0.54.5 Version `0.49.x` of Stylus uses Octal literals in log messages, which causes any code using `--use_strict` or `'use strict';` to fail. Upgrading to a newer version should fix this problem. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4161941..90487478 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "0.49.x" + "stylus": "0.54.5" }, "devDependencies": { "connect": "1.x", From 14cf2d3382d3ed1d61c8de76078f2495f344772c Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 5 Aug 2016 10:59:43 -0700 Subject: [PATCH 244/254] Release 1.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 90487478..fc56b8c1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.1.0", + "version": "1.1.2", "license": "MIT", "repository": { "type": "git", From 284b2e5e75e7e2d35cca2a0647241199deaaf0f7 Mon Sep 17 00:00:00 2001 From: Ildar Sagdejev Date: Wed, 27 Dec 2017 00:22:26 -0500 Subject: [PATCH 245/254] Remove vendor prefix for background-size --- docs/README.md | 1 - lib/nib/vendor.styl | 7 ------- test/cases/importance.css | 2 -- 3 files changed, 10 deletions(-) diff --git a/docs/README.md b/docs/README.md index a1bf667c..00459e00 100644 --- a/docs/README.md +++ b/docs/README.md @@ -283,7 +283,6 @@ Here is the full list of properties for which Nib provides transparent mixins: - column-rule-width - column-rule-style - column-width -- background-size - transform - border-image - transition diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index c0cfb859..275489cb 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -168,13 +168,6 @@ background-origin() legacy-bg-values('background-origin', arguments) background-origin: arguments -/* - * Vendor "background-size" support. - */ - -background-size() - vendor('background-size', arguments, only: webkit moz official) - /* * Vendor "transform" support. */ diff --git a/test/cases/importance.css b/test/cases/importance.css index 8f9f9ccd..fb62b774 100644 --- a/test/cases/importance.css +++ b/test/cases/importance.css @@ -77,8 +77,6 @@ -webkit-background-origin: padding !important; -moz-background-origin: padding !important; background-origin: padding-box !important; - -webkit-background-size: 0 !important; - -moz-background-size: 0 !important; background-size: 0 !important; background: none !important; -webkit-box-shadow: 0 1px 0 #000 !important; From 49344e624523f97d7cd7a862f362594799239ba7 Mon Sep 17 00:00:00 2001 From: Mikhail Korepanov Date: Fri, 9 Mar 2018 23:18:48 +0300 Subject: [PATCH 246/254] Update documentation link --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 597528a6..0e783921 100644 --- a/Readme.md +++ b/Readme.md @@ -1,8 +1,8 @@ -[![Build Status](https://travis-ci.org/tj/nib.png?branch=master)](https://travis-ci.org/tj/nib) +[![Build Status](https://travis-ci.org/tj/nib.png?branch=master)](https://travis-ci.org/stylus/nib) # Nib - Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://tj.github.io/nib/). + Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://stylus.github.io/nib/). ## Installation From 6cccb9898b3217700071cdfe15dad403a8e371ba Mon Sep 17 00:00:00 2001 From: Mikhail Korepanov Date: Fri, 9 Mar 2018 23:22:43 +0300 Subject: [PATCH 247/254] Test in modern node versions --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3aae333f..fd47ecb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: node_js node_js: - - 0.8 - - 0.10 - -before_install: - - npm install -g npm@~1.4.6 + - 6 + - 7 + - 8 + - stable From 5ba7db7768e4668044c0d4d94585559d8f73a6ac Mon Sep 17 00:00:00 2001 From: Mikhail Korepanov Date: Fri, 9 Mar 2018 23:25:31 +0300 Subject: [PATCH 248/254] Update build badge url --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 0e783921..403e822a 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/tj/nib.png?branch=master)](https://travis-ci.org/stylus/nib) +[![Build Status](https://travis-ci.org/stylus/nib.svg?branch=master)](https://travis-ci.org/stylus/nib) # Nib From b12c7f7840a28e071e606c498d83b4f03fff92fe Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Fri, 23 Mar 2018 15:04:04 +0100 Subject: [PATCH 249/254] Use official column-fill property --- lib/nib/vendor.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nib/vendor.styl b/lib/nib/vendor.styl index c0cfb859..7bf03cfa 100644 --- a/lib/nib/vendor.styl +++ b/lib/nib/vendor.styl @@ -128,7 +128,7 @@ column-span() */ column-fill() - vendor('column-fill', arguments, only: moz) + vendor('column-fill', arguments, only: moz official) /* * Legacy syntax support for background-clip and background-origin From a77e64d93aef4ccc00afb36f6f7e3232bc3ee352 Mon Sep 17 00:00:00 2001 From: Alynx Zhou Date: Tue, 21 Jul 2020 14:46:25 +0800 Subject: [PATCH 250/254] Updated stylus dependencies to 0.54.8. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc56b8c1..93709392 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git://github.com/visionmedia/nib.git" }, "dependencies": { - "stylus": "0.54.5" + "stylus": "^0.54.8" }, "devDependencies": { "connect": "1.x", From 8291e5d20e400e04892a0b1261e2a81773d07fb4 Mon Sep 17 00:00:00 2001 From: "v-chupurnov@gmail.com" Date: Fri, 27 Nov 2020 14:22:18 +0300 Subject: [PATCH 251/254] Fixed tests --- .gitignore | 1 + package-lock.json | 1060 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- test/runner.js | 7 +- 4 files changed, 1067 insertions(+), 3 deletions(-) create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 40be72c9..aeb71b7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea *.css !test/cases/*.css .DS_Store diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..e74e0558 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1060 @@ +{ + "name": "nib", + "version": "1.1.2", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chokidar": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.5.2.tgz", + "integrity": "sha1-8nAyZwmhFaEmz+1WI4UkObjko7U=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "connect": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-1.9.2.tgz", + "integrity": "sha1-QogKIulDiuWait105Df1iujlKAc=", + "dev": true, + "requires": { + "formidable": "1.0.x", + "mime": ">= 0.0.1", + "qs": ">= 0.4.0" + } + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "css-parse": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", + "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", + "requires": { + "css": "^2.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "formidable": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.16.tgz", + "integrity": "sha1-SRbP38TL7QILJXpqlQWpqzjCzQ4=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "jade": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/jade/-/jade-0.22.0.tgz", + "integrity": "sha1-KxDgxj8N1eTJCcObPt2IAVMwVn0=", + "dev": true, + "requires": { + "commander": "0.5.2", + "mkdirp": "0.3.0" + }, + "dependencies": { + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", + "dev": true + } + } + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "mime": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "mocha": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.3", + "debug": "4.2.0", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.2", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nanoid": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "requires": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "requires": { + "should-type": "^1.4.0" + } + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true, + "requires": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + }, + "should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "requires": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "dev": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "stylus": { + "version": "0.54.8", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.8.tgz", + "integrity": "sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg==", + "requires": { + "css-parse": "~2.0.0", + "debug": "~3.1.0", + "glob": "^7.1.6", + "mkdirp": "~1.0.4", + "safer-buffer": "^2.1.2", + "sax": "~1.2.4", + "semver": "^6.3.0", + "source-map": "^0.7.3" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "workerpool": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", + "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + } + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 93709392..581243a1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.1.2", + "version": "1.1.3", "license": "MIT", "repository": { "type": "git", diff --git a/test/runner.js b/test/runner.js index d779a59a..1fb9adfb 100644 --- a/test/runner.js +++ b/test/runner.js @@ -3,6 +3,7 @@ */ var stylus = require('stylus'), nib = require('../'), + should = require('should'), fs = require('fs'); /** @@ -32,11 +33,13 @@ describe('integration', function(){ .set('filename', path) .define('url', stylus.url()); - if (~test.indexOf('compress')) style.set('compress', true); + if (~test.indexOf('compress')) { + style.set('compress', true); + } style.render(function(err, actual){ if (err) throw err; - actual.trim().should.equal(css); + should.equal(actual.trim(), css); }); }); }); From 1e6f89fd165c42428fde4d0ba4034fa8c1107fc5 Mon Sep 17 00:00:00 2001 From: iChenLei Date: Wed, 8 Sep 2021 09:43:08 +0800 Subject: [PATCH 252/254] chore: add github actions ci --- .github/workflows/ci.yml | 48 ++++++++++++++++++ .travis.yml | 6 --- Readme.md | 6 +-- package-lock.json | 107 +++++++++++++++++++-------------------- package.json | 9 ++-- 5 files changed, 107 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..42ad8b8b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +# Github actions workflow name +name: CI + +# Triggers the workflow on push or pull request events +on: + push: + branches: [main, master] + tags: ['**'] + pull_request: + branches: + - master + +jobs: + node_tests: + name: 'Test nib on ${{matrix.os}} with node${{matrix.node}}' + strategy: + matrix: + os: [ubuntu-latest] + # Latest four Nodejs LTS version + node: [10, 12, 14, 16] + runs-on: ${{ matrix.os }} + steps: + # Pull repo to test machine + - uses: actions/checkout@v2 + # Configures the node version used on GitHub-hosted runners + - uses: actions/setup-node@v2 + with: + # The Node.js version to configure + node-version: ${{ matrix.node }} + # Caching dependencies to speed up workflows + - name: Get npm cache directory + id: npm-cache-dir + run: | + echo "::set-output name=dir::$(npm config get cache)" + - uses: actions/cache@v2 + id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install npm dependencies + run: npm install + - name: Print put node & npm version + # Output useful info for debugging. + run: node --version && npm --version + - name: Run Test + run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fd47ecb4..00000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - 6 - - 7 - - 8 - - stable diff --git a/Readme.md b/Readme.md index 403e822a..6db9de68 100644 --- a/Readme.md +++ b/Readme.md @@ -1,8 +1,6 @@ -[![Build Status](https://travis-ci.org/stylus/nib.svg?branch=master)](https://travis-ci.org/stylus/nib) +# Nib [![npm](https://img.shields.io/npm/v/nib)](https://www.npmjs.com/package/nib) [![build status](https://github.com/stylus/nib/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stylus/nib/actions/workflows/ci.yml) -# Nib - - Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://stylus.github.io/nib/). + Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://stylus.github.io/nib). ## Installation diff --git a/package-lock.json b/package-lock.json index e74e0558..2ac7ca38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,12 +53,14 @@ "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "binary-extensions": { "version": "2.1.0", @@ -70,6 +72,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -185,7 +188,8 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "connect": { "version": "1.9.2", @@ -199,35 +203,29 @@ } }, "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dev": true, "requires": { - "inherits": "^2.0.3", + "inherits": "^2.0.4", "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" + "source-map-resolve": "^0.6.0" }, "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, - "css-parse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", - "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", - "requires": { - "css": "^2.0.0" - } - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -241,7 +239,8 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, "diff": { "version": "4.0.2", @@ -301,7 +300,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "2.1.3", @@ -320,6 +320,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -360,6 +361,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -368,7 +370,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "is-binary-path": { "version": "2.1.0", @@ -474,6 +477,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -481,7 +485,8 @@ "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "mocha": { "version": "8.2.1", @@ -536,7 +541,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "nanoid": { "version": "3.1.12", @@ -554,6 +560,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -591,7 +598,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "picomatch": { "version": "2.2.2", @@ -635,11 +643,6 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -649,17 +652,20 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, "serialize-javascript": { "version": "5.0.1", @@ -733,25 +739,19 @@ "source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true }, "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, "requires": { "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "decode-uri-component": "^0.2.0" } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -784,11 +784,12 @@ "dev": true }, "stylus": { - "version": "0.54.8", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.8.tgz", - "integrity": "sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg==", + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.55.0.tgz", + "integrity": "sha512-MuzIIVRSbc8XxHH7FjkvWqkIcr1BvoMZoR/oFuAJDlh7VSaNJzrB4uJ38GRQa+mWjLXODAMzeDe0xi9GYbGwnw==", + "dev": true, "requires": { - "css-parse": "~2.0.0", + "css": "^3.0.0", "debug": "~3.1.0", "glob": "^7.1.6", "mkdirp": "~1.0.4", @@ -816,11 +817,6 @@ "is-number": "^7.0.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -917,7 +913,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "y18n": { "version": "4.0.0", diff --git a/package.json b/package.json index 581243a1..ee044f51 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,13 @@ "license": "MIT", "repository": { "type": "git", - "url": "git://github.com/visionmedia/nib.git" + "url": "git://github.com/stylus/nib.git" }, - "dependencies": { - "stylus": "^0.54.8" + "peerDependencies": { + "stylus": "*" }, "devDependencies": { + "stylus": ">= 0.55.0", "connect": "1.x", "jade": "0.22.0", "mocha": "*", @@ -22,7 +23,7 @@ "node": "*" }, "scripts": { - "test": "mocha", + "test": "mocha test/runner.js", "test-server": "node test/server.js" } } From 7c745dc24139e9515af7b81a0cefe2bf604d4df5 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Wed, 27 Oct 2021 12:34:56 -0500 Subject: [PATCH 253/254] remove incorrect version 1.1.3 and update package-lock --- package-lock.json | 1345 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 1345 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ac7ca38..872d28b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,1351 @@ { "name": "nib", "version": "1.1.2", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "1.1.2", + "license": "MIT", + "devDependencies": { + "connect": "1.x", + "jade": "0.22.0", + "mocha": "*", + "should": "*", + "stylus": ">= 0.55.0" + }, + "engines": { + "node": "*" + }, + "peerDependencies": { + "stylus": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/chokidar": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.2" + } + }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.5.2.tgz", + "integrity": "sha1-8nAyZwmhFaEmz+1WI4UkObjko7U=", + "dev": true, + "engines": { + "node": ">= 0.4.x" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/connect": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-1.9.2.tgz", + "integrity": "sha1-QogKIulDiuWait105Df1iujlKAc=", + "dev": true, + "dependencies": { + "formidable": "1.0.x", + "mime": ">= 0.0.1", + "qs": ">= 0.4.0" + } + }, + "node_modules/css": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.4", + "source-map": "^0.6.1", + "source-map-resolve": "^0.6.0" + } + }, + "node_modules/css/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/formidable": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.16.tgz", + "integrity": "sha1-SRbP38TL7QILJXpqlQWpqzjCzQ4=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/jade": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/jade/-/jade-0.22.0.tgz", + "integrity": "sha1-KxDgxj8N1eTJCcObPt2IAVMwVn0=", + "dev": true, + "dependencies": { + "commander": "0.5.2", + "mkdirp": "0.3.0" + }, + "bin": { + "jade": "bin/jade" + }, + "engines": { + "node": ">= 0.1.98" + } + }, + "node_modules/jade/node_modules/mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mime": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.3", + "debug": "4.2.0", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.2", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 10.12.0" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || >=13.7" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true, + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/stylus": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.55.0.tgz", + "integrity": "sha512-MuzIIVRSbc8XxHH7FjkvWqkIcr1BvoMZoR/oFuAJDlh7VSaNJzrB4uJ38GRQa+mWjLXODAMzeDe0xi9GYbGwnw==", + "dev": true, + "dependencies": { + "css": "^3.0.0", + "debug": "~3.1.0", + "glob": "^7.1.6", + "mkdirp": "~1.0.4", + "safer-buffer": "^2.1.2", + "sax": "~1.2.4", + "semver": "^6.3.0", + "source-map": "^0.7.3" + }, + "bin": { + "stylus": "bin/stylus" + }, + "engines": { + "node": "*" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/workerpool": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", + "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + } + } + }, "dependencies": { "@ungap/promise-all-settled": { "version": "1.1.2", diff --git a/package.json b/package.json index ee044f51..d4ce19da 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nib", "description": "Stylus mixins and utilities", - "version": "1.1.3", + "version": "1.1.2", "license": "MIT", "repository": { "type": "git", From c96c67d3e2a36b2fd58169763143ef76bda4f086 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sat, 30 Oct 2021 21:13:11 -0500 Subject: [PATCH 254/254] rename Readme.md -> README.md --- Readme.md => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Readme.md => README.md (100%) diff --git a/Readme.md b/README.md similarity index 100% rename from Readme.md rename to README.md