(str)
| 3789 | } |
| 3790 | |
| 3791 | function parseCssInt(str) { // int or percentage. |
| 3792 | if (str.length && str.charAt(str.length - 1) === '%') { |
| 3793 | return clampCssByte(parseFloat(str) / 100 * 255); |
| 3794 | } |
| 3795 | return clampCssByte(parseInt(str, 10)); |
| 3796 | } |
| 3797 | |
| 3798 | function parseCssFloat(str) { // float or percentage. |
| 3799 | if (str.length && str.charAt(str.length - 1) === '%') { |