-
Notifications
You must be signed in to change notification settings - Fork 0
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
Would it be possible to detect empty/imaginary cells #1
Comments
Do you have an example for how to use the generated data? I'm having a hard time picturing the use case here. |
My use case is for detecting the type of justification. I can't make use of the css justify property, because it's not there. The elements are absolutely positioned. I'm trying to make a flex + grid making helper tool. It allows you to freehand move the cells around and generates the css/html. I'm aware it's a very niche use case. I was stoked to learn about this library. But later I learned that my use case is gonna need some tweaking. |
Interesting. I have something similar on a custom site where I need to check whether one cell is higher than the next one, to then conditionally apply a border to the longer one of each pair. In that case, I just wrote a custom implementation. If you have a suggestion on how to hook into the detection function to allow that kind of customization, let me know. As it stands, the library is actually quite simple and most things are faster to just write a custom helper for. Maybe there could be a separate new function here, e.g. |
I think I should also try to just do a custom implementation. Closing this! |
Maybe start by taking the mean width of the cells and taking the ratio of the container width to the mean width. This ratio is the number of total cells in it. Total cells - Visible Cells = empty/imaginary Cells.
Take this 1D grid for example
[***][ ][***]
Mean width = 3
Container Width = 10
Ratio =
Math.round(10/3)=3
Not foolproof probably even stupid. But I wanted to throw it out there in case somebody else needs it.
The text was updated successfully, but these errors were encountered: