0

I'm using http://cssbox.sourceforge.net/jstyleparser/ to parse the CSS and the issue is that when i try to save to a file by using rule.toString() the sizes found in the rules (width, padding, etc.. anything with a number) are saved with a decimal.

So for example if in the original CSS file width was 80px now when saving I get 80.0px

Will this be an issue? How do browser treat this?

The size remains the same but it just adds that decimal.

daniels
  • 18,416
  • 31
  • 103
  • 173

1 Answers1

0

It's not a problem. At least IE6+ support decimal values in CSS.

Not related to your question since you have only .0 decimals in your case but a little about using decimal values in CSS in general: If you have something like margin-left: 1.5px; set to an element, it wouldn't make much sense since 1px is the smallest unit on the screen but font-size: 1.5em; would be valid.

Henri Hietala
  • 3,021
  • 1
  • 20
  • 27
  • 1
    Note that a very small padding-top value (say, 0.01px) can be used to stop margins collapsing without any padding actually being rendered. – Alohci Jul 31 '14 at 07:59