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
Add rem support with pixel fallbacks to vertical-rhythm module #775
Comments
Its definitely telling that we were both working on this at the same time. :-) |
I think rem is a great unit for developer authoring, but I don't see a need to change the output unit to rem. I would support any changes needed to make it simple for authors to pass rem-based values to the compass mixins but when using absolute units -- let's keep the px output. Please let me know if I'm missing something. Also, seems like this could be done as non-breaking addition to stable. If not, it'll need to go onto master for 0.13. |
@chriseppstein I'm not 100% sure what you're suggesting and I'd like to understand. Are you suggesting we allow rem inputs (with rem outputs) but no pixel fallbacks? I think that that's already supported (except for +establish-baseline operating on the body rather than root). Maybe I can restate the rationale for this better by laying bare my thought process:
***$64,000 question. cc @JohnAlbin |
I'm saying we don't need pixel fallbacks. As long as the author tells us that 1rem = 16px (or whatever), then compass can still output pixels, and the author can pass rem-based numbers to all the compass mixins. As far I can tell, rem is a authoring convenience and has no other semantic differences over using pixels than the mental model. |
That is incorrect in the real world. Otherwise This is what @ericam was pointing out in #766. Currently the vertical-rhythm outputs a px value on the body tag (except for IE6). That overrides any default font size settings the user has specified in the UA. Compass users should have the option to use relative sizes (even in the establish-baseline() output) so that we can respect the UA users' choices. So if we give the authors the option to output in ems or rems (and we should), then when we output rem we have to have a px backup for browsers that don't support rem.
Actually, I think most authors would want the opposite. Input numbers in Our tools (Photoshop, font faces, etc.) all describe font sizes in I don't know of any tools that describe fonts in terms of percentages of a base font. So, to reiterate…
|
Let's avoid the loaded language. We're all operating in the real world here :)
Excellent. This was the point I was missing. Thank you for clarifying it.
Maybe so, but I vastly prefer to author in
This is not correct. We have a flag for this (
If the author has specified |
Sorry! What I meant was to compare what the CSS spec says versus user experience in browser realities. But I definitely did not phrase that correctly. I apologize.
Really? That'd be nice! I used to work with a designer who wanted me to move something over "a pixel to the left". x-p
You could be right, but I'm not sure. Let's see what @ry5n and I come up with first. :-) @ry5n, I'm going to be at the Drupalcon Denver conference next week, so it will probably be after that before I get a chance to work with you on this.
Good point! |
@JohnAlbin @chriseppstein Sounds like we're agreed on the basics then – improve rem support and allow for outputting pixel fallbacks when using rems as the internal font unit. John, I think that will be fine, I may do a bit of work in the meantime but let's check in when you're back. Have a great time in Denver. :) |
@JohnAlbin I now have a working dev environment for Compass, and just pushed a vastly improved rem mixin that should prove useful. I’m ready to move ahead; how about you? |
@JohnAlbin, @chriseppstein, and @ry5n: I've addressed one of the issues mentioned above in #844 - using That's a blocker for the next version of Susy, so I'd like to take care of it asap. |
Thanks Eric. I notice you'd fixe this and skimmed the solution. Looked good as I recall. I'm hoping to update that issue wih my progress this weekend. Ryan On 2012-04-13, at 4:34 PM, Eric Meyerreply@reply.github.com wrote:
|
will it be possible to use REM for type unit and ems for leading? |
@pdewouters The way the VR partial works is it will output rhythm values based on a couple of configurable variables, so you can (I believe) set your Not sure if that answers your question. Do you have a particular use case in mind? |
Bumping myself. Been working on this and almost have something for review, but not confident it’s the right approach. @JohnAlbin will you have a bit of time in the next week to review some code? |
bump |
This conversation isn't dead, it just moved. See Pull Request #896 for discussion |
Currently the vertical-rhythm module supports setting the unit of font-size to rems, but doesn't provide pixel fallback declarations for older browsers and has some other issues. More complete support for rems, including pixel fallbacks, would be an awesome addition to this module. See #766. #771 is also relevant.
Additional rationale:
Considerations:
The text was updated successfully, but these errors were encountered: