brainly / style-guide

:art: Brainly Front-End Style Guide
https://styleguide.brainly.com/
Other
163 stars 30 forks source link

Chose margins direction and mention it in README #233

Closed mr-mig closed 3 years ago

mr-mig commented 9 years ago

We need to chose a single direction for vertical and horizontal margins. This choice should be stated in README.

See this article: http://csswizardry.com/2012/06/single-direction-margin-declarations/

Related to #13

aju commented 9 years ago

bottom/right ?:)

vergilius commented 9 years ago

@aju I agree with the bottom for sure, but how are we going to handle item that should have margin/padding on left side and its first item? first-child and margin-left?

aju commented 9 years ago

@vergilius yeah actually thats a good solution:) other than that we usually align items to left so setting right margin have more sense for me.

vergilius commented 9 years ago

We should also decide how paddings/margins should be applied to 2 components ie one is inside another

mr-mig commented 9 years ago

The problems I faced so far:

I've tried different solutions:

  1. Padding for parent - does not play with wrapping holes at all
  2. Padding (left-top) for parent + margin (bottom-right) for child - does not play nice with borders
  3. Padding (left-top) for parent (1/2 rhythm) + margin (bottom-right) for child (1/2 rhythm) - worked out ok for now, but need more testing