Categories
Technology Web

Opacity returns to IE8

Recovered from the Wayback Machine.

When IE8 beta 1 released, there was a minor uproar at the fact that Microsoft had dropped support for its proprietary version of opacity, while not providing support for the newer CSS-based opacity.

Gone were the days when the following CSS setting would change the opacity of an element in all of the major browsers:

#somediv 
{
  opacity: 0.0; filter: alpha(opacity=0);
}

If you wanted to get opacity to work with IE8, either you’d have to have your users turn on the IE7 compatibility mode, or you’d have to add a meta tag to your web page:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Yesterday, Microsoft released a post on the IEBlog that had both good and bad news. The good news was that opacity was back. The bad news was that setting opacity in such a way that IE8 would process it as IE8 is now more complicated than ever.

It seems that the reason Microsoft pulled the old filter syntax is because the format was not CSS 2.1 compatible. However, according to comments in the post, Microsoft couldn’t just transfer the opacity functionality over to the CSS approach, because the behavior between the two, CSS and Microsoft filter behavior, differs.

Due to the gently incessant requests (!?) of web developers, Microsoft has added back in the opacity filter. However, the company is using the naming convention standardized for browser based CSS extensions, which means it still meets the CSS 2.1 requirements. Where the old, formalized, filter setting looked like the following:

filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0)

Which had illegal characters, including the equal sign, Microsoft now has the following:

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";

Notice the use of the “-ms-” prefix on the filter, and the use of quotes to enclose the setting, and hide the illegal characters.

Of course, for the opacity setting to work with both IE7 and IE8, we have to use both. According to Microsoft, we have to list the new extension format first, and then older setting. This in addition to the CSS opacity setting:

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;

I created a simple example to demonstrate how opacity would work, honoring both formats. It includes setting opacity with JavaScript, and works with Firefox, Safari, Opera, IE8, and as tested with IE7 compatibility mode. Click the image several times to hide one image, and expose another.

theobj.style.filter='progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity + ')';
theobj.style.opacity=value;

The challenge isn’t over yet, though. The images in the first test are JPEGs, but I also tried the example with PNGs with alpha transparency. Unfortunately, IE8 beta 2 supports opacity, but if opacity settings are applied to an image or element containing an image, and the image is a PNG that incorporates alpha transparency, the transparent effect is lost when the opacity is changed.

In older versions of IE, PNG alpha transparency was set with the AlphaImageLoader, like the following:

#div1 img {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=fig0902.png,
sizingMethod='scale');
}

In IE8, which normally would support the PNG transparency, when the opacity filter is changed, the alpha transparency is lost. To compensate, when the containing element’s opacity is changed, the image’s alpha transparency also has to be set in script, as demonstrated in a second example:

document.getElementById("img1").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=fig0902.png,sizingMethod='scale')";

Since the alpha transparency in PNGs is supported with IE8 (and IE7), the CSS setting doesn’t seem to need the new Microsoft extension naming. However, unless the image’s alpha transparency setting is “reset” after changing the opacity, the transparency is lost when the application is run as IE8, as you can see from a third example. Oddly enough, the problem with the alpha transparency on the PNGs doesn’t happen in IE7 compatibility mode. The only thing I can think is more than the name has changed with IE8’s opacity implementation.

Of course, if you use the EmulateIE7 meta tag, you don’t have to muck around with the new opacity extension, or resetting the PNG filter, but you also don’t get the other CSS 2.1 standard settings from IE8.

Categories
Environment Weather

Tales of Ike, and lessons about offshore drilling

We know that Hurricane Ike is going to be the worst when the National Weather Service issues warnings about getting out or face certain death. The winds are a problem, but the real issue is storm surge, and it looks to be unstoppable.

We, in Missouri, are now under a flood watch, because we’ll be finishing with the remnants of Lowell from the Pacific, just as we begin to get hit with Ike from the Gulf. Still, the risk we face is minimal, nothing, compared to what Texans are facing, and Cuba and Haiti have faced earlier.

The oil platforms along the Texas coast have been abandoned, and the refineries closed down. Congress has also had to close so the representatives from Texas and other Gulf states could head home to help. This before the debate on the new “plan” to allow off shore oil drilling.

In the midst of the sadness and despair of the damage this storm has brought, and will continue to bring, we’re faced with the ultimate irony of discontinuing the debate on allowing drilling for oil along the Atlantic coast, because we’re in the middle of a hurricane that has closed down oil drilling along the Gulf coast.

