peterramsing/lost

lost-column gutter requiring cycle when using short-hand

peterramsing opened this issue · 11 comments

@corysimmons When using lost-column shorthand I spaced a custom gutter and in the shorthand it requires the cycle to be spec'd. I'd like to be able to set the gutter without having to also spec a cycle...but that could just be me.

  1. If this is on purpose I'll update the README for this gotcha (unless I just totally missed it...)
  2. If this should be more adaptive then I suppose I can work on updating the lib/lost-column.js . see #213

  • Update the README to reflect this

The cycle needs to be specified if you're using the shorthand. It's very similar to other CSS shorthand where certain things need to appear in a certain order. Am I understand your question correctly?

Yes, I think you are. We just had a discussion about this in our office. If you look at a rule such as border you can leave out values and it falls back to default. That's what I'm referring to here. If I leave the cycle value out it would be nice if it stayed default.

I see what you're saying. I'd love to have that feature but couldn't figure out how to do it when I built Lost.

Want to label this as a bug and I'll see what I can do?

It's not really a bug imo but I can label it an enhancement.

Sweeeeet! I'll see if I can find some time in the coming evenings to figure out a plan of attack...

Surely a gutter value always has to have a unit, whereas a cycle is an integer and flex is a string. Could it be improved so that order isn't required?

It's possible with several conditionals, but I'm not sure how much of a benefit it'd be.

Being that other css properties act as @sidonaldson is saying, it might be worth while. Maybe over the holiday I'll have some time to address this issue and see what it would take to make it order agnostic.

border-bottom: 1px dotted; == border-bottom: dotted 1px;

I'd say it's worth attempting.

I don't think all CSS properties are order agnostic, but I don't suppose it could hurt.

Since this is acting as expected (in shorthand all params must be preset), I'm going to update the readme instead, but this discussions continued in #213