css3 Archive

CSS gradient syntax: comparison of Mozilla and WebKit (Part 2)

Update: I wrote this article in 2009. In early 2011 WebKit decided to change their syntax to match that used in Firefox (and the W3C specification). The syntax contained in these articles will be maintained for reasons of backwards-compatibility, but you should use the new syntax for the future. I’ve written a post about the new radial gradient syntax.

In the first part of this post I gave a potted history of the differing syntaxes, and provided an overview of how that affected linear gradients. In this second part I’m going to look at radial gradients.

Here the syntaxes diverge slightly more, with WebKit requiring more values than Mozilla; while that adds some flexibility, it also increases the complexity.

Read the full article


CSS gradient syntax: comparison of Mozilla and WebKit

Update: I wrote this article in 2009. In early 2011 WebKit decided to change their syntax to match that used in Firefox (and the W3C specification). The syntax contained in these articles will be maintained for reasons of backwards-compatibility, but you should use the new syntax for the future.

CSS Gradients were originally proposed by the WebKit team in April 2008, modified from the syntax proposed for the Canvas element of HTML5. In August of this year, Mozilla announced that an implementation slightly modified from that of WebKit would be in the next version of Firefox (3.6).

Since then, however, the CSS WG have discussed a different syntax, and a resolution was passed to add this to the Image Values module. Mozilla have decided to implement the new syntax, which is simpler than WebKit’s but less flexible.

In this article, which will be split into at least two parts, I’m going to compare the two syntaxes.

Read the full article


Firefox supports CSS Transitions

Support for the CSS Transitions module, originally proposed and implemented by the WebKit team, has just landed in the nightly builds of Firefox; it’s unsure whether this will make it into 3.6, as this is due to be released in the near future, but should be a feature in 3.7 at least.

The experimental feature will use the proprietary -moz- prefix; I’ve updated the demos in my previous post, Anime with CSS and WebKit, to reflect this.

After performing some brief tests there seem to be a few problems with the implementation; it’s not as smooth as it could be, and the third demo doesn’t work as it should. Update: Found an issue with the browser not recognising a value without a unit (e.g. 0 instead of 0%); fixed the demo, and filed a bug.


Print-style headlines with CSS 3

I was admiring the layout of a front page splash of a newspaper supplement yesterday, and realised that with (some) modern browsers we can replicate the effect using CSS alone. I’ve knocked together a quick demo using the transform property which is available in Firefox 3.5 and Safari 4.

The best thing about it is that it uses only a single block-level element, so nicely degrades to a heading only.

Read the full article


New background rules in Firefox 3.6

The latest alpha release of Firefox 3.6 (3.6a1) contains some new rules for providing backgrounds to elements: multiple background images, background-size, and an implementation of the Webkit gradient proposal (modified from the original – more on that later).

I’ve put together a very rough demo of what you can do with these new rules; you’ll require a recent build of Firefox 3.6 or Webkit to view it. Try resizing the window to different dimensions, and see how it changes.

Here’s an explanation of how I did it:

Read the full article


HTML 5, CSS 3, DRM & fonts

I’m at home with the flu at the moment, so taking the opportunity to un-star some items in Google Reader; this post is a link-dump with a little added comment.

A few of them have been in my favourites for a couple of months, so apologies if you’ve seen them already.

Read the full article


Newer | Older

Aside

I’ve updated my Speaking page to include more conferences, more videos, and a little on my speaking requirements and preferences. I’m planning to cut down on the number of talks I give in 2014 (twelve is too many), but am always open to interesting offers and opportunities, so please get in touch if you’re organising an event.

[#] 1 Comment . More Asides.