Working with calc() props for height/width #757
-
Are there any plans to allow calc() functions as props to components like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @alecnicolas, working with heights is an interesting problem that Paste comes up against from time to time and I'm not sure we have the best answer yet. On the one hand we're leaning towards allowing any height or width value, as it's pretty hard to predict what is useful for any given UI. Any value being any valid CSS for a height or width. On the other, setting heights in particular can be a pretty problematic pattern we want folks to try and avoid if possible. The problem shows itself in a few scenarios all with the same unintended consequence. That consequence is that content might flow into new lines in certain situations, and if the container has a fixed height, the content will either break out of the container, or it might be cut off by the container rendering the newly wrapped content hidden or obscured. Situations can include:
Now, depending on what you're trying to do, using In summary, we'll likely add the ability to set what ever you want some point into the future, but we would encourage you to be extra careful when doing so, so you don't accidentally cut off content in any of the above 3 scenarios |
Beta Was this translation helpful? Give feedback.
Hi @alecnicolas, working with heights is an interesting problem that Paste comes up against from time to time and I'm not sure we have the best answer yet.
On the one hand we're leaning towards allowing any height or width value, as it's pretty hard to predict what is useful for any given UI. Any value being any valid CSS for a height or width.
On the other, setting heights in particular can be a pretty problematic pattern we want folks to try and avoid if possible. The problem shows itself in a few scenarios all with the same unintended consequence. That consequence is that content might flow into new lines in certain situations, and if the container has a fixed height, the content will …