FremyCompany / css-grid-polyfill

A working implementation of css grids for current browsers.
MIT License
1.11k stars 82 forks source link

Repeat attribute #3

Closed itamayo closed 9 years ago

itamayo commented 9 years ago

Some problems relative to 'repeat' attribute. Whenever it is added on the CSS, the web application gives an error on file css-polyfills.js : 4537

Error : undefined function -> toCSSString

It seems that is expects some object and instance of it gets an Array. I have done a little trick changing code

value = value[0];

But it says that repeat token does not exists =/

FremyCompany commented 9 years ago

It's very possible. I upgraded the CSS Parser recently and it generated a few issues. Some functions now return bare arrays instead of TokenList (basically an array having a toCSSString function).

I'm gonna look at the issue, it's probably easy to fix.

itamayo commented 9 years ago

thanks ! I am little bit lost =)

FremyCompany commented 9 years ago

I merged the changes which accumulated over the last month on multiple devices, and Exemple 15 containing a 'repeat' function is now working on my PC.

I would like to confirm your case is solved as well. If not, could you provide a repro to me?

itamayo commented 9 years ago

This is a picture take it with the demo/example15.html without any change. css-cascade-fail

I added to css_cascade.js:726 this:

+return value && value.length>0 && value.toCSSString ? value.toCSSString() : '';
-return value && value.length>0 ? value.toCSSString() : '';

But I think it is not rendering fine, I mean is not applying a 'repeat' attribute.

_is_render_fine

Extra info: Try it on google chrome, chromium and firefox 26 (same issue)

FremyCompany commented 9 years ago

I can repro, indeed. It renders fine in IE, which is why I thought the issue was fixed. I'll investigate why Fx and Chrome seems to face an issue here.

FremyCompany commented 9 years ago

Could you have a look now? It looks to be working again in Chrome/Firefox.

itamayo commented 9 years ago

Good job ! It is working perfect =)