Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor prefix align for properties without spaces #111

Closed
tonyganch opened this issue Nov 18, 2013 · 7 comments
Closed

Vendor prefix align for properties without spaces #111

tonyganch opened this issue Nov 18, 2013 · 7 comments

Comments

@tonyganch
Copy link
Member

Hello, node[2][2][1][1]

This line assumes that there is exactly one group of whitespaces between property name and value.
For example, this code is ok:

background: -webkit-linear-gradient(nani);
background: -moz-linear-gradient(nani);

Aligning does not work however if there is no whitespace:

background:-webkit-linear-gradient(nani);
background:-moz-linear-gradient(nani);

Or there is a comment before value:

background: /* comment */ -webkit-linear-gradient(nani);
background: -moz-linear-gradient(nani);
@L0stSoul
Copy link
Contributor

i'll try to fix it

@tonyganch
Copy link
Member Author

One more failing test:

> comb.processString('a{color:tomato;top:0}')
TypeError: Cannot call method 'replace' of undefined
    at /Users/tonyganch/GitHub/csscomb/js/lib/options/vendor-prefix-align.js:240:42

While adding a space after ; makes everything ok: a{color:tomato; top:0}'

@tonyganch
Copy link
Member Author

One more failing test:

> var comb = new Comb({'vendor-prefix-align': true})
> comb.processString('a{top:0}');

TypeError: Cannot read property '1' of undefined
    at /Users/tonyganch/GitHub/csscomb/js/lib/options/vendor-prefix-align.js:161:54
    at Object.<anonymous> (/Users/tonyganch/GitHub/csscomb/js/lib/options/vendor-prefix-align.js:53:13)
    at Array.forEach (native)
    at Object.module.exports._walk (/Users/tonyganch/GitHub/csscomb/js/lib/options/vendor-prefix-align.js:50:14)
    at Object.module.exports.process (/Users/tonyganch/GitHub/csscomb/js/lib/options/vendor-prefix-align.js:158:14)
    at Object.<anonymous> (/Users/tonyganch/GitHub/csscomb/js/lib/csscomb.js:182:25)
    at Array.forEach (native)
    at Object.Comb.processNode (/Users/tonyganch/GitHub/csscomb/js/lib/csscomb.js:170:14)
    at Object.<anonymous> (/Users/tonyganch/GitHub/csscomb/js/lib/csscomb.js:188:18)
    at Array.forEach (native)

@L0stSoul
Copy link
Contributor

yeah, it problems of one kind behind all of that.

@L0stSoul
Copy link
Contributor

L0stSoul commented Feb 7, 2014

almost fixed, last one question - what should i do with style with comments, like:

background: -webkit-linear-gradient(nani);
background: /* comment */  -moz-linear-gradient(nani);

should i transform it like this ?:

background:             -webkit-linear-gradient(nani);
background: /* comment */  -moz-linear-gradient(nani);

@tonyganch tonyganch modified the milestones: 2.0.5, 2.0.4 Feb 7, 2014
@tonyganch
Copy link
Member Author

A few less spaces, but yes, the idea is good.

background:             -webkit-linear-gradient(nani);
background: /* comment */  -moz-linear-gradient(nani);

@L0stSoul
Copy link
Contributor

L0stSoul commented Feb 7, 2014

ok!

L0stSoul added a commit to L0stSoul/csscomb.js that referenced this issue Feb 8, 2014
L0stSoul added a commit to L0stSoul/csscomb.js that referenced this issue Feb 10, 2014
L0stSoul added a commit to L0stSoul/csscomb.js that referenced this issue Feb 10, 2014
@tonyganch tonyganch mentioned this issue Feb 15, 2014
@tonyganch tonyganch modified the milestones: 3.0.0, 2.0.5 Feb 21, 2014
tonyganch pushed a commit that referenced this issue Feb 21, 2014
tonyganch pushed a commit that referenced this issue Feb 21, 2014
tonyganch pushed a commit that referenced this issue Feb 21, 2014
tonyganch pushed a commit that referenced this issue Feb 21, 2014
tonyganch pushed a commit that referenced this issue Jun 9, 2014
tonyganch pushed a commit that referenced this issue Jun 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants