mdgriffith / elm-ui

What if you never had to write CSS again?
https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/
BSD 3-Clause "New" or "Revised" License
1.35k stars 112 forks source link

Sides module #300

Open dullbananas opened 3 years ago

dullbananas commented 3 years ago
type alias Sides =
    { top : Int
    , right : Int
    , bottom : Int
    , left : Int
    }

currently there's xy and each functions for padding, spacing, etc. xy should be in the sides module, and padding, spacing, etc. should accept a sides record

pravdomil commented 3 years ago

Hi @dullbananas, can you be more descriptive, what is your motivation behind creating this issue? How the sides module would looks like? Can you provide at least three paragraphs behind your thinking? Why it should be this way? What are the cons and pros? So that we gain more coherent picture.

dullbananas commented 3 years ago

@pravdomil The module should have these functions

xy : Int -> Int -> Sides
all : Int -> Sides

This would allow e.g. paddingXY, padding, and paddingEach to become 1 function which cleans up the Element module