Political irony aside, I hope that the storm surge is not as high, the winds lighter, the walls are stronger, the rain gentle rather than driving. And a reminder that the Red Cross needs volunteers, blood, and money, and not just in Dallas. If you want to help the Haitians and Cubans, the Catholic Relief Services is providing help for both. Unfortunately, that’s all we can do to help Cuba.


I just got a call from my roommate that gas prices are shooting up at least a dollar per gallon this afternoon, and they’re already over $5.00 a gallon across the River from us.

Categories
Political

The political story this week

As of September 12:

  • New heights of stupidity: Glenn Greenwalk maps out the route a ridiculous accusation takes, from propaganda to major media.
  • Election will impact Supreme Court: Buffalo News Op-Ed on choosing the next member of the Supreme Court, and the impact this will have on the land.
  • Canadian Elections 101: A nice introduction to the Canadian election system.
  • Jon Stewart, funny as always, with his version of “Then and Now”.
  • Joe Klein, at Time’s Swampland, has vowed to only cover issues. He begins with a look at McCain’s Health Care Tax Increase, and follows it up with a good look at general tax plans, between both McCain and Obama.
  • The McCain interview. Scary.
  • Video: Republicans and military men on John McCain. Well done video. Very scary message. “He will make Cheney look like Ghandi.”
  • James Fallows on the Palin interview. ‘What Sarah Palin revealed is that she has not been interested enough in world affairs to become minimally conversant with the issues. Many people in our great land might have difficulty defining the “Bush Doctrine” exactly. But not to recognize the name, as obviously was the case for Palin, indicates not a failure of last-minute cramming but a lack of attention to any foreign-policy discussion whatsoever in the last seven years.’

    Actually, no interest in politics, either, because the Bush Doctrine was a point of contention during the Democratic candidate debates, and Obama has referenced it several times when discussing McCain.

    It’s as if Palin has lived in a vacuum for most of her life, where the world consists of Alaska, and “other”.


Senator McCain runs head first into women who aren’t buying his line. Way to go, ladies. However, the event softballed towards the end when Cindy McCain joined the group.


Last update: From last Palin interview: Palin earmarks are “good” earmarks; Obama earmarks are “bad” earmarks. Good, I’m glad that was cleared up for me. I was confused before, and thought earmarks are earmarks.

Categories
Critters

Thank goodness for giant squid

Because otherwise, I would go mad.

Categories
SVG

The hotness that is SVG

There has been considerable discussion this week on Techmeme about weblogging tool as social networking platform, based on Six Apart’s release of Movable Type Pro 4.2. The announcement was still wet from its birth when the WordPress folks started touting BuddyPress, a variation of social networking based on WordPress.

Among the social networking requirements for a weblogging tool are:

  • Support for FriendFeed and other feed aggregation
  • Support for Twitter
  • Forum support
  • Creating user accounts, with profiles and avatars
  • Enabling community-driven content
  • Content voting, ala Digg

I waited for the Drupal folks to tick off each of these, as this type of behavior is already built into Drupal, or provided via plug-in. For instance, support for the just given list can be met by Drupal via the following:

  • Aggregation support is a module included with the Drupal installation. In addition, the FriendFeed Drupal module provides two-way FriendFeed communication.
  • Ditto with the Twitter Drupal Module
  • Forum support is another module included with the Drupal installation, though it doesn’t have a traditional forum look and feel. The upcoming Advanced Forum module supposedly provides the missing pieces for a standalone forum.
  • All of the user functionality is also built-in, or provided as installation module, including adding users, profiles (with avatars), as well as being able to create user profiles with differing permissions. For instance, registered users to this site who I know are given a “Trusted user role” wherein they can post comments without the comment going into moderation. I could also allow users to post photos, in addition to posts of their own — it’s all role-based.
  • You can use the Voting API module with Drupal for content voting, and there have been other efforts to create a Digg-like functionality, though there just doesn’t seem to be much interest in this within the Drupal community.

In fact, Drupal began its life as a bulletin-board system, adding weblogging functionality at a latter time. It is “community-based” from the ground up. Knowing all of these, I watched Planet Drupal for someone to mention about all of this already existing capability in Drupal. And I watched. And I watched.

