-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow font-size to be em
units
#6
Comments
Hi green-arrow, I think the idea of a local grid is an interesting idea but my concern is that we would need to add additional parameters to the typeset mixin so we can know the local font-size context, and tell it to output in em's. Another option would be to assume the rootsize as the context and rely on tweaking the sizing of your sections with the font-size of a parent element (which I assume you're doing already), which would give you a number of local grids. However we still need either a per-mixin parameter to tell it to output in rems, or perhaps a global setting might be more appropriate? That way we wouldn't clutter up the typeset mixin with too many extra parameters. |
Hi @tbredin After thinking more about this, I think what I'm interested in is a local grid. About the extra parameters: would it be possible to create another mixin wrapper like |
I like the concept. I'll have to spend a bit more time investigating whether this is viable, but something like this seems like it might work:
I'm thinking that this would apply the typeset mixin to I'll try find some time soon to give this a go; I do think it would make a pretty cool feature but just so long we can figure out a way to do it that doesn't overcomplicate existing mixins or result in any unexpected behaviour in edge cases (eg: I'm not sure how far we should go to support the use case of having something on a global grid that switches to a local one at a given breakpoint..). |
Yeah, something like that is exactly what I was thinking. It would also be awesome if the I don't think we want to overcomplicate existing mixins either, and I don't think the switching from global > local grid based on breakpoint would be necessary. I feel like exactly what you have above, a root container sized in |
I'm not even sure if this is possible with the methodology backing this project, but there are many times in my projects that I like to control sections of my application separately, with separate scaling. To do this, I normally use
rem
sizing at the section level, andem
sizing for everything else, that way I can individually scale sections based on various conditions, like breakpoints. Is it possible to allowem
for thetypeset
mixing, in addition topx
andrem
?The text was updated successfully, but these errors were encountered: