From 57960a73bd168d9fbf2b5d21600f0f80efc34776 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 5 Jun 2013 13:00:42 +0200 Subject: [PATCH] Add .csslintrc file and fix remaining warnings Adding a fairly loose .csslintrc file so that our code passes it. The following options cause warnings in our code and have been disabled for now: * adjoining-classes > Don't use adjoining classes. > .ve-ui-widget-disabled.ve-ui-textInputWidget textarea:focus { * box-sizing > The box-sizing property isn't supported in IE6 and IE7. > box-sizing: border-box; * box-model > Using width with border can sometimes make elements larger than you expect. > border: solid 1px #ccc; > Using width with padding can sometimes make elements larger than you expect. > padding: 0 0.75em 0 0.75em; > Using width with border-right can sometimes make elements larger than you expect. > border-right: 1px solid #eee; * fallback-colors > Fallback background-color (hex or RGB) should precede RGBA background-color. > background-color: rgba(104,171,255,0.1); * important > Use of !important > position: relative !important; * outline-none > Outlines shouldn't be hidden unless other visual changes are made. > .ve-ce-documentNode[contenteditable="true"]:focus { * qualified-headings > Heading (h1) should not be qualified. > .ve-ce-branchNode h1:empty:before, * universal-selector > The universal selector (*) is known to be slow. > .ve-ce-protectedNode * { * unqualified-attributes > Unqualified attribute selectors are known to be slow. > .ve-ce-documentNode[contenteditable="true"]:focus { Fixes made: * modules/ve/ce/styles/ve.ce.Surface.css: [L66:C2] margin can't be used with display: inline. * modules/ve/ui/styles/ve.ui.css: Unknown @ rule: @-ms-keyframes Internet Explorer < 10 doesn't support keyframes. IE10+ supports the standard property. I don't think ms-keyframes ever existed http://caniuse.com/css-animation. ms-transform did exist http://caniuse.com/transform. Change-Id: I728a48e489c079e1c94a506bb00c245de9551eb6 --- .csslintrc | 11 +++++++++++ modules/ve/ce/styles/ve.ce.Surface.css | 7 ++++--- modules/ve/ui/styles/ve.ui.css | 12 ++---------- 3 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 .csslintrc diff --git a/.csslintrc b/.csslintrc new file mode 100644 index 0000000000..e777c7f313 --- /dev/null +++ b/.csslintrc @@ -0,0 +1,11 @@ +{ + "adjoining-classes": false, + "box-model": false, + "box-sizing": false, + "fallback-colors": false, + "important": false, + "outline-none": false, + "qualified-headings": false, + "universal-selector": false, + "unqualified-attributes": false +} diff --git a/modules/ve/ce/styles/ve.ce.Surface.css b/modules/ve/ce/styles/ve.ce.Surface.css index c97d2ff981..1324d2b085 100644 --- a/modules/ve/ce/styles/ve.ce.Surface.css +++ b/modules/ve/ce/styles/ve.ce.Surface.css @@ -60,14 +60,15 @@ } /* MediaWiki PHP Parser does not wrap text inside image captions in

but we do (cause we have to). - * Let's make those

looks like they are not there by proper CSS styling. */ + * Let's make those

looks like they are not there by proper CSS styling. + */ +/*csslint overqualified-elements:false */ .ve-ce-surface .thumbcaption p.ve-ce-generated-wrapper { display: inline; - margin: 0; padding: 0; line-height: inherit; } .ve-ce-surface .thumbcaption .ve-ce-branchNode-slug { display: none; -} \ No newline at end of file +} diff --git a/modules/ve/ui/styles/ve.ui.css b/modules/ve/ui/styles/ve.ui.css index 4493c8bcf4..c35a44dd48 100644 --- a/modules/ve/ui/styles/ve.ui.css +++ b/modules/ve/ui/styles/ve.ui.css @@ -5,6 +5,8 @@ * @license The MIT License (MIT); see LICENSE.txt */ +/*csslint vendor-prefix:false */ + @-webkit-keyframes ve-ui-zoom-in { from { -webkit-transform: scale(0.5); } to { -webkit-transform: scale(1); } @@ -15,11 +17,6 @@ to { -moz-transform: scale(1); } } -@-ms-keyframes ve-ui-zoom-in { - from { -ms-transform: scale(0.5); } - to { -ms-transform: scale(1); } -} - @-o-keyframes ve-ui-zoom-in { from { -o-transform: scale(0.5); } to { -o-transform: scale(1); } @@ -40,11 +37,6 @@ to { opacity: 1; } } -@-ms-keyframes ve-ui-fade-in { - from { opacity: 0; } - to { opacity: 1; } -} - @-o-keyframes ve-ui-fade-in { from { opacity: 0; } to { opacity: 1; }