Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

feat(menu): Padding variables for horizontal menu#808

Merged
jurokapsiar merged 3 commits intomasterfrom
feat/menu-padding-variables
Jan 31, 2019
Merged

feat(menu): Padding variables for horizontal menu#808
jurokapsiar merged 3 commits intomasterfrom
feat/menu-padding-variables

Conversation

@jurokapsiar
Copy link
Contributor

@jurokapsiar jurokapsiar commented Jan 30, 2019

Consumer needs to be able to customize padding in the menu. This PR adds variables that allow to do this for the vertical variant.

I'm not sure if this is the right API as the variable names are bound to the variant (horizontal), so any feedback would be appreciated

horizontalPaddingLeft: pxToRem(18),
horizontalPaddingRight: pxToRem(18),
horizontalPaddingTop: pxToRem(14),
horizontalPaddingBottom: pxToRem(14),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When four values are specified, the paddings apply to the top, right, bottom, and left in that order (clockwise).
https://developer.mozilla.org/en-US/docs/Web/CSS/padding#Values

My vote is to keep a single value:

Suggested change
horizontalPaddingBottom: pxToRem(14),
horizontalPadding: `${pxToRem(14)} ${pxToRem(18)} ${pxToRem(14)} ${pxToRem(18)}`

@jurokapsiar jurokapsiar added 🚀 ready for review and removed help wanted Extra attention is needed labels Jan 31, 2019
@jurokapsiar jurokapsiar merged commit f964b9a into master Jan 31, 2019
@jurokapsiar jurokapsiar deleted the feat/menu-padding-variables branch January 31, 2019 12:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants