On Wed, Jul 20, 2016 at 1:05 PM, John J <cr8...@gmail.com> wrote:

> Working on my code, I decided to see what they CSS validator had to say
> about it, and it threw out 154 errors, most of which were about rem as my
> value of measure for things like padding, type, borders, margin.
>
> I am using rem on advice of a developer who said that a certain pinhead,
> un-named browser needs it; other browsers can use/deal with it too.
>
> Yet the validator threw a hissy..Should I abandon all efforts to support
> arcane versions of this browser, and stick only with em?
>
> Thank you!
>
> John



While I haven't used rem for padding or margin myself (as far as I can
remember), I usually use rem on all new projects going forward. I do
provide a fallback of px, however, for support of those browsers who need
it (though I may stop doing that as well soon). I use Sass (.scss) and have
a nice mixin for this:

@mixin font-size($size) {
font-size:$size;
font-size: ($size / 16px) * 1rem;
}

and in my scss file, I use it like this:

@include font-size(13px);

which compiles to this:

font-size: 13px;
font-size: .813rem;

The validator isn't always right for html5. I'd have to see the error and
evaluate it.

HTH


-- 

Tom Livingston | Senior Front End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | medialogic.com


#663399
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to