Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 1.06 KB

FAQ.md

File metadata and controls

21 lines (13 loc) · 1.06 KB

Frequently Asked Questions

How do I use z-index?

The z-index property isn't currently supported. We're trying to figure out the best API for layered elements, and you can help! Please submit your use cases to issue #46 so we can find the best solution for everyone.

While you're waiting, you can use the Style.prop function to get what you need:

zIndex : Int -> Property class variation
zIndex n =
    prop "z-index" (toString n)

How do I set margins?

Supporting both margins and padding make consistent layouts difficult, so style-elements only uses padding.

If you need spacing between children in a layout, use Element.Attributes.spacing.

To set more space around a single element, wrap the element in a spacer a set padding. This is more explicit and you can predict exactly how your element will be laid out.