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

feat: remove props from variables function #770

Merged
merged 4 commits into from
Jan 25, 2019

Conversation

kuzhelov
Copy link
Contributor

@kuzhelov kuzhelov commented Jan 24, 2019

TODO

  • introduce BREAKING CHANGE entry to changelog

We've agreed to move from providing props as an argument to variables function - leaving siteVariables being the only one provided. This move will make order of styles resolution (as well as list of dependencies used on each stage) much cleaner and reasonable:

siteVariables -> variables(siteVariables) -> styles(props, variables, [siteVariables])    

@kuzhelov kuzhelov changed the title [WIP] remove props from variables function feat: remove props from variables function Jan 24, 2019
}),
}),
icon: ({ props: p, variables: v, theme }): ICSSInJSStyle => {
const { siteVariables: siteVars } = theme
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will simplify this expression

...(p.isFromKeyboard && {
// this creates both inset and outset box shadow that some readers (NVDA) show when radio is not checked but it is focused
boxShadow:
`0 0 0 ${pxToRem(1)} ${siteVars.brand},` + `0 0 0 ${pxToRem(2)} ${siteVars.brand} inset`,
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this to variables to omit siteVars usage?

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

LGTM, left one comment

@kuzhelov kuzhelov merged commit fb9deec into master Jan 25, 2019
@kuzhelov kuzhelov deleted the feat/remove-props-from-vars-func branch January 25, 2019 13:07
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.

None yet

4 participants