Skip to content

Commit

Permalink
Official release
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Jan 17, 2013
1 parent 8be1864 commit fba219c
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 23 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
January 17, 2013 - v0.2.2

* Merge pull request #57 from nschonni/allow-device-pixel-ratio-gh-23 (Nicholas C. Zakas)
* Merge pull request #56 from nschonni/appearance-none (Nicholas C. Zakas)
* Allow pixel ratios in media queries (Nick Schonning)
* Add none to appearance values (Nick Schonning)
* Merge pull request #43 from nschonni/display-moz-inline-stack (Nicholas C. Zakas)
* Add -moz display properties (Nick Schonning)
* Merge pull request #51 from nschonni/add-gitignore-for-build (Nicholas C. Zakas)
* Trim default gitconfig (Nick Schonning)
* Remove build folder and exclude it (Nick Schonning)


December 4, 2012 - v0.2.1

* Merge pull request #46 from nschonni/fix-vertical-align-missing-values (Nicholas C. Zakas)
Expand Down Expand Up @@ -305,6 +318,8 @@ November 28, 2011 - v0.1.0








2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project name="parserlib" default="build.all">

<!-- version number -->
<property name="parserlib.version" value="0.2.1" />
<property name="parserlib.version" value="0.2.2" />

<!-- the directories containing the source files -->
<property name="src.dir" value="./src" />
Expand Down
10 changes: 5 additions & 5 deletions release/node-parserlib.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.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
var parserlib = {};
(function(){

Expand Down Expand Up @@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
Expand Down Expand Up @@ -2562,7 +2562,7 @@ Parser.prototype = function(){
while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
Tokens.RESOLUTION])){
Tokens.RESOLUTION, Tokens.SLASH])){

value += tokenStream.token().value;
value += this._readWhitespace();
Expand Down Expand Up @@ -3508,7 +3508,7 @@ var Properties = {
"-o-animation-name" : { multi: "none | <ident>", comma: true },
"-o-animation-play-state" : { multi: "running | paused", comma: true },

"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"azimuth" : function (expression) {
var simple = "<angle> | leftwards | rightwards | inherit",
direction = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",
Expand Down Expand Up @@ -3717,7 +3717,7 @@ var Properties = {

//D
"direction" : "ltr | rtl | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker",
"dominant-baseline" : 1,
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
Expand Down
10 changes: 5 additions & 5 deletions release/npm/lib/node-parserlib.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.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
var parserlib = {};
(function(){

Expand Down Expand Up @@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
Expand Down Expand Up @@ -2562,7 +2562,7 @@ Parser.prototype = function(){
while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
Tokens.RESOLUTION])){
Tokens.RESOLUTION, Tokens.SLASH])){

value += tokenStream.token().value;
value += this._readWhitespace();
Expand Down Expand Up @@ -3508,7 +3508,7 @@ var Properties = {
"-o-animation-name" : { multi: "none | <ident>", comma: true },
"-o-animation-play-state" : { multi: "running | paused", comma: true },

"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"azimuth" : function (expression) {
var simple = "<angle> | leftwards | rightwards | inherit",
direction = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",
Expand Down Expand Up @@ -3717,7 +3717,7 @@ var Properties = {

//D
"direction" : "ltr | rtl | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker",
"dominant-baseline" : 1,
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
Expand Down
2 changes: 1 addition & 1 deletion release/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parserlib",
"version": "0.2.1",
"version": "0.2.2",
"description": "CSSLint",
"author": "Nicholas C. Zakas",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion release/parserlib-core.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.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
var parserlib = {};
(function(){

Expand Down
8 changes: 4 additions & 4 deletions release/parserlib-css.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.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
Expand Down Expand Up @@ -1652,7 +1652,7 @@ Parser.prototype = function(){
while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
Tokens.RESOLUTION])){
Tokens.RESOLUTION, Tokens.SLASH])){

value += tokenStream.token().value;
value += this._readWhitespace();
Expand Down Expand Up @@ -2598,7 +2598,7 @@ var Properties = {
"-o-animation-name" : { multi: "none | <ident>", comma: true },
"-o-animation-play-state" : { multi: "running | paused", comma: true },

"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"azimuth" : function (expression) {
var simple = "<angle> | leftwards | rightwards | inherit",
direction = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",
Expand Down Expand Up @@ -2807,7 +2807,7 @@ var Properties = {

//D
"direction" : "ltr | rtl | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker",
"dominant-baseline" : 1,
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
Expand Down
34 changes: 33 additions & 1 deletion release/parserlib-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,22 @@
Assert.areEqual("orientation", result.features[1].name);
Assert.areEqual("portrait", result.features[1].value);
Assert.areEqual("only screen and (max-device-width:768px) and (orientation:portrait)", result.text);
},

testComplexMediaQueryWithDevicePixelRatioAsFraction: function(){
var parser = new Parser();
var result = parser.parseMediaQuery("only screen and (-o-device-pixel-ratio: 3/2) and (-webkit-device-pixel-ratio: 1.5)");

Assert.isInstanceOf(MediaQuery, result, "Result should be an instance of MediaQuery.");
Assert.areEqual(1, result.line, "Line should be 1");
Assert.areEqual(1, result.col, "Column should be 1");
Assert.areEqual("only", result.modifier);
Assert.areEqual("screen", result.mediaType);
Assert.areEqual(2, result.features.length, "Should be two features.");
Assert.areEqual("-o-device-pixel-ratio", result.features[0].name);
Assert.areEqual("3/2", result.features[0].value);
Assert.areEqual("-webkit-device-pixel-ratio", result.features[1].name);
Assert.areEqual("1.5", result.features[1].value);
}


Expand Down Expand Up @@ -1115,7 +1131,7 @@
Assert.areEqual(0, result.parts[0].green);
Assert.areEqual(0, result.parts[0].blue);
},
testCSS2SystemColorValue: function(){
var parser = new Parser();
var result = parser.parsePropertyValue("InfoText");
Expand Down Expand Up @@ -1594,6 +1610,22 @@
Assert.areEqual("-moz-pre-wrap", event.value.parts[0].text, "The vendor prefixed value should be intact.");
});
var result = parser.parse(".foo {\n; white-space: -moz-pre-wrap;\n}");
},

"Test display -moz-inline-stack": function(){
var parser = new Parser({ strict: true});
parser.addListener("property", function(event){
Assert.areEqual("display", event.property.toString());
Assert.areEqual("-moz-inline-stack", event.value.toString());
Assert.areEqual(5, event.property.col, "Property column should be 5.");
Assert.areEqual(2, event.property.line, "Property line should be 2.");
Assert.areEqual(5, event.col, "Event column should be 5.");
Assert.areEqual(2, event.line, "Event line should be 2.");
Assert.areEqual(14, event.value.parts[0].col, "First part column should be 14.");
Assert.areEqual(2, event.value.parts[0].line, "First part line should be 2.");
Assert.areEqual("-moz-inline-stack", event.value.parts[0].text, "Vendor prefixed value -moz-inline-stack is intact.");
});
var result = parser.parse(".foo {\n display: -moz-inline-stack;\n}");
}
}));

Expand Down
10 changes: 5 additions & 5 deletions release/parserlib.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.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
var parserlib = {};
(function(){

Expand Down Expand Up @@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Version v0.2.1, Build time: 4-December-2012 11:58:48 */
/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
Expand Down Expand Up @@ -2562,7 +2562,7 @@ Parser.prototype = function(){
while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
Tokens.RESOLUTION])){
Tokens.RESOLUTION, Tokens.SLASH])){

value += tokenStream.token().value;
value += this._readWhitespace();
Expand Down Expand Up @@ -3508,7 +3508,7 @@ var Properties = {
"-o-animation-name" : { multi: "none | <ident>", comma: true },
"-o-animation-play-state" : { multi: "running | paused", comma: true },

"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | 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 | inherit",
"azimuth" : function (expression) {
var simple = "<angle> | leftwards | rightwards | inherit",
direction = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",
Expand Down Expand Up @@ -3717,7 +3717,7 @@ var Properties = {

//D
"direction" : "ltr | rtl | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit",
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker",
"dominant-baseline" : 1,
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
Expand Down

0 comments on commit fba219c

Please sign in to comment.