BlessCSS / bless

CSS Post-Processor
blesscss.com
MIT License
282 stars 60 forks source link

Fixed multiple blessed-*.css files to be imported in correct order #80

Closed eko closed 8 years ago

eko commented 8 years ago

I've fixed import order when CSS file is splitted into multiple files to be in correct order.

Old:

@import url('style.min-blessed2.css');
@import url('style.min-blessed1.css');

New:

@import url('style.min-blessed1.css');
@import url('style.min-blessed2.css');

Thank you!

paulyoung commented 8 years ago

I'm not sure that this change is correct.

For the fixture that was changed, in the corresponding input file the background colors were red, then green, then blue.

This change would make the order in the output green, then red, then blue.

eko commented 8 years ago

Hi @paulyoung,

Indeed, you were right, I missed this point. This is now fixed:

$ ./bin/blessc test/input/above-limit.css -f
blessc: Source CSS file contained 8,191 selectors. 3 CSS files created.
$ cat test/input/above-limit.css
@import url('above-limit-blessed1.css?z=1443377469870');
@import url('above-limit-blessed2.css?z=1443377469870');

#test { background-color: blue; }
$ tail -1 test/input/above-limit-blessed1.css
#test { background-color: red; }
$ tail -1 test/input/above-limit-blessed2.css
#test { background-color: green; }

So now, we have the correct wanted order: red, green, blue.

Thank you!

paulyoung commented 8 years ago

So effectively this is just to change the import statements so that they're listed in ascending numerical order?

paulyoung commented 8 years ago

I think this will affect all of the other tests too.

paulyoung commented 8 years ago

@eko any plans to continue with this?

eko commented 8 years ago

Closing as I think there is no issue here.

paulyoung commented 8 years ago

Thanks @eko!