Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style dependent position calculations #3

Open
AlesJiranek opened this issue Feb 3, 2016 · 3 comments
Open

Style dependent position calculations #3

AlesJiranek opened this issue Feb 3, 2016 · 3 comments

Comments

@AlesJiranek
Copy link
Contributor

Hello,

are you going to update position calculations to be independent on style, or maybe configurable with props?

@lightsinthesky
Copy link
Owner

I guess those are the options - I'd prefer to not pass props. Do you think its safe to calculate using dom methods (e.g. getBoundingClientRect)? I'll take a shot or you can send me a PR, the example should suffice for validation.

@AlesJiranek
Copy link
Contributor Author

I think it is safe, but we will lose server side rendering suppor If we will use them. I think best option would be to use inline styles and allow to pass custom style prop. Then we can use properties like width, padding and line height from style object in calculations and also it can be changed with passed style

@lightsinthesky
Copy link
Owner

agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants