diff --git a/README.md b/README.md index 4e3fc6646..f232765d6 100644 --- a/README.md +++ b/README.md @@ -510,6 +510,7 @@ with the following options available: * `'[+-]properties.backgroundSizeMerging'` - turn on / off background-size merging into shorthand * `'[+-]properties.colors'` - turn on / off any color optimizations * `'[+-]properties.ieBangHack'` - turn on / off IE bang hack removal +* `'[+-]properties.ieFilters'` - turn on / off IE `filter` / `-ms-filter` removal * `'[+-]properties.iePrefixHack'` - turn on / off IE prefix hack removal * `'[+-]properties.ieSuffixHack'` - turn on / off IE suffix hack removal * `'[+-]properties.merging'` - turn on / off property merging based on understandability diff --git a/lib/optimizer/level-1/optimize.js b/lib/optimizer/level-1/optimize.js index 989e44306..808e94a6f 100644 --- a/lib/optimizer/level-1/optimize.js +++ b/lib/optimizer/level-1/optimize.js @@ -440,6 +440,10 @@ function optimizeBody(properties, context) { property.unused = true; } + if (!options.compatibility.properties.ieFilters && isLegacyFilter(property)) { + property.unused = true; + } + if (property.unused) { continue; } @@ -511,7 +515,7 @@ function optimizeBody(properties, context) { optimizeBackground(property); } else if (name.indexOf('border') === 0 && name.indexOf('radius') > 0 && levelOptions.optimizeBorderRadius) { optimizeBorderRadius(property); - } else if (name == 'filter'&& levelOptions.optimizeFilter) { + } else if (name == 'filter'&& levelOptions.optimizeFilter && options.compatibility.properties.ieFilters) { optimizeFilter(property); } else if (name == 'font' && levelOptions.optimizeFont) { optimizeFont(property, options); @@ -628,6 +632,20 @@ function isImport(token) { return IMPORT_PREFIX_PATTERN.test(token[1]); } +function isLegacyFilter(property) { + var value; + + if (property.name == 'filter' || property.name == '-ms-filter') { + value = property.value[0][1]; + + return value.indexOf('progid') > -1 || + value.indexOf('alpha') === 0 || + value.indexOf('chroma') === 0; + } else { + return false; + } +} + function level1Optimize(tokens, context) { var options = context.options; var levelOptions = options.level[OptimizationLevel.One]; diff --git a/lib/utils/compatibility.js b/lib/utils/compatibility.js index c714d1d15..0583657b7 100644 --- a/lib/utils/compatibility.js +++ b/lib/utils/compatibility.js @@ -9,6 +9,7 @@ var DEFAULTS = { backgroundSizeMerging: true, // background-size to shorthand colors: true, // any kind of color transformations, like `#ff00ff` to `#f0f` or `#fff` into `red` ieBangHack: false, // !ie suffix hacks on IE<8 + ieFilters: false, // whether to preserve `filter` and `-ms-filter` properties iePrefixHack: false, // underscore / asterisk prefix hacks on IE ieSuffixHack: false, // \9 suffix hacks on IE6-9 merging: true, // merging properties into one @@ -78,6 +79,7 @@ DEFAULTS.ie10 = DEFAULTS['*']; DEFAULTS.ie9 = merge(DEFAULTS['*'], { properties: { + ieFilters: true, ieSuffixHack: true } }); diff --git a/test/fixtures/big-min.css b/test/fixtures/big-min.css index 78dd57a90..aad18a3cf 100644 --- a/test/fixtures/big-min.css +++ b/test/fixtures/big-min.css @@ -4,6 +4,7 @@ body,figure,form,h1,h2,h3,h4,h5,h6,ol,p,ul{margin:0} .lmd-footer #bandeau_bas,[hidden],audio:not([controls]){display:none} .bg_fonce a,.flashy,.lien_focus,a:active,a:focus,a:hover{color:#129af0} .alpha,.ie .une_normale .liste_carre_999.liste_une .ie_impair,.liste_carre_999.liste_une li:nth-child(2n+3){clear:left} +#carousel_footer_serviciel img:hover,.global.audience .container img:hover,.lien_img314x64:hover{opacity:.7} #header,.position_pub:hover{z-index:3} #footer .obf:hover,#footer a:hover,#footer_services .entete .obf:hover,.fleuve .liens .permalien:hover,.lien_chaine a:hover,.lien_chaine span:hover{text-decoration:underline} .bg_fonce a:focus,.bg_fonce a:hover,.conteneur_lives .lives.grand .chrome .live_deplier:hover,.conteneur_lives .lives.grand .chrome .live_fermer:hover,.conteneur_lives .lives.grand .chrome .live_replier:hover,.conteneur_lives .lives.grand .chrome .popup:hover{opacity:1} @@ -253,10 +254,10 @@ section article{margin:0 0 16px} .bloc_abo{border-top:3px solid #ffd500} img[width="312"],img[width="642"]{margin-bottom:6px} img[width="202"]{margin-bottom:4px} -.btn,.btn_abo,.btn_fonce,.btn_petit{display:inline-block;padding:4px 10px;margin-bottom:0;color:#000b15;text-align:center;font-weight:700;vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);border:1px solid #ccc;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);cursor:pointer} +.btn,.btn_abo,.btn_fonce,.btn_petit{display:inline-block;padding:4px 10px;margin-bottom:0;color:#000b15;text-align:center;font-weight:700;vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);cursor:pointer} .bt_fonce a,.btn_abo,.btn_fonce{background-repeat:repeat-x;border-color:rgba(0,0,0,.1)} -.bt_fonce a,.btn_fonce{color:#fff;background-color:#000b15;background-image:-moz-linear-gradient(top,#5d666d,#000b15);background-image:-ms-linear-gradient(top,#5d666d,#000b15);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5d666d),to(#000b15));background-image:-webkit-linear-gradient(top,#5d666d,#000b15);background-image:-o-linear-gradient(top,#5d666d,#000b15);background-image:linear-gradient(top,#5d666d,#000b15);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5d666d', endColorstr='#000b15', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)} -.btn_abo{color:#000b15;background-color:#ffc600;background-image:-moz-linear-gradient(top,#ffe562,#ffc600);background-image:-ms-linear-gradient(top,#ffe562,#ffc600);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ffe562),to(#ffc600));background-image:-webkit-linear-gradient(top,#ffe562,#ffc600);background-image:-o-linear-gradient(top,#ffe562,#ffc600);background-image:linear-gradient(top,#ffe562,#ffc600);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe562', endColorstr='#ffc600', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)} +.bt_fonce a,.btn_fonce{color:#fff;background-color:#000b15;background-image:-moz-linear-gradient(top,#5d666d,#000b15);background-image:-ms-linear-gradient(top,#5d666d,#000b15);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5d666d),to(#000b15));background-image:-webkit-linear-gradient(top,#5d666d,#000b15);background-image:-o-linear-gradient(top,#5d666d,#000b15);background-image:linear-gradient(top,#5d666d,#000b15)} +.btn_abo{color:#000b15;background-color:#ffc600;background-image:-moz-linear-gradient(top,#ffe562,#ffc600);background-image:-ms-linear-gradient(top,#ffe562,#ffc600);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ffe562),to(#ffc600));background-image:-webkit-linear-gradient(top,#ffe562,#ffc600);background-image:-o-linear-gradient(top,#ffe562,#ffc600);background-image:linear-gradient(top,#ffe562,#ffc600)} .az,.titre_bt_fleche .bt{float:right;border-left:1px solid #e4e6e9} .haut_rubrique,.titres_abonnes{border-bottom:6px solid #e9edf0} .btn.large{width:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box} @@ -454,7 +455,6 @@ article .liste_carre_999{margin-top:5px} .deroule_edito .liens_bas{padding:6px 0;color:#d2d6db} .global.audience .container{overflow:hidden;height:176px} .global.audience .container>div{float:left;margin-left:16px} -#carousel_footer_serviciel img:hover,.global.audience .container img:hover{opacity:.7;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"} .global.supp_partenaires .entete_deroule{padding:6px 16px;margin-bottom:0;text-align:left;font-weight:700;font-size:16px;font-family:arial,sans serif} .global.supp_partenaires .entete_deroule .logo{float:right;padding-left:40px;background:url(/medias/web/img/textes/marqueur_pub_gris43x5.png) 0 12px no-repeat} .global.supp_partenaires .position_pub div{float:left;width:301px;padding:16px 12px 16px 16px;line-height:140%} @@ -565,13 +565,12 @@ img[height="97"]+.ico29x29{bottom:6%;left:3.5%} .conteneur_onglets{height:35px;border:solid #d2d6db;border-width:0 0 1px} .conteneur_onglets .onglet{float:left;background:#fff;text-align:center} .conteneur_onglets .onglet.adroite,.pagination .adroite{float:right} -.conteneur_onglets .onglet.courant{margin:0 4px 0 0;border:solid #d2d6db;border-width:1px 1px 0;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;background:#fff;background:-moz-linear-gradient(top,#f1f5f8 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f1f5f8),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#f1f5f8 0,#fff 100%);background:-o-linear-gradient(top,#f1f5f8 0,#fff 100%);background:-ms-linear-gradient(top,#f1f5f8 0,#fff 100%);background:linear-gradient(top,#f1f5f8 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1f5f8', endColorstr='#ffffff', GradientType=0 )} +.conteneur_onglets .onglet.courant{margin:0 4px 0 0;border:solid #d2d6db;border-width:1px 1px 0;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;background:#fff;background:-moz-linear-gradient(top,#f1f5f8 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f1f5f8),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#f1f5f8 0,#fff 100%);background:-o-linear-gradient(top,#f1f5f8 0,#fff 100%);background:-ms-linear-gradient(top,#f1f5f8 0,#fff 100%);background:linear-gradient(top,#f1f5f8 0,#fff 100%)} .conteneur_onglets .onglet .interieur_onglet,.conteneur_onglets .onglet>a,.conteneur_onglets .onglet>span{display:block;height:35px;line-height:36px;padding:0 8px;cursor:pointer} .conteneur_onglets .onglet>a:focus,.conteneur_onglets .onglet>a:hover{cursor:pointer;color:#2e3942} .conteneur_onglets .onglet.desactive>span{cursor:default;color:#b8c0c3} .conteneur_onglets .onglet.courant>a{font-weight:700;color:#2e3942;cursor:default} .lien_img314x64{display:block;width:314px;height:64px;margin-bottom:16px} -.lien_img314x64:hover{opacity:.7;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"} .abonne_cartouche44x12{display:inline-block;width:44px;height:12px;margin:0 0 0 5px;background:url(/medias/web/img/elements_lm/abonne_cartouche44x12.png);text-indent:-9999px;font-size:13px;vertical-align:middle} .ea109x13,.logo_lm95x16,.logo_lm_abo95x16{vertical-align:baseline;display:inline-block;font-size:13px;text-indent:-9999px} .ea109x13{width:109px;height:13px;background:url(/medias/web/img/elements_lm/edition_abonnes109x13.png)} @@ -604,7 +603,7 @@ img[height="97"]+.ico29x29{bottom:6%;left:3.5%} .conteneur_pagination{background:#f8f9fb;font-weight:700;border:1px solid #d2d6db;border-radius:4px;height:26px;margin-top:20px} .pagination_large{margin-top:10px} .pagination .page{border:solid #e4e6e9;border-width:0 0 0 1px} -.conteneur_pagination .next,.conteneur_pagination .prev{display:block;float:left;width:27px;height:26px;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fefefe),color-stop(25%,#fefefe),to(#e4e6e9));background-image:-webkit-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-moz-linear-gradient(left,#fefefe,#fefefe 25%,#e4e6e9);background-image:-ms-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-o-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefefe', endColorstr='#e4e6e9', GradientType=0);text-align:center;line-height:26px;font-size:15px;color:#2e3942} +.conteneur_pagination .next,.conteneur_pagination .prev{display:block;float:left;width:27px;height:26px;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fefefe),color-stop(25%,#fefefe),to(#e4e6e9));background-image:-webkit-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-moz-linear-gradient(left,#fefefe,#fefefe 25%,#e4e6e9);background-image:-ms-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-o-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-repeat:no-repeat;text-align:center;line-height:26px;font-size:15px;color:#2e3942} .conteneur_pagination .next:hover,.conteneur_pagination .prev:hover{color:#2e3942;text-decoration:none;background-color:#e4e6e9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-ms-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear} .conteneur_pagination .prev{border-right:1px solid #d2d6db} .conteneur_pagination .next{border-left:1px solid #d2d6db;float:right} @@ -745,17 +744,17 @@ img[height="97"]+.ico29x29{bottom:6%;left:3.5%} .conteneur_carrousel .repere.actif,.conteneur_carrousel .repere:hover{background-position:-11px -24px;cursor:pointer} .conteneur_carrousel img{display:block;border:0} .portfolio_appel_revolutionnaire .portfolio_data_container h2,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .reperes{display:none} -.portfolio_appel_revolutionnaire .portfolio_data_container{position:absolute;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);color:#fff;text-shadow:0 1px 0 #000;padding:16px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s} -.portfolio_appel_revolutionnaire .elt.shown .portfolio_data_container{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";opacity:.8} +.portfolio_appel_revolutionnaire .portfolio_data_container{position:absolute;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);color:#fff;text-shadow:0 1px 0 #000;padding:16px;opacity:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s} +.portfolio_appel_revolutionnaire .elt.shown .portfolio_data_container{opacity:.8} .portfolio_appel_revolutionnaire .portfolio_data_container .credits{opacity:.5;padding-left:4px} .portfolio_appel_revolutionnaire .carrousel .elt{width:644px;height:322px} -.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant{position:absolute;top:0;left:0;width:165px;height:322px;background:rgba(0,0,0,.6);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"} +.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant{position:absolute;top:0;left:0;width:165px;height:322px;background:rgba(0,0,0,.6)} .portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent:hover,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant:hover{cursor:pointer} -.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent span,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant span{display:block;margin:111px 0 0;text-indent:0;font-size:72px;width:40px;height:100px;line-height:95px;text-align:center;background:#fff;background:-moz-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:-webkit-gradient(linear,left center,right center,color-stop(0,#eee),color-stop(50%,#fff),color-stop(100%,#fff));background:-webkit-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:-o-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:-ms-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:linear-gradient(left,#eee 0,#fff 50%,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );border:solid #ddd;border-width:0 0 0 1px;box-shadow:0 0 1px 1px #000;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";opacity:.2;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s} -.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant span{border-width:0 1px 0 0;margin:111px 0 0 124px;background:-moz-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:-webkit-gradient(linear,left center,right center,color-stop(0,#fff),color-stop(55%,#fff),color-stop(100%,#eee));background:-webkit-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:-o-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:-ms-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:linear-gradient(left,#fff 0,#fff 55%,#eee 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 )} +.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent span,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant span{display:block;margin:111px 0 0;text-indent:0;font-size:72px;width:40px;height:100px;line-height:95px;text-align:center;background:#fff;background:-moz-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:-webkit-gradient(linear,left center,right center,color-stop(0,#eee),color-stop(50%,#fff),color-stop(100%,#fff));background:-webkit-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:-o-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:-ms-linear-gradient(left,#eee 0,#fff 50%,#fff 100%);background:linear-gradient(left,#eee 0,#fff 50%,#fff 100%);border:solid #ddd;border-width:0 0 0 1px;box-shadow:0 0 1px 1px #000;opacity:.2;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s} +.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant span{border-width:0 1px 0 0;margin:111px 0 0 124px;background:-moz-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:-webkit-gradient(linear,left center,right center,color-stop(0,#fff),color-stop(55%,#fff),color-stop(100%,#eee));background:-webkit-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:-o-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:-ms-linear-gradient(left,#fff 0,#fff 55%,#eee 100%);background:linear-gradient(left,#fff 0,#fff 55%,#eee 100%)} #surheader .droit .services>li,#surheader .gauche a,#surheader .gauche span{border-left:1px solid #626a72;border-right:1px solid #16212c} #surheader .droit .services:hover>li>a,#surheader .droit .services>li:hover,.loginbox .login_form,.loginbox .signup{border-right:1px solid #fff} -.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent:hover span,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant:hover span{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";opacity:.9;color:#222} +.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .precedent:hover span,.portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant:hover span{opacity:.9;color:#222} .portfolio_appel_revolutionnaire.conteneur_carrousel .navigation .suivant{left:auto;right:0} .portfolio_appel_revolutionnaire a .legende.bg_fonce{color:#fff} #barre_titre,#header,#nav{position:relative} @@ -764,7 +763,7 @@ img[height="97"]+.ico29x29{bottom:6%;left:3.5%} #header_abonne,#nav,#nav_ariane .ariane.z1{z-index:1} #header a{display:inline-block} .conteneur_haut{width:1000px;margin:0 auto} -#surheader,#surheader .conteneur_haut{background:#1e5799;background:-moz-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#1e5799),color-stop(0,#2d3841),color-stop(100%,#010c16));background:-webkit-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:-o-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:-ms-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#2d3841', endColorstr='#010c16', GradientType=0 );height:25px;line-height:25px} +#surheader,#surheader .conteneur_haut{background:#1e5799;background:-moz-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#1e5799),color-stop(0,#2d3841),color-stop(100%,#010c16));background:-webkit-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:-o-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:-ms-linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);background:linear-gradient(top,#1e5799 0,#2d3841 0,#010c16 100%);height:25px;line-height:25px} #surheader .droit{width:400px;float:right} #surheader .gauche{width:600px;float:left} #surheader a,#surheader span{color:#fff;font-size:11px} @@ -814,7 +813,7 @@ img[height="97"]+.ico29x29{bottom:6%;left:3.5%} #header_abonne .ea109x13{margin:0 14px 0 0} #header .acces_compte{position:relative;float:right} #header .acces_compte:hover{cursor:pointer} -#header .acces_compte .avatar_nom{height:26px;margin:3px 0 0;background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fefefe),color-stop(25%,#fefefe),to(#e4e6e9));background-image:-webkit-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-moz-linear-gradient(top,#fefefe,#fefefe 25%,#e4e6e9);background-image:-ms-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-o-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e4e6e9', GradientType=0);border:1px solid #d2d6db;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px} +#header .acces_compte .avatar_nom{height:26px;margin:3px 0 0;background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fefefe),color-stop(25%,#fefefe),to(#e4e6e9));background-image:-webkit-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-moz-linear-gradient(top,#fefefe,#fefefe 25%,#e4e6e9);background-image:-ms-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-o-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-repeat:no-repeat;border:1px solid #d2d6db;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px} #header .acces_compte .avatar_nom span{display:block;height:26px;line-height:26px;float:left} #header .acces_compte .avatar{width:28px;border-right:1px solid #d2d6db} #header .acces_compte .avatar img{display:block;margin:4px auto 0;vertical-align:middle} @@ -876,7 +875,7 @@ label i{font-style:normal} .ombrelle .widget{display:inline-block;float:right;margin:13px 0 0;line-height:120%} #ariane_az,#nav{margin:0 auto} .ombrelle.style .widget{width:424px;height:64px;background:url(/medias/web/img/textes/widget_style.png);text-indent:-9999px} -.ombrelle.politique .widget:hover,.ombrelle.style .widget:hover{opacity:.7;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"} +.ombrelle.politique .widget:hover,.ombrelle.style .widget:hover{opacity:.7} .ombrelle .autopromo_edito{overflow:hidden;width:314px;height:64px} #ariane_az,#nav,#nav ul{width:1000px} .autopromo_edito img{border:1px solid #eef1f5} @@ -1074,7 +1073,7 @@ label i{font-style:normal} .bloc_part.attractive.temoignage.petit .texte{height:108px} .bloc_part.attractive.text{height:208px} .bloc_part.attractive.format-text .img img{padding:15px 15px 9px} -.services .bloc_part.darqroom.grid_12.promo,.services .bloc_part.gymglish.grid_12{background-color:#e9ecf0;background-image:-moz-linear-gradient(top,#fff,#e9ecf0);background-image:-ms-linear-gradient(top,#fafbfc #e9ecf0);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fafbfc),to(#e9ecf0));background-image:-webkit-linear-gradient(top,#fafbfc,#e9ecf0);background-image:-o-linear-gradient(top,#fafbfc,#e9ecf0);background-image:linear-gradient(top,#fff,#e9ecf0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafbfc', endColorstr='#e9ecf0', GradientType=0)} +.services .bloc_part.darqroom.grid_12.promo,.services .bloc_part.gymglish.grid_12{background-color:#e9ecf0;background-image:-moz-linear-gradient(top,#fff,#e9ecf0);background-image:-ms-linear-gradient(top,#fafbfc #e9ecf0);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fafbfc),to(#e9ecf0));background-image:-webkit-linear-gradient(top,#fafbfc,#e9ecf0);background-image:-o-linear-gradient(top,#fafbfc,#e9ecf0);background-image:linear-gradient(top,#fff,#e9ecf0);background-repeat:repeat-x} .services .bloc_part.gymglish.grid_6{background:0 0} .bloc_part.gymglish .contenu{padding:12px 15px 0;height:182px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;overflow:hidden;clear:both} .bloc_part.gymglish .exercice .texte,.bloc_part.gymglish .mot_mois .texte{width:166px;height:126px;padding:0} @@ -1139,7 +1138,7 @@ label i{font-style:normal} .bloc_part .contenu.carrousel li{overflow:hidden;float:left} .bloc_part .contenu.carrousel_petit li{height:182px;width:312px} .bloc_part .contenu.carrousel_grand li{height:182px;width:642px} -.bloc_part .contenu.carrousel .next,.bloc_part .contenu.carrousel .prev{display:block;width:13px;height:21px;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fefefe),color-stop(25%,#fefefe),to(#e4e6e9));background-image:-webkit-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-moz-linear-gradient(top,#fefefe,#fefefe 25%,#e4e6e9);background-image:-ms-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-o-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefefe', endColorstr='#e4e6e9', GradientType=0);font-size:21px;line-height:15px;color:#2e3942} +.bloc_part .contenu.carrousel .next,.bloc_part .contenu.carrousel .prev{display:block;width:13px;height:21px;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fefefe),color-stop(25%,#fefefe),to(#e4e6e9));background-image:-webkit-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-moz-linear-gradient(top,#fefefe,#fefefe 25%,#e4e6e9);background-image:-ms-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:-o-linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-image:linear-gradient(#fefefe,#fefefe 25%,#e4e6e9);background-repeat:no-repeat;font-size:21px;line-height:15px;color:#2e3942} .bloc_part .contenu.carrousel .next:hover,.bloc_part .contenu.carrousel .prev:hover{color:#2e3942;text-decoration:none;background-color:#e4e6e9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-ms-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear;cursor:pointer} .bloc_part .contenu.carrousel .prev{position:absolute;left:0;top:46%;border:solid #d2d6db;border-width:1px 1px 1px 0;text-align:left;padding-left:7px} .bloc_part .contenu.carrousel .next{border:solid #d2d6db;border-width:1px 0 1px 1px;position:absolute;right:0;top:46%;text-align:right;padding-right:7px} @@ -1245,7 +1244,7 @@ label i{font-style:normal} #bandeau_bas .conteneur_lives .lives{-webkit-box-shadow:-3px 4px 15px 0 rgba(0,11,21,.5);-moz-box-shadow:-3px 4px 15px 0 rgba(0,11,21,.5);box-shadow:-3px 4px 15px 0 rgba(0,11,21,.5)} .conteneur_lives.popuped .lives{position:relative} .conteneur_lives .live{width:328px;right:0;background-color:#f6f6f6} -.conteneur_lives .live .bandeau{height:25px;width:320px;padding-right:8px;overflow:hidden;line-height:23px;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#d20303,#bf0202);background-image:-ms-linear-gradient(top,#d20303,#bf0202);background-image:-webkit-gradient(linear,0 0,0 100%,from(#d20303),to(#bf0202));background-image:-webkit-linear-gradient(top,#d20303,#bf0202);background-image:-o-linear-gradient(top,#d20303,#bf0202);background-image:linear-gradient(top,#d20303,#bf0202);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d20303', endColorstr='#bf0202', GradientType=0)} +.conteneur_lives .live .bandeau{height:25px;width:320px;padding-right:8px;overflow:hidden;line-height:23px;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#d20303,#bf0202);background-image:-ms-linear-gradient(top,#d20303,#bf0202);background-image:-webkit-gradient(linear,0 0,0 100%,from(#d20303),to(#bf0202));background-image:-webkit-linear-gradient(top,#d20303,#bf0202);background-image:-o-linear-gradient(top,#d20303,#bf0202);background-image:linear-gradient(top,#d20303,#bf0202);background-repeat:repeat-x} .conteneur_lives .live.petit .bandeau:hover{background-color:#fe2f2f;background-position:0 -25px;-webkit-transition:background-position 60ms linear;-moz-transition:background-position 60ms linear;-ms-transition:background-position 60ms linear;-o-transition:background-position 60ms linear;transition:background-position 60ms linear;cursor:pointer} .conteneur_lives .live .bandeau .titre{float:left;padding:0 7px;width:220px;font-family:arial,sans-serif;font-size:13px;font-weight:700} .conteneur_lives .lives .chrome .titre{float:left;width:230px;height:25px;overflow:hidden;color:#fff;text-align:left;font-weight:700;font-family:arial,sans-serif;font-size:13px;line-height:25px} @@ -1766,7 +1765,7 @@ form select{padding:1px;height:20px} #core-liberation .form-monlibe input[type=checkbox]{float:right} #core-liberation .w26unit .form-monlibe input[type=password],#core-liberation .w26unit .form-monlibe input[type=text],#core-liberation .w26unit .form-monlibe textarea{width:652px} #core-liberation .w17unit .form-monlibe input[type=password],#core-liberation .w17unit .form-monlibe input[type=text],#core-liberation .w17unit .form-monlibe textarea{width:412px} -body.auth-unlogged #core-liberation .form-monlibe-unlogged form{opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30)} +body.auth-unlogged #core-liberation .form-monlibe-unlogged form{opacity:.3} #core-liberation .form-monlibe .note-unlogged{position:absolute;border:1px solid;top:130px;left:10px;width:420px;padding:10px 10px 12px} #core-liberation .form-monlibe .note-unlogged p{font-size:21px;font-weight:400;line-height:25px} #core-liberation .form-monlibe .note-unlogged p.small{font-family:Verdana,Arial,sans-serif;font-size:12px} diff --git a/test/fixtures/bootstrap-min.css b/test/fixtures/bootstrap-min.css index 84507d8f6..d38d11766 100644 --- a/test/fixtures/bootstrap-min.css +++ b/test/fixtures/bootstrap-min.css @@ -768,7 +768,7 @@ select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-contro .btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px} .btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none} .btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)} -.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65} +.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65} .btn-default{color:#333;border-color:#ccc} .btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad} .btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc} @@ -822,7 +822,7 @@ tbody.collapse.in{display:table-row-group} .dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5} .dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0} .dropdown-header,.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.nav>li.disabled>a{color:#777} -.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)} +.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent} .open>.dropdown-menu{display:block} .open>a{outline:0} .dropdown-menu-right{right:0;left:auto} @@ -1271,11 +1271,11 @@ a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-gro .well blockquote{border-color:rgba(0,0,0,.15)} .well-lg{padding:24px;border-radius:6px} .well-sm{padding:9px;border-radius:3px} -.close{float:right;font-size:21px;font-weight:700;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2} +.close{float:right;font-size:21px;font-weight:700;color:#000;text-shadow:0 1px 0 #fff;opacity:.2} .popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400} .carousel-caption,.carousel-control{text-shadow:0 1px 2px rgba(0,0,0,.6)} -.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5} -.modal-backdrop.fade,.tooltip{filter:alpha(opacity=0);opacity:0} +.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5} +.modal-backdrop.fade,.tooltip{opacity:0} button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0} .modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;-webkit-overflow-scrolling:touch;outline:0} .modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)} @@ -1284,7 +1284,7 @@ button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;bor .modal-dialog{position:relative;width:auto;margin:10px} .modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)} .modal-backdrop{position:absolute;top:0;right:0;left:0;background-color:#000} -.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5} +.modal-backdrop.in{opacity:.5} .modal-header{min-height:16.42857143px;padding:15px;border-bottom:1px solid #e5e5e5} .modal-header .close{margin-top:-2px} .modal-title{margin:0;line-height:1.42857143} @@ -1303,7 +1303,7 @@ button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;bor .modal-lg{width:900px} } .tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible} -.tooltip.in{filter:alpha(opacity=90);opacity:.9} +.tooltip.in{opacity:.9} .tooltip.top{padding:5px 0;margin-top:-3px} .tooltip.right{padding:0 5px} .tooltip.bottom{padding:5px 0;margin-top:3px} @@ -1354,10 +1354,10 @@ button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;bor .carousel-inner>.prev{left:-100%} .carousel-inner>.active.left{left:-100%} .carousel-inner>.active.right{left:100%} -.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;filter:alpha(opacity=50);opacity:.5} -.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x} -.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x} -.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9} +.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;opacity:.5} +.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x} +.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x} +.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;outline:0;opacity:.9} .carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block} .carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px} .carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px} diff --git a/test/integration-test.js b/test/integration-test.js index df1d6415c..40f3a3023 100644 --- a/test/integration-test.js +++ b/test/integration-test.js @@ -942,10 +942,6 @@ vows.describe('integration tests') 'a{ background-color: #aa0000; color:rgb(0, 17, 255)}', 'a{background-color:#a00;color:#01f}' ], - 'skip shortening IE filter colors': [ - 'a{ filter: chroma(color = "#ff0000")}', - 'a{filter:chroma(color="#ff0000")}' - ], 'color names to hex values': [ 'a{color:white;border-color:black;background-color:fuchsia}p{background:yellow}', 'a{color:#fff;border-color:#000;background-color:#f0f}p{background:#ff0}' @@ -1022,18 +1018,6 @@ vows.describe('integration tests') 'a{background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6))}', 'a{background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6))}' ], - 'colors in ie filters': [ - 'a{filter:chroma(color=#ffffff)}', - 'a{filter:chroma(color=#ffffff)}' - ], - 'colors in ie filters 2': [ - 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\')}', - 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\')}' - ], - 'colors in ie filters 3': [ - 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#DDDDDD\', endColorstr=\'#333333\')}', - 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#DDDDDD\', endColorstr=\'#333333\')}' - ], 'rgb percents': [ 'a{color:rgb(100%,0%,0%)}', 'a{color:rgb(100%,0%,0%)}' @@ -1760,8 +1744,24 @@ vows.describe('integration tests') 'AlphaImageLoader': [ 'div{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/skyline.jpg)}', 'div{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/skyline.jpg)}' + ], + 'colors #1': [ + 'a{filter:chroma(color=#ffffff)}', + 'a{filter:chroma(color=#ffffff)}' + ], + 'colors #2': [ + 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\')}', + 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\')}' + ], + 'colors #3': [ + 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#DDDDDD\', endColorstr=\'#333333\')}', + 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#DDDDDD\', endColorstr=\'#333333\')}' + ], + 'whitespace': [ + 'a{ filter: chroma(color = "#ff0000")}', + 'a{filter:chroma(color="#ff0000")}' ] - }) + }, { compatibility: 'ie9' }) ) .addBatch( optimizerContext('charsets', { diff --git a/test/optimizer/level-1/optimize-test.js b/test/optimizer/level-1/optimize-test.js index fdf70b147..981530bb1 100644 --- a/test/optimizer/level-1/optimize-test.js +++ b/test/optimizer/level-1/optimize-test.js @@ -365,6 +365,30 @@ vows.describe('level 1 optimizations') ) .addBatch( optimizerContext('filter', { + 'legacy standard': [ + 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\',endColorstr=\'#000000\', enabled=true)}', + '' + ], + 'legacy alpha shorthand': [ + 'a{filter:alpha(Opacity=80)}', + '' + ], + 'legacy chroma shorthand': [ + 'a{filter:chroma(color=#919191)}', + '' + ], + 'legacy -ms-filter': [ + 'a{-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\',endColorstr=\'#000000\', enabled=true);-ms-filter:chroma(color=#000000)}', + '' + ], + 'new filters': [ + '.block{filter:sepia(60%)}', + '.block{filter:sepia(60%)}' + ] + }, { level: 1 }) + ) + .addBatch( + optimizerContext('filter when preserved', { 'spaces after comma': [ 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\',endColorstr=\'#000000\', enabled=true)}', 'a{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\', enabled=true)}' @@ -381,7 +405,7 @@ vows.describe('level 1 optimizations') 'a{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80) progid:DXImageTransform.Microsoft.Chroma(color=#919191)}', 'a{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80) progid:DXImageTransform.Microsoft.Chroma(color=#919191)}' ] - }, { level: 1 }) + }, { compatibility: 'ie9', level: 1 }) ) .addBatch( optimizerContext('font', { @@ -1089,7 +1113,7 @@ vows.describe('level 1 optimizations') '.block{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80)}', '.block{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80)}' ] - }, { level: { 1: { optimizeFilter: false } } }) + }, { compatibility: 'ie9', level: { 1: { optimizeFilter: false } } }) ) .addBatch( optimizerContext('font optimizations off', { diff --git a/test/utils/compatibility-test.js b/test/utils/compatibility-test.js index ed25cf162..362d9efc8 100644 --- a/test/utils/compatibility-test.js +++ b/test/utils/compatibility-test.js @@ -15,6 +15,7 @@ vows.describe(compatibility) assert.isTrue(compat.properties.backgroundOriginMerging); assert.isTrue(compat.properties.backgroundSizeMerging); assert.isFalse(compat.properties.ieBangHack); + assert.isFalse(compat.properties.ieFilters); assert.isFalse(compat.properties.iePrefixHack); assert.isFalse(compat.properties.ieSuffixHack); assert.isTrue(compat.properties.merging); @@ -55,6 +56,7 @@ vows.describe(compatibility) assert.isTrue(compat.properties.backgroundSizeMerging); assert.isTrue(compat.properties.colors); assert.isFalse(compat.properties.ieBangHack); + assert.isFalse(compat.properties.ieFilters); assert.isFalse(compat.properties.iePrefixHack); assert.isFalse(compat.properties.ieSuffixHack); assert.isTrue(compat.properties.merging); @@ -88,6 +90,7 @@ vows.describe(compatibility) assert.isTrue(compat.properties.backgroundSizeMerging); assert.isTrue(compat.properties.colors); assert.isFalse(compat.properties.ieBangHack); + assert.isTrue(compat.properties.ieFilters); assert.isFalse(compat.properties.iePrefixHack); assert.isTrue(compat.properties.ieSuffixHack); assert.isTrue(compat.properties.merging); @@ -120,6 +123,7 @@ vows.describe(compatibility) assert.isFalse(compat.properties.backgroundSizeMerging); assert.isTrue(compat.properties.colors); assert.isFalse(compat.properties.ieBangHack); + assert.isTrue(compat.properties.ieFilters); assert.isTrue(compat.properties.iePrefixHack); assert.isTrue(compat.properties.ieSuffixHack); assert.isFalse(compat.properties.merging); @@ -152,6 +156,7 @@ vows.describe(compatibility) assert.isFalse(compat.properties.backgroundSizeMerging); assert.isTrue(compat.properties.colors); assert.isTrue(compat.properties.ieBangHack); + assert.isTrue(compat.properties.ieFilters); assert.isTrue(compat.properties.iePrefixHack); assert.isTrue(compat.properties.ieSuffixHack); assert.isFalse(compat.properties.merging); @@ -194,6 +199,7 @@ vows.describe(compatibility) assert.isFalse(compat.properties.backgroundSizeMerging); assert.isTrue(compat.properties.colors); assert.isFalse(compat.properties.ieBangHack); + assert.isTrue(compat.properties.ieFilters); assert.isFalse(compat.properties.iePrefixHack); assert.isTrue(compat.properties.ieSuffixHack); assert.isFalse(compat.properties.merging); @@ -226,6 +232,7 @@ vows.describe(compatibility) assert.isTrue(compat.properties.backgroundOriginMerging); assert.isTrue(compat.properties.backgroundSizeMerging); assert.isFalse(compat.properties.ieBangHack); + assert.isFalse(compat.properties.ieFilters); assert.isTrue(compat.properties.iePrefixHack); assert.isFalse(compat.properties.ieSuffixHack); assert.isTrue(compat.properties.merging); @@ -258,6 +265,7 @@ vows.describe(compatibility) assert.isTrue(compat.properties.backgroundOriginMerging); assert.isTrue(compat.properties.backgroundSizeMerging); assert.isFalse(compat.properties.ieBangHack); + assert.isFalse(compat.properties.ieFilters); assert.isTrue(compat.properties.iePrefixHack); assert.isFalse(compat.properties.ieSuffixHack); assert.isTrue(compat.properties.merging);