css Archive

HTML5 Form Validation

A lot of the attention paid to HTML5 Forms has been centred around the new input types. email, url, date, and the rest are all very convenient, but for me the really useful feature is the built-in validation. In case you’re not aware of it, the browser will now handle all of the validation that we used to use JavaScript for.

This is great for the future, but although you can start using these functions now (in many browsers), they aren’t without their drawbacks – well, one big drawback really. I’m going to explain briefly the problem, and then propose a solution.

Read the full article


Using Media Queries in the Real World

Recently I’ve been working on the new website for my employers, Poke London, which launched last week. One of the things of which I’m proudest is the use of media queries to create a site which is sympathetic to small-screen devices. I learned a lot from developing with media queries, not least of which was the limit of what’s possible with them, so I thought it would be useful to present some of the key lessons learned in this post.

By the way, throughout this post I will refer to the ‘mobile version/site/theme’; I’m aware that’s a loaded term as the site won’t work on many mobile devices, but I’m using it purely as a convenient shorthand for ‘handheld device that supports media queries’.

Read the full article


How We’ll Lay Out Websites In 2016

Last night I had the pleasure of giving a lightning talk – my first public talk – at the London Web Standards meeting. The talk had the title “How We’ll Lay Out Websites In 2016”, and was a look at the three layout modules offered for discussion by the W3C: Flexible Box Layout, Template Layout, and Grid Positioning.

The video is now available to watch (I was concerned that I’d talked too quickly as I was a little nervous, but it doesn’t seem too bad!), and my slides are also online; both are embedded below.

Read the full article


CSS Film Titles – Dr. Nakamats

I just watched a great documentary called The Invention of Dr. Nakamats*, and loved the style of the titles and credits (Vimeo video) by The Ronin. I thought I’d have a go at doing them in CSS, and you can see my first attempt here:

Dr. Nakamats in CSS3.

It uses 3D Transformations so needs to be viewed in Safari for the full effect, but degrades quite gracefully. I had a go at adding some animations to it but it didn’t feel right, so I’ve left that out for now. That aside, I’m happy with the way it looks and it was really easy to make. CSS has come a long way.

* If you’re in the UK you can currently watch this on 4OD.


Flex Box article in .net magazine

I’m very proud to have my second article published in .net magazine this month. It’s an introduction to the Flexible Box Layout module (Flex Box), which is currently implemented in Firefox and WebKit browsers and has made a tentative appearance in some of the platform previews of IE9 (although it was dropped for the Beta).

Update: The article is now available to read online: The CSS3 Flexible Box model explained.

The article was really hard to write, because I had to provide information about a whole new set of properties while providing a tutorial on how to use them. I ran to almost four pages in the magazine but still had to leave a few things out – hence this accompanying blog post.

Read the full article


Using SVG in CSS with JavaScript detection

With the release of IE9 and Firefox 4 all major browsers are going to support using SVG in the img element or as a CSS background image, which is great news as SVG images are good for high definition, scalable websites. I’ve written a couple of posts recently about using SVG with the background-image property, and how to cope with browsers that don’t support it. The method I came up with works, but is far from elegant; for one thing, it doesn’t allow for transparency.

Another approach we can take to the problem is to use JavaScript to detect SVG support. Alexis Deveria wrote a script which detects if your browser supports SVG and, if not, replace the images with PNG. It’s a good script, but I wondered if there was an alternative.

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.