SmoothFriction.nl

posts - 39, comments - 20, trackbacks - 0

localization

localization
The importance of specifying your locales

Lately I’ve run into several bugs which were caused by developers incorrectly assuming that the default locale settings were good enough for parsing a value. I’ll show you what I mean. Case 1 Consider the following snippet: .something { width: 21.4em; } This is a simple CSS rule, making all elements with class ‘something’ have a width of 21.4em. In .Less, we parsed this without an explicit locale. The output would only show 21em, truncating the value from the implied decimal separator onwards. Once we set the locale to Invariant (who needs specific locales in CSS?),...

posted @ Saturday, November 21, 2009 1:24 AM | Feedback (0) | Filed Under [ general localization ]