Skip to content
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

Addition to test for "rem" css3 value #252

Closed
wants to merge 1 commit into from
Closed

Conversation

nsfmc
Copy link

@nsfmc nsfmc commented May 2, 2011

Adding a test for the rem css3 value. the test checks to see if the property is ditched when it is used on an element's font-size.

The rem addresses the issue of compounding/inherited font-size definitions when using ems, instead, the rem is always tied to the font-size of 'html'/:root or 'medium' if the html element is sized in rems. It's described here:

http://www.w3.org/TR/css3-values/#relative0

I woud normally have left this as an external test, but the addition to modernizr is so trivial that it seems like there's little reason not to test for it. Tested (successfully) on safari 5.05, firefox 3.5,3.6,4, opera 11.10, internet explorer 8,9.

The one thing that i'm not totally sold on is the test's name, rem lacks too much context (for now), so maybe fontsizerem or remsize or... i don't know. ideas? Also, i put it near the text-shadow test, but i'm sure it could go anywhere if these sorts of attributes are placed anywhere specific (i couldn't immediately tell).

hope it's useful,
--marcos

…e property is ditched when it is applied to an element.

Practically, the rem addresses the issue of compounding/inherited font-size definitions when using ems, instead, the rem is always tied to the font-size of 'html'/:root or 'medium' if the html element is sized in rems.

http://www.w3.org/TR/css3-values/#relative0
@paulirish
Copy link
Member

see also the test at #253

@nsfmc
Copy link
Author

nsfmc commented May 3, 2011

zeitgeist alert!

@segdeha
Copy link

segdeha commented May 3, 2011

@nsfmc's FWIW, looks more Modernizr-like.

@paulirish paulirish closed this in b9dcee2 Dec 12, 2011
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants