4 ms·
Isn't one crucial problem with this that ES object-literal syntax does not guarantee order? And order is pretty important in CSS, no?
by padolsey 13y ago
Isn't one crucial problem with this that ES object-literal syntax does not guarantee order? And order is pretty important in CSS, no?
- tomjakubowski 13y agoOff the top of my head, order in CSS is only important when a property is defined multiple times for a given selector, either within the same block or in separate ones. Like these examples: .foo { font-size: 12px; font-size: 14px; // later property wins } .bar { font-size: 12px; } .bar, .baz { font-size: 14px; // later property wins } And I don't see a way to generate either of those cases only using object literals in this library.
- garethadams 13y agoYou're forgetting that shorthand properties give multiple ways to set some values. This wouldn't work reversed: { border: 1px solid red; border-bottom-width: 10px; } - http://jsfiddle.net/afXGN/ http://jsfiddle.net/afXGN/
- krasimirtsonev 13y agoActually you care about the ordering if you have same properties applied for same selector. However, AbsurdJS hides this and automatically calculate the latest defined value. And that's what it goes in the compiled file. I need to spend some time using the library to be sure that such problem is actually solved. So, shortly: I can't 100% guarantee that you will not have problems with that.