1
1
/*!
2
- CSSLint v1.0.3
2
+ CSSLint v1.0.4
3
3
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -48,7 +48,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48
48
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
49
49
THE SOFTWARE.
50
50
*/
51
- /* Version v1.0 .0, Build time: 15-July -2016 12:36:10 */
51
+ /* Version v1.1 .0, Build time: 6-December -2016 10:31:29 */
52
52
var parserlib = ( function ( ) {
53
53
var require ;
54
54
require = ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; var f = new Error ( "Cannot find module '" + o + "'" ) ; throw f . code = "MODULE_NOT_FOUND" , f } var l = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( l . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , l , l . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 :[ function ( require , module , exports ) {
@@ -1266,6 +1266,8 @@ Parser.prototype = function() {
1266
1266
this . _document ( ) ;
1267
1267
} else if ( tokenStream . peek ( ) === Tokens . SUPPORTS_SYM ) {
1268
1268
this . _supports ( ) ;
1269
+ } else if ( tokenStream . peek ( ) === Tokens . MEDIA_SYM ) {
1270
+ this . _media ( ) ;
1269
1271
} else if ( ! this . _ruleset ( ) ) {
1270
1272
break ;
1271
1273
}
@@ -3300,6 +3302,7 @@ var Properties = module.exports = {
3300
3302
"align-items" : "flex-start | flex-end | center | baseline | stretch" ,
3301
3303
"align-content" : "flex-start | flex-end | center | space-between | space-around | stretch" ,
3302
3304
"align-self" : "auto | flex-start | flex-end | center | baseline | stretch" ,
3305
+ "all" : "initial | inherit | unset" ,
3303
3306
"-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch" ,
3304
3307
"-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch" ,
3305
3308
"-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch" ,
@@ -3345,7 +3348,12 @@ var Properties = module.exports = {
3345
3348
"-o-animation-name" : "[ none | <single-animation-name> ]#" ,
3346
3349
"-o-animation-play-state" : "[ running | paused ]#" ,
3347
3350
3348
- "appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | none" ,
3351
+ "appearance" : "none | auto" ,
3352
+ "-moz-appearance" : "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized" ,
3353
+ "-ms-appearance" : "none | icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal" ,
3354
+ "-webkit-appearance" : "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox | listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical" ,
3355
+ "-o-appearance" : "none | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal" ,
3356
+
3349
3357
"azimuth" : "<azimuth>" ,
3350
3358
3351
3359
//B
@@ -3716,7 +3724,10 @@ var Properties = module.exports = {
3716
3724
"text-align" : "left | right | center | justify | match-parent | start | end" ,
3717
3725
"text-align-last" : 1 ,
3718
3726
"text-anchor" : "start | middle | end" ,
3719
- "text-decoration" : "<text-decoration>" ,
3727
+ "text-decoration" : "<text-decoration-line> || <text-decoration-style> || <text-decoration-color>" ,
3728
+ "text-decoration-color" : "<text-decoration-color>" ,
3729
+ "text-decoration-line" : "<text-decoration-line>" ,
3730
+ "text-decoration-style" : "<text-decoration-style>" ,
3720
3731
"text-emphasis" : 1 ,
3721
3732
"text-height" : 1 ,
3722
3733
"text-indent" : "<length> | <percentage>" ,
@@ -4059,6 +4070,7 @@ function PropertyValuePart(text, line, col, optionalHint) {
4059
4070
case "deg" :
4060
4071
case "rad" :
4061
4072
case "grad" :
4073
+ case "turn" :
4062
4074
this . type = "angle" ;
4063
4075
break ;
4064
4076
@@ -5190,7 +5202,7 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
5190
5202
5191
5203
if ( / ^ e m $ | ^ e x $ | ^ p x $ | ^ g d $ | ^ r e m $ | ^ v w $ | ^ v h $ | ^ v m a x $ | ^ v m i n $ | ^ c h $ | ^ c m $ | ^ m m $ | ^ i n $ | ^ p t $ | ^ p c $ / i. test ( ident ) ) {
5192
5204
tt = Tokens . LENGTH ;
5193
- } else if ( / ^ d e g | ^ r a d $ | ^ g r a d $ / i. test ( ident ) ) {
5205
+ } else if ( / ^ d e g | ^ r a d $ | ^ g r a d $ | ^ t u r n $ / i. test ( ident ) ) {
5194
5206
tt = Tokens . ANGLE ;
5195
5207
} else if ( / ^ m s $ | ^ s $ / i. test ( ident ) ) {
5196
5208
tt = Tokens . TIME ;
@@ -5575,7 +5587,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
5575
5587
}
5576
5588
} ) ;
5577
5589
5578
-
5579
5590
} , { "../util/TokenStreamBase" :27 , "./PropertyValuePart" :11 , "./Tokens" :18 } ] , 18 :[ function ( require , module , exports ) {
5580
5591
"use strict" ;
5581
5592
@@ -6333,9 +6344,15 @@ copy(ValidationTypes, {
6333
6344
Matcher . many ( [ true /* length is required */ ] ,
6334
6345
Matcher . cast ( "<length>" ) . braces ( 2 , 4 ) , "inset" , "<color>" ) ,
6335
6346
6336
- "<text-decoration>" :
6347
+ "<text-decoration-color>" :
6348
+ "<color>" ,
6349
+
6350
+ "<text-decoration-line>" :
6337
6351
"none | [ underline || overline || line-through || blink ]" ,
6338
6352
6353
+ "<text-decoration-style>" :
6354
+ "solid | double | dotted | dashed | wavy" ,
6355
+
6339
6356
"<will-change>" :
6340
6357
"auto | <animateable-feature>#" ,
6341
6358
@@ -7315,6 +7332,29 @@ return require('parserlib');
7315
7332
var clone = ( function ( ) {
7316
7333
'use strict' ;
7317
7334
7335
+ var nativeMap ;
7336
+ try {
7337
+ nativeMap = Map ;
7338
+ } catch ( _ ) {
7339
+ // maybe a reference error because no `Map`. Give it a dummy value that no
7340
+ // value will ever be an instanceof.
7341
+ nativeMap = function ( ) { } ;
7342
+ }
7343
+
7344
+ var nativeSet ;
7345
+ try {
7346
+ nativeSet = Set ;
7347
+ } catch ( _ ) {
7348
+ nativeSet = function ( ) { } ;
7349
+ }
7350
+
7351
+ var nativePromise ;
7352
+ try {
7353
+ nativePromise = Promise ;
7354
+ } catch ( _ ) {
7355
+ nativePromise = function ( ) { } ;
7356
+ }
7357
+
7318
7358
/**
7319
7359
* Clones (copies) an Object using deep copying.
7320
7360
*
@@ -7332,14 +7372,16 @@ var clone = (function() {
7332
7372
* a particular depth. (optional - defaults to Infinity)
7333
7373
* @param `prototype` - sets the prototype to be used when cloning an object.
7334
7374
* (optional - defaults to parent prototype).
7375
+ * @param `includeNonEnumerable` - set to true if the non-enumerable properties
7376
+ * should be cloned as well. Non-enumerable properties on the prototype
7377
+ * chain will be ignored. (optional - false by default)
7335
7378
*/
7336
- function clone ( parent , circular , depth , prototype ) {
7337
- var filter ;
7379
+ function clone ( parent , circular , depth , prototype , includeNonEnumerable ) {
7338
7380
if ( typeof circular === 'object' ) {
7339
7381
depth = circular . depth ;
7340
7382
prototype = circular . prototype ;
7341
- filter = circular . filter ;
7342
- circular = circular . circular
7383
+ includeNonEnumerable = circular . includeNonEnumerable ;
7384
+ circular = circular . circular ;
7343
7385
}
7344
7386
// maintain two arrays for circular references, where corresponding parents
7345
7387
// and children have the same index
@@ -7360,7 +7402,7 @@ function clone(parent, circular, depth, prototype) {
7360
7402
if ( parent === null )
7361
7403
return null ;
7362
7404
7363
- if ( depth == 0 )
7405
+ if ( depth === 0 )
7364
7406
return parent ;
7365
7407
7366
7408
var child ;
@@ -7369,7 +7411,19 @@ function clone(parent, circular, depth, prototype) {
7369
7411
return parent ;
7370
7412
}
7371
7413
7372
- if ( clone . __isArray ( parent ) ) {
7414
+ if ( parent instanceof nativeMap ) {
7415
+ child = new nativeMap ( ) ;
7416
+ } else if ( parent instanceof nativeSet ) {
7417
+ child = new nativeSet ( ) ;
7418
+ } else if ( parent instanceof nativePromise ) {
7419
+ child = new nativePromise ( function ( resolve , reject ) {
7420
+ parent . then ( function ( value ) {
7421
+ resolve ( _clone ( value , depth - 1 ) ) ;
7422
+ } , function ( err ) {
7423
+ reject ( _clone ( err , depth - 1 ) ) ;
7424
+ } ) ;
7425
+ } ) ;
7426
+ } else if ( clone . __isArray ( parent ) ) {
7373
7427
child = [ ] ;
7374
7428
} else if ( clone . __isRegExp ( parent ) ) {
7375
7429
child = new RegExp ( parent . source , __getRegExpFlags ( parent ) ) ;
@@ -7380,6 +7434,8 @@ function clone(parent, circular, depth, prototype) {
7380
7434
child = new Buffer ( parent . length ) ;
7381
7435
parent . copy ( child ) ;
7382
7436
return child ;
7437
+ } else if ( parent instanceof Error ) {
7438
+ child = Object . create ( parent ) ;
7383
7439
} else {
7384
7440
if ( typeof prototype == 'undefined' ) {
7385
7441
proto = Object . getPrototypeOf ( parent ) ;
@@ -7401,6 +7457,30 @@ function clone(parent, circular, depth, prototype) {
7401
7457
allChildren . push ( child ) ;
7402
7458
}
7403
7459
7460
+ if ( parent instanceof nativeMap ) {
7461
+ var keyIterator = parent . keys ( ) ;
7462
+ while ( true ) {
7463
+ var next = keyIterator . next ( ) ;
7464
+ if ( next . done ) {
7465
+ break ;
7466
+ }
7467
+ var keyChild = _clone ( next . value , depth - 1 ) ;
7468
+ var valueChild = _clone ( parent . get ( next . value ) , depth - 1 ) ;
7469
+ child . set ( keyChild , valueChild ) ;
7470
+ }
7471
+ }
7472
+ if ( parent instanceof nativeSet ) {
7473
+ var iterator = parent . keys ( ) ;
7474
+ while ( true ) {
7475
+ var next = iterator . next ( ) ;
7476
+ if ( next . done ) {
7477
+ break ;
7478
+ }
7479
+ var entryChild = _clone ( next . value , depth - 1 ) ;
7480
+ child . add ( entryChild ) ;
7481
+ }
7482
+ }
7483
+
7404
7484
for ( var i in parent ) {
7405
7485
var attrs ;
7406
7486
if ( proto ) {
@@ -7413,6 +7493,40 @@ function clone(parent, circular, depth, prototype) {
7413
7493
child [ i ] = _clone ( parent [ i ] , depth - 1 ) ;
7414
7494
}
7415
7495
7496
+ if ( Object . getOwnPropertySymbols ) {
7497
+ var symbols = Object . getOwnPropertySymbols ( parent ) ;
7498
+ for ( var i = 0 ; i < symbols . length ; i ++ ) {
7499
+ // Don't need to worry about cloning a symbol because it is a primitive,
7500
+ // like a number or string.
7501
+ var symbol = symbols [ i ] ;
7502
+ var descriptor = Object . getOwnPropertyDescriptor ( parent , symbol ) ;
7503
+ if ( descriptor && ! descriptor . enumerable && ! includeNonEnumerable ) {
7504
+ continue ;
7505
+ }
7506
+ child [ symbol ] = _clone ( parent [ symbol ] , depth - 1 ) ;
7507
+ if ( ! descriptor . enumerable ) {
7508
+ Object . defineProperty ( child , symbol , {
7509
+ enumerable : false
7510
+ } ) ;
7511
+ }
7512
+ }
7513
+ }
7514
+
7515
+ if ( includeNonEnumerable ) {
7516
+ var allPropertyNames = Object . getOwnPropertyNames ( parent ) ;
7517
+ for ( var i = 0 ; i < allPropertyNames . length ; i ++ ) {
7518
+ var propertyName = allPropertyNames [ i ] ;
7519
+ var descriptor = Object . getOwnPropertyDescriptor ( parent , propertyName ) ;
7520
+ if ( descriptor && descriptor . enumerable ) {
7521
+ continue ;
7522
+ }
7523
+ child [ propertyName ] = _clone ( parent [ propertyName ] , depth - 1 ) ;
7524
+ Object . defineProperty ( child , propertyName , {
7525
+ enumerable : false
7526
+ } ) ;
7527
+ }
7528
+ }
7529
+
7416
7530
return child ;
7417
7531
}
7418
7532
@@ -7439,22 +7553,22 @@ clone.clonePrototype = function clonePrototype(parent) {
7439
7553
7440
7554
function __objToStr ( o ) {
7441
7555
return Object . prototype . toString . call ( o ) ;
7442
- } ;
7556
+ }
7443
7557
clone . __objToStr = __objToStr ;
7444
7558
7445
7559
function __isDate ( o ) {
7446
7560
return typeof o === 'object' && __objToStr ( o ) === '[object Date]' ;
7447
- } ;
7561
+ }
7448
7562
clone . __isDate = __isDate ;
7449
7563
7450
7564
function __isArray ( o ) {
7451
7565
return typeof o === 'object' && __objToStr ( o ) === '[object Array]' ;
7452
- } ;
7566
+ }
7453
7567
clone . __isArray = __isArray ;
7454
7568
7455
7569
function __isRegExp ( o ) {
7456
7570
return typeof o === 'object' && __objToStr ( o ) === '[object RegExp]' ;
7457
- } ;
7571
+ }
7458
7572
clone . __isRegExp = __isRegExp ;
7459
7573
7460
7574
function __getRegExpFlags ( re ) {
@@ -7463,7 +7577,7 @@ function __getRegExpFlags(re) {
7463
7577
if ( re . ignoreCase ) flags += 'i' ;
7464
7578
if ( re . multiline ) flags += 'm' ;
7465
7579
return flags ;
7466
- } ;
7580
+ }
7467
7581
clone . __getRegExpFlags = __getRegExpFlags ;
7468
7582
7469
7583
return clone ;
@@ -7491,7 +7605,7 @@ var CSSLint = (function() {
7491
7605
embeddedRuleset = / \/ \* \s * c s s l i n t ( [ ^ \* ] * ) \* \/ / ,
7492
7606
api = new parserlib . util . EventTarget ( ) ;
7493
7607
7494
- api . version = "1.0.3 " ;
7608
+ api . version = "1.0.4 " ;
7495
7609
7496
7610
//-------------------------------------------------------------------------
7497
7611
// Rule Management
0 commit comments