Docs on Nesting a bit Misleading
I found this aspect of the docs misleading:
Nesting is simple. There is no context required.
I think I it would be more accurate if it read:
Nesting is simple, but context is not supported. Nested elements are relative to their direct parent’s dimensions.
This is an issue for elements that need to scale with the root grid, independent of the width of their direct parent.
The docs made me think that there was a way to make sure that a child with lost-column: 1/20 would represent the proper column width, relative to the root, even when nested inside of a lost-column: 16/20.
Just making sure I’m not missing some hidden context feature.
Looking in the code, I see that it's possible to set a global variable for units @lost gridUnit vw; instead of having to use lost-unit: vw; everywhere. Setting this doesn't seem to work. Since it's not documented, I had no expectation of it working, but I'm curious as to the status of this setting. Any ideas?
@ryanfitzer, let me look into this a bit. There might be a better option to do some sort of show and tell, here. I'm going to make a note to come back to this. If you want to make some direct suggestions to the docs in a PR I'd love to see that. I think at the very least your proposed wording change is something that could easily be slotted in.
Looking in the code, I see that it's possible to set a global variable for units
@lost gridUnit vw;instead of having to uselost-unit: vw;everywhere. Setting this doesn't seem to work. Since it's not documented, I had no expectation of it working, but I'm curious as to the status of this setting. Any ideas?
Working on this here: https://github.com/peterramsing/lost/pull/452
I found this aspect of the docs misleading:
Nesting is simple. There is no context required.
I think I it would be more accurate if it read:
Nesting is simple, but context is not supported. Nested elements are relative to their direct parent’s dimensions.
This is an issue for elements that need to scale with the root grid, independent of the width of their direct parent.
The docs made me think that there was a way to make sure that a child with
lost-column: 1/20would represent the proper column width, relative to the root, even when nested inside of alost-column: 16/20.Just making sure I’m not missing some hidden context feature.
I made this change here to the docs: https://github.com/peterramsing/lost/pull/450