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

proposed add: outerHeight/Width + innerHeight/Width #12

Open
bluesaunders opened this issue Apr 10, 2014 · 3 comments
Open

proposed add: outerHeight/Width + innerHeight/Width #12

bluesaunders opened this issue Apr 10, 2014 · 3 comments

Comments

@bluesaunders
Copy link

Now that Cash is modularized, should we add the following methods?

  • outerHeight()
  • outerWidth()
  • innerHeight()
  • innerWidth()

They'd be useful for having more refined control of determining the size of elements without having to hardcode in magic numbers, or try to acquire the numbers with calls to getComputedStyle(elem);

@mnelson
Copy link

mnelson commented Apr 10, 2014

Now that we're modularized I'm generally fine with the addition of stuff like this. For the sake of argument, let's consider the following:

  1. Where do we stop? Let's not rebuild jquery / zepto for the sake of it.
  2. Are there cases where we need these methods right now?
  3. Should "more complicated" methods like these be included into the existing, similar modules (i.e. heightWidth.js) or to a new module (i.e. advancedHeightWidth.js).

@bluesaunders
Copy link
Author

Definitely good points.

  1. Agreed. For starters, I think we should continue questioning an addition before implementing for implementation sake.
  2. We ran into one yesterday, but better design of the page and leaning more heavily on CSS might help.
  3. Good question, idk.

@robrobbins
Copy link
Member

The Outer* are more useful IMO as the issue Brendan found was that the padding was, of course, not being reported by height(). I think the answer may be @bluesaunders 2nd point, better design. The need for it may just be a design 'smell'... I will put together a module for it, at some point, but it won't be in the default build

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

No branches or pull requests

3 participants