When people say they’re disappointed about the new iPhone, what they’re really saying is that they’re disappointed it doesn’t look that much different from previous version(s). But again, not only is that true, Apple went out of their way to make sure that was the case.
Using homebrew to install open source software on Lion via How to install Apache, PHP and MySQL stack on MacOS Lion.
This post on CSS calc() on HTML5Rocks got me thinking about how I could use calc() and have it work cross browser. Calc() will be a valuable feature in CSS3 once it is supported. The biggest thing it allows you to do is mix percentage and absolute values as well as mix sizing units.
The biggest problem with calc() right now is that it is not well supported. Firefox supports it with the ‘-moz-‘ prefix, and Chrome will add support in version 19 with the ‘-webkit-‘ prefix. IE9 has support for it, un-prefixed. Because of the vendor prefixes, I’m guessing for now, cross browser syntax would look something like this.
width: -webkit-calc(50% - 100px);
width: -moz-calc(50% - 100px);
width: calc(50% - 100px);
In the above example, I provided a fallback for older browsers first, followed by the 2 vendor prefixed versions and finally the un-prefixed version. See the gist here.
While thinking about using calc(), I wondered if Modernizr had a test for it. I was sure it must but discovered that it did not. While it looked like someone tried to add a test, it was missed. So I contacted Paul Irish and asked him about it, and he worked with the original developer to add the test. You can now run the test in Modernizr to see if it is supported and write different CSS rules based on that. But you still need to provide and fallback and use the vendor prefixes.
It also got me wondering about how calc() would work in a language like Sass. I’m assuming you would just write it out and it would work, but since Sass has it’s own method for doing calculations, it’s worth exercising caution.
I can’t wait until we are able to use calc() to calculate values in CSS. It’s the first step to being able to use something like Sass in the browser. But until it is well supported, it requires you to write multiple rules. If you are opposed to that, you should stick with Sass or Less which do the calculations and conversion for you.
Firefox is forward thinking.
Firefox 3.6 was released on January 21, 2010. They also announced that the minimum supported Windows version will change to Windows XP SP2 in Firefox 13.
If you are familiar with concept of Responsive Web Design, you should also understand fluid layouts. Sass, the CSS pre-processing language, has a few features to assist you with calculating values for fluid layouts.
This tutorial shows you how to calculate percentages with the percentage function in Sass and also how to write a custom function in Sass to convert pixel values to ems.
You should be using Sass already because it supports variables, functions and nesting. But if you’ve been holding out for some reason, now you have another reason to use it. This is the future of CSS.
Mozilla finally came to their senses and realized if they want Firefox to be relevant it has to be on mobile phones, and it has to support H.264 video.
What I do know for certain is this: H.264 is absolutely required right now to compete on mobile. I do not believe that we can reject H.264 content in Firefox on Android or in B2G and survive the shift to mobile.
0to255 is a simple tool that helps web designers find variations of any color.
Firefox 11 was released on March 13, 2012.
A very interesting resource I came across last night,
We hope we can illuminate why W3Schools is a troublesome resource, why their faulty information is a detriment to the web, and what you (and they) can do about it.
To filter out w3schools from your searches, add -w3schools. Meanwhile, to get results from the Mozilla Docs Center, just prepend mdc.
Google might even take notice of behavior like that and demote these sites in the rankings.