Lona / Lona

A tool for defining design systems and using them to generate cross-platform UI code, Sketch files, and other artifacts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File format spec (Shadows): Lack of spread value and inside shadows

ChristophLabacher opened this issue · comments

I noticed that the spread value is missing from the shadow spec. Is this a conscious choice?

It is offered by most design tools and is built-in to CSS. It’s not a property for CALayer in Cocoa, but can apparently be created using .shadowPath. I am not sure about Android …

I also notices there is no way to specify an inside shadow, not sure how that one plays in the various platforms?

Yeah, I left spread off since it's not easy to do on iOS. We could do it with shadowPath, but it's a bit more work, so I haven't gotten around to it yet. It's also not available on React Native, but I think that's OK, since the platforms I want to support initially are web, iOS, and Android -- and there's no fundamental reason why it couldn't be added to RN.

On Android, shadows will need to be a bit more custom, since Android only supports discrete elevations out of the box, with all the shadow's attributes pre-defined.

Anyway, I think we could add spread to the spec, but it might be a bit misleading for Lona right now, so I would probably call out in the docs that it's not supported in generated code.