Skip to content

Commit

Permalink
Final fixes for 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas C. Zakas committed Jun 26, 2011
1 parent ed86653 commit 83ed025
Show file tree
Hide file tree
Showing 19 changed files with 54,248 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Next (not yet released)
* n/a

June 25, 2011 - v0.3.0

* Rhino and Node CLIs both exit with code 1 when there are errors (pull #72)
* Changed description of adjoining classes to be unsupported in IE6 (fixes #11)
Expand All @@ -11,6 +14,8 @@ Next (not yet released)
* border:none with width/height is okay (fixes #45)
* Updated web worker to accept JSON-encoded input
* Allow turning on/off rules in web interface and CLIs (fixes #77)
* Introduced release directory that will hold official release version
* Build directory will be removed in next release

June 18, 2011 - v0.2.0

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Even though you can define any group of properties together in a CSS rule, some

Removed the ignored or problematic properties decreases file size and improves performance.

### Avoid using to many !important declarations
### Avoid using too many !important declarations

Using `!important` overides any cascaded rule and may lead to specificity war. CSSLint checks if you've used `!important`, and if so, displays a warning. If there's at least 10 `!important` declaration in your code CSSLint displays an error.

Expand Down Expand Up @@ -103,6 +103,10 @@ CSS3 adds complex attribute selectors such as `~=` that are slow. When using att

Borders and padding add space outside of an element's content. Setting `width` or `height` along with borders and padding is usually a mistake because you won't get the visual result you're looking for. CSSLint warns when a rule uses `width` or `height` in addition to padding and/or border.

### Avoid @import

The `@import` command shouldn't be used because it prevent parallel downloads in some browsers (see http://www.stevesouders.com/blog/2009/04/09/dont-use-import/).

## Contributors

### Creators
Expand Down
10 changes: 8 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project name="csslint" default="all">

<!-- version number -->
<property name="csslint.version" value="0.2.0" />
<property name="csslint.version" value="0.3.0" />

<!-- the directories containing the source files -->
<property name="src.dir" value="./src" />
Expand All @@ -10,6 +10,7 @@

<!-- the directories and files to output to -->
<property name="build.dir" value="./build" />
<property name="release.dir" value="./release" />
<property name="build.npm.dir" value="${build.dir}/npm" />

<!-- the directory containing library files -->
Expand All @@ -34,6 +35,7 @@
<!-- clean -->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${release.dir}" />
</target>

<!-- build the core library -->
Expand Down Expand Up @@ -120,8 +122,12 @@

<!-- Update version number in files -->
<target name="release" depends="all">
<mkdir dir="${release.dir}"/>
<copy todir="${release.dir}">
<fileset dir="${build.dir}" includes="**/*" />
</copy>
<replaceregexp match="@VERSION@" replace="${csslint.version}" flags="g" byline="true">
<fileset dir="${build.dir}" includes="**/*.js"/>
<fileset dir="${release.dir}" includes="**/*"/>
</replaceregexp>
</target>

Expand Down
34 changes: 33 additions & 1 deletion build/csslint-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 23-June-2011 03:44:41 */
/* Build time: 25-June-2011 07:20:29 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
Expand Down Expand Up @@ -10292,6 +10292,38 @@ CSSLint.addRule({
}

});
/*
* Rule: Don't use text-indent for image replacement if you need to support rtl.
*
*/
/*
* Should we be checking for rtl/ltr?
*/
//Commented out due to lack of tests
/*CSSLint.addRule({
//rule information
id: "text-indent",
name: "Text Indent",
desc: "Checks for text indent less than -99px",
browsers: "All",
//initialization
init: function(parser, reporter){
var rule = this;
//check for use of "font-size"
parser.addListener("property", function(event){
var name = event.property,
value = event.value;
if (name == "text-indent" && value < -99){
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
}
});
}
});*/
/*
* Rule: Headings (h1-h6) should be defined only once.
*/
Expand Down
34 changes: 33 additions & 1 deletion build/csslint-rhino.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 23-June-2011 03:44:41 */
/* Build time: 25-June-2011 07:20:29 */
var CSSLint = (function(){
/*!
Parser-Lib
Expand Down Expand Up @@ -10293,6 +10293,38 @@ CSSLint.addRule({
}

});
/*
* Rule: Don't use text-indent for image replacement if you need to support rtl.
*
*/
/*
* Should we be checking for rtl/ltr?
*/
//Commented out due to lack of tests
/*CSSLint.addRule({
//rule information
id: "text-indent",
name: "Text Indent",
desc: "Checks for text indent less than -99px",
browsers: "All",
//initialization
init: function(parser, reporter){
var rule = this;
//check for use of "font-size"
parser.addListener("property", function(event){
var name = event.property,
value = event.value;
if (name == "text-indent" && value < -99){
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
}
});
}
});*/
/*
* Rule: Headings (h1-h6) should be defined only once.
*/
Expand Down
34 changes: 33 additions & 1 deletion build/csslint-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 23-June-2011 03:44:41 */
/* Build time: 25-June-2011 07:20:29 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
Expand Down Expand Up @@ -10292,6 +10292,38 @@ CSSLint.addRule({
}

});
/*
* Rule: Don't use text-indent for image replacement if you need to support rtl.
*
*/
/*
* Should we be checking for rtl/ltr?
*/
//Commented out due to lack of tests
/*CSSLint.addRule({
//rule information
id: "text-indent",
name: "Text Indent",
desc: "Checks for text indent less than -99px",
browsers: "All",
//initialization
init: function(parser, reporter){
var rule = this;
//check for use of "font-size"
parser.addListener("property", function(event){
var name = event.property,
value = event.value;
if (name == "text-indent" && value < -99){
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
}
});
}
});*/
/*
* Rule: Headings (h1-h6) should be defined only once.
*/
Expand Down
34 changes: 33 additions & 1 deletion build/csslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 23-June-2011 03:44:41 */
/* Build time: 25-June-2011 07:20:29 */
var CSSLint = (function(){
/*!
Parser-Lib
Expand Down Expand Up @@ -10293,6 +10293,38 @@ CSSLint.addRule({
}

});
/*
* Rule: Don't use text-indent for image replacement if you need to support rtl.
*
*/
/*
* Should we be checking for rtl/ltr?
*/
//Commented out due to lack of tests
/*CSSLint.addRule({
//rule information
id: "text-indent",
name: "Text Indent",
desc: "Checks for text indent less than -99px",
browsers: "All",
//initialization
init: function(parser, reporter){
var rule = this;
//check for use of "font-size"
parser.addListener("property", function(event){
var name = event.property,
value = event.value;
if (name == "text-indent" && value < -99){
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
}
});
}
});*/
/*
* Rule: Headings (h1-h6) should be defined only once.
*/
Expand Down
34 changes: 33 additions & 1 deletion build/npm/lib/csslint-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 23-June-2011 03:44:41 */
/* Build time: 25-June-2011 07:20:29 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
Expand Down Expand Up @@ -10292,6 +10292,38 @@ CSSLint.addRule({
}

});
/*
* Rule: Don't use text-indent for image replacement if you need to support rtl.
*
*/
/*
* Should we be checking for rtl/ltr?
*/
//Commented out due to lack of tests
/*CSSLint.addRule({
//rule information
id: "text-indent",
name: "Text Indent",
desc: "Checks for text indent less than -99px",
browsers: "All",
//initialization
init: function(parser, reporter){
var rule = this;
//check for use of "font-size"
parser.addListener("property", function(event){
var name = event.property,
value = event.value;
if (name == "text-indent" && value < -99){
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
}
});
}
});*/
/*
* Rule: Headings (h1-h6) should be defined only once.
*/
Expand Down
Loading

0 comments on commit 83ed025

Please sign in to comment.