-
Notifications
You must be signed in to change notification settings - Fork 109
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
Confusing gutter-span parameters order #183
Comments
Those arguments are optional. When they are omitted, Singularity takes the values from the grid definition above. I don't mean that i support an inconsistency, but here are two ways to consider:
|
@lolmaus, thank you for your suggestions, I haven’t seen named arguments in such context before. But the point of this issue is not to make my code just work (it’s fine already), but to improve API, documentation and code readability for the rest of users. |
If you already did the code changes, consider filing a pull request and see whether @Snugug will accept it. |
Wait a second. For the following nesting fragment:
But following code is restoring context
So I want it to be not |
I prefer to discuss it first, but sure, will do. |
Can you please provide a http:https://SassMeister.com demo of you're trying to achieve with this approach? |
I’m trying to get gutter width for |
Ok, now i see that providing But i kinda don't understand your use case. Y r u doing dis? Can you show a pencil sketch of a layout where this technique makes sense? I mean, you don't just provide an arbitrary offset to you inner elements, you want it to be consistent with your grid. But this makes elements lay off the grid and i don't understand how this is better than arbitrary |
I don’t think it’s worth to explain all my layout difficulties here, but quite often in my experience you need to position, pull and push elements based on grid elements: column and gutter. Based on dynamic variables not just something like |
I thought I had commented on this. Long story short: I'm uncomfortable changing the parameters of a mixin already in use as it would break existing code unnecessarily (@lolmaus, this is not the time or place to air your grievances about the needed changes with 1.2.x, please don't). This is something I'm happy to consider for Singularity 2.x, but I will not be considering it for 1.x, and I will not be releasing 2.x for just this feature; a major rewrite would need to happen. To provide insight as to why the In the meantime, you can do the following to ease your specific issue:
Generally with Singularity, and non-required properties in our mixins can have |
There are two
$grid
and$gutter
parameters available for grid helpers. They act the same but for some reasongutter-span
helper have a different order of parameters comparing tocolumn-span
andgrid-span
.You can do something like this
column-span(1, 2, 5)
orgrid-span(1, 2, 5)
without mentioning$gutter
, but when you just need to pass different$grid
togutter-span
you have to go like thisgutter-span(false, 5)
instead of justgutter-span(5)
.So there are two problems:
$grid
but leave$gutter
the same.Is there any reason for that? If not I would really like you to change it.
The text was updated successfully, but these errors were encountered: