Skip to content

Conversation

@jakirkham
Copy link

Closes #10

Adds first_child_head and first_child_tail to Style and implements them in a compatible way for BoxStyle. Updates LeftAligned to handle the first child with these special methods.

These are handy when the first child in the set needs to be handled
specially.
@jakirkham
Copy link
Author

Still need to resolve the case of having only one child. Namely does it go through first or last or possibly both and why.

@jakirkham
Copy link
Author

Made the only child case a special case that can also be overridden.

@jakirkham
Copy link
Author

Also updated all styles to define these functions in a way that is compatible with their existing behavior.

@jakirkham jakirkham changed the title WIP: Handle first child specially Handle first child specially Oct 25, 2017
@jakirkham
Copy link
Author

While this technically works and passes the tests, I'm not sure that it is helpful for solving my problem yet. Am trying to generate some HTML and CSS to make a visualization like this one (item 4) The code being generated needs to look something like this, but was having a hard time getting that behavior out of these functions. Ended up rolling my own function, but it would be better if that wasn't necessary.

@jakirkham
Copy link
Author

Opened issue ( #12 ) based on the last point. Namely handling cases of having or not having children specially.

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

Successfully merging this pull request may close these issues.

1 participant