Nothing. Not a word. Oh, there may be those who are in the process of writing about Drupal’s capability, as compared with the new Movable Type/Wordpress initiatives, but the interest has been more about the upcoming DrupalCon, upgrading to the newest releases, and various other activities; providing yet another demonstration of the differences in communities surrounding Silicon Valley based applications, and an application with beginnings not only outside California, but also outside the United States. Differences that not only don’t include that sense of competition that seems to exist with both MT and WordPress, but that also represent a general lack of interest in becoming part of whatever new movement is currently deemed to be itit for the moment, that is.

(A difference I’ve not, yet, come to absorb, being still imbued with the vestigial impulse to validate my choice of tools by pointing out We are first! We are better!, and hence, my earlier paragraphs. )

However, to be fair to the vast majority of MT and WP users, there isn’t that much communication in the general WordPress or MT communities, either, about the newest social networking “needs” that seem to be the driving force behind these new tool developments. Regardless of tools used, I find it unlikely that most people are interested in much of the social networking capability that is now being touted as “necessary”.

In her post at ReadWriteWeb related to the release of the new version of MT, Sarah Perez asks, Is this the future of blogging? Or is this the future of web publishing altogether? I think we’ll find, ultimately that the answer is no. The Silicon Valley mindset, for wont of a better term, wants social networks, and assumes the rest of must want the same thing. However, I think we’ll find that most of us just want a web that’s both open and accessible, and there is a vast difference between an open web and a social network.

In an open web, we may try to annotate our writings with metadata, so that the information described in this metadata could be merged by other applications. We work to ensure our work is easily accessible, and (though not always), try to engage our readers. We hope that the site is viewable by a variety of devices. To facilitate these interests, we’ve added syndication feeds and comments, some use of microformats, semantic markup, and even, on rare occasion, RDF, and perhaps a feed aggregator or photo feed in the sidebar. We try to create valid web pages, and use CSS to add a little of our own personality to the site’s look. At a stretch, we may include FriendFeed or Twitter postings, too, but I think interest in these is rarer than one would expect by the cacophony of noise that seems to accompany both services.

An open web, however, does not demand a web whereby the line of demarcation between the writer and the reader becomes blurred, and the reader is assumed to not only be reader, but writer, editor, and critic too— becoming one of many, which seemingly are then used to not only prove the popularity of the site, but also help monetize it.

Specifically, the success of our spaces is not a measure of noise but of satisfaction. What’s happened, though, is that to the Silicon Valley mindset, noise is a measure of satisfaction, so the more accouterments enabling noise, the better.

Posting writings and allowing comments are not enough: we must also give people profiles, with avatars and ranking systems, and the ability to vote comments up and down. By providing multiple levels at which our readers can engage, we create that noise that is seemingly so important in order to justify the worth of our spaces. What we’re finding, though, is that based on such activity, the noise level may increase, but it increases as noise, rather than the thoughtful comments that inspired our original interest, years ago.

As we invite the readers to become more involved, we probably will increase the popularity of our sites, but at what cost? We lose the ability to own our own spaces; to be able to suddenly switch one day from writing about HTML5 to writing about art. Even having comments means we give up some control over what we do in our spaces. All too often when I visit tech web sites and the author is writing on some other topic, I read in comments: “That’s not why I read your site, I don’t care about foo. I want to read about bar”? Or the newer complaint many of us have begun receiving since the advent of Twitter: “*This post is too long to read.”

Voting up and down may increase the number of visitors, and they may feel increasingly engaged, but look at what happens at sites like Digg. Though interesting stories may appear in the front page, such as the one about CAPTCHA technology being improved with the help of old manuscripts, many more are based on the amount of controversy associated with the topic, and not whether the topic is useful, or even relevant. More importantly, popular sites proliferate in popularity driven listings while less popular sites are pushed to the back, making it that much more difficult to find not only new and interesting information, but new and interesting sites. The reader becomes not only writer, editor, and critic, but also gatekeeper.

I’m not writing this to be critical of Six Apart’s new Movable Type social networking software, or the upcoming BuddyPress by WordPress—more power to **both groups in working to expand their offerings. To extrapolate, though, from these new offerings to a whole new web is typical of a mindset that is becoming increasingly isolated in how it views the web and how the web should be.

More importantly, to extrapolate one small group’s determination of what’s necessary in order to be “successful”, to the broader population can actively hurt rather than help the web. Do we really want a web without nooks and crannies, small voices, quiet places, and serendipitous finds? That’s not the web I want. To say that we’re all becoming increasingly narcissistic, is to say that one group’s self-obsession is shared by all, and I don’t think that’s true.

*And I include this post among those considered “too long to read”.

**But Drupal was first.