-
Notifications
You must be signed in to change notification settings - Fork 73
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
Support grid #176
Comments
I would like to help create this.
|
Yes Clay.FlexBox is a good module to study.
I always use MDN docs for web stuff, they have really high quality docs https://developer.mozilla.org/en-US/docs/Web/CSS/grid
I’ll just search “mdn <term>” like “mdn css grid” and it pops right up on DuckDuckGo
I would be happy to review the code when you get something together and help however I can. I’m in the process of moving and starting a new job, but I’m also heavily invested in Clay and want to see it succeed.
(FYI I’ve thought about forking this repo and applying some patches I’ve made myself in a closed codebase, but haven’t found the time to yet)
…Sent from my iPhone
On May 28, 2019, at 14:56, William Rusnack ***@***.***> wrote:
I would like to help create this.
What is the best file to pattern off of for this, src/Clay/FlexBox.hs?
Is https://drafts.csswg.org/css-grid-1/ a good reference for the grid spec?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I offered to help maintain clay but despite a positive response, the repo owner never made any moves. I've written some extras in dbaynard/cascade (it was meant to be a high level wrapper with examples of styles but it has mutated a little.) As it happens, there are design choices made in clay that I think might be improved, so I'm holding off on repeating my offer until I've investigated these alternatives. (Edit: links and typos) |
@dbaynard Which other ones have you seen that you like? |
@BebeSparkelSparkel I don't quite understand your question, but if you mean other design choices: something which integrates with a parser, or the technique used by https://hackage.haskell.org/package/type-of-html. |
Hi @dbaynard, new maintainer here. Sounds like a good and popular feature to support. If you have an idea how to approach this, feel free to create a PR, I'll review and merge :) |
Stale issue message |
@BebeSparkelSparkel are you interested in this issue and would like to contribute? |
@turion Sorry haven't looked at this for a while. I have switched to Shakespeare Lucius for now. Also, I see that clay has new maintainers, have you been refactoring/updating the core? |
@BebeSparkelSparkel Yes, I'm the new maintainer currently. (More would be welcome.) I haven't done any refactoring, and no plans to do that, since I'm no |
Glad to hear you want to come back to |
Grid is a killer css feature. I would love to see it in Clay. |
@JosephLucas Ok, reopening due to reasonably popular request ;) do you have any good hints how to implement, or want to contribute a pull request? |
Currently I plan to use the "-:" ultra generic Clay operator. I don't even know if it's gonna work. |
does the job. I think will stick with it 😄 even though I'm sure that's not the way we are supposed to write clay expressions 😕 |
@JosephLucas What does that code do? What CSS does it result in? |
The corresponding CSS code is
According to the syntax of grid, this CSS code creates a layout template with 4 rows and 2 columns. The first area of the template is named "header" (it's an area of the grid), it spans the first row and the two columns. "navbar" is the second row area. The "sidebar" area spans the cell of the grid at the third row and first column whereas the area at second column of this row is named "content". I let you guess what is the footer area. |
Ok, that makes sense. It would be a great addition to have a datatype corresponding to grid specifications and a module containing it with some useful operators. PRs welcome. |
Reopening because it's a popular requested feature. |
Hmmm I've configured the bot poorly. The issue should stay open. |
This issue has not seen any activity in a long time. If no further activity occurs, it will be closed after ten weeks. |
Hi, I've codded a different implementation for grid-row-start, grid-row-end, grid-column-start, grid-column-end, grid-row, grid-column and grid-area than the current pending pull-request.
More examples can be found in the tests I've added in my branch: If any interest, just let me know and I can further explain the pros/cons of the approach, ask some design questions, fine-tune the code and perform a pull request. |
Feel free to open a PR :) |
Great thank you :-) Just one question: how should the exceptions be implemented? I know from previous discussion threads that you would prefer the functions not to be partial. However, Clay is currently handling errors with partial functions. You also rightly mentioned that the situation with Clay is rather particular as people use Clay at init time (or at compile time using template Haskell), so a partial function in this case is not really problematic. My proposal would be to:
Let me know if that would work and I'll then come with a pull request in this spirit. |
That sounds great, but how about first doing only:
After that we can see whether we need the two additional points. |
Simpler! I'll perform the pull request once the partial functions are properly implemented. |
It needs a new module.
https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Grids
https://css-tricks.com/snippets/css/complete-guide-grid/
The text was updated successfully, but these errors were encountered: