Status message

News in the CSS category

CSS

New poll! Just for funzies. Do you prefer...

Light Code on Dark Background

Like this:

or...

Dark Code on Light Background

Like this:

Those are just examples. Doesn't have to be those exact syntax highlighting themes. But I believe all themes fall into those two categories.

New Poll: Light on Dark or Dark on Light? is a post from CSS-Tricks

CSS

The following is a guest post by Ben Terrill. Ben is co-author of the e-book Tablet Web Design Best Practices and is the VP of Customer Success at Mobify, where he works on big client sites like British Telecom, Starbucks and Expedia.

The tablet revolution is upon us. New data from Adobe shows that global websites now get more traffic from tablets than smartphones. And yet, a standard desktop site doesn’t work very well on a tablet. The typical desktop 12-pixel font is too small, as...

CSS

Jackson Fox presents some of the options: slide them out of the input, slide them to the right, or move them to tooltips. All to battle the issues with in-input labels like user confusion and lack of context when focused. I had an idea once too.

Direct Link to Article — Permalink

Making Infield Form Labels Suck Less is a post from CSS-Tricks

CSS

In early 2008, I asked the question:

What is your opinion as to the web designers role in mobile design?

The two choices were:

It is my job to make sure the website looks and functions well on mobile devices. It is the mobile device's job to make sure my website looks and functions well.

Back then, 55% thought it was the mobile devices job. The vibe was more "I'm just gonna keep building websites how I have been and these new devices can handle making them work."...

CSS

A big collection of books on JavaScript that are published free on the web.

Direct Link to Article — Permalink

JSbooks is a post from CSS-Tricks

CSS

The following is a guest post by Kevin Foley. Kevin is a developer at Squarespace doing cool stuff with their developer platform, among other things. He was recently working on a swipeable image gallery and he agreed to share some of that work here!

A few weeks ago Chris posted a tutorial for creating a Slider with Sliding Background Images. Around the same time I was working on some new swipeable galleries, so Chris suggested I write up a tutorial for how to add swipe support to his...

CSS

Conditional comments are gone in IE 10. That's good. IE 10 is a very good browser. Feature detection is a better way to go in nearly all cases. But what if you find some styling situation where you absolutely need to target IE 10? I guess you'll have to do this.

Rogie posted a really simple idea a while back that should still work great for this. Add the User Agent to the <html> element with a tiny bit of JavaScript:

var doc = document.documentElement; doc....
CSS

It's kinda like a preprocessor (variables, prefixing...) but it can do much more because it's JavaScript that executes on your page. For instance, it can give you a has selector which can test if an element contains another element or selectors that select based on simple math logic (e.g. :-math-greatest(data-price)).

Direct Link to Article — Permalink

Need a new look for your portfolio? Check out the Snap WordPress theme from The Theme Foundry. Sass files and...

CSS

The following is a guest post by Parker Bennett where he explores some different ways to approach the behavior of fluid and responsive images.

Sometimes you want an image to resize responsively but restrict its height — cropping it then as it widens. Here, we explore three options with various trade-offs.

The happy couple, front and center: background-position: center bottom. Option One: background-image

Edit on CodePen

Here, in place of an <img...

CSS

Hover Maester Jenn Lukas sent me a link to PizzaTime.com. We agreed that 1) those are some pretty neat hovers! and 2) it's pretty cool that there is a quality website at all at a domain like PizzaTime.com - in which that she typed in randomly hoping there would be.

They have a set of navigational boxes that look like this:

Then they go through a neat multi-step transitional thing to essentially turn red:

The red square that the icon is in expands left/right to...

CSS

A new tool by Alex Duloz to help create custom builds of popular libraries and frameworks. Alex made builders for Twitter Bootstrap, underscore.js, HTML5BP and inuit.css - but it can be used to create custom builds for anything.

Direct Link to Article — Permalink

Need a new look for your portfolio? Check out the Snap WordPress theme from The Theme Foundry. Sass files and Compass config are included!

picnicc is a post from CSS-Tricks

CSS

Jake Archibald put together an interesting and informative quiz about when browsers actually make requests. I learned a bunch. Some of it might seem like quirky academic knowledge but we all know how often unpredictably weird situations come up in day to day dev work.

Jake wished me to point out that it is unfinished (only works on desktop Chrome) and might hurt your feelings if you can't take browser insult jokes.

Direct Link to Article — Permalink

Need a new...

CSS

A script from Andi Smith that injects a chart of browser support with live data from Can I Use... I really like the idea of using it on any web tech blog post - so the information about feature support stays up to date over time. I think I'll be incorporating it into this site when I get a chance.

Alexis Deveria is cool with it.

It hits a JSON file at raw.github.com through YQL for the data. I wonder if there is a good way to cache it locally (localStorage?) so GitHub doesn't...

CSS

John Allsop uses an old iMac and the browser to snap a picture through a web cam and then email it when it detects movement.

Direct Link to Article — Permalink

Need a new look for your portfolio? Check out the Snap WordPress theme from The Theme Foundry. Sass files and Compass config are included!

Build a motion activated security camera, with WebRTC, canvas and Device Orientation is a post from CSS-Tricks

CSS

There used to be just one way to do a timed loop in JavaScript: setInterval(). If you needed to repeat something pretty fast (but not as-fast-as-absolutely-possible like a for loop), you'd use that. For the purposes of animation, the goal is sixty "frames" per second to appear smooth, so you'd run a loop like this:

setInterval(function() { // animiate something }, 1000/60);

There is a better alternative to this now. Paul Irish introduced requestAnimationFrame over two years ago. I...

CSS

calc() is a native CSS way to do simple math right in CSS as a replacement for any length value (or pretty much any number value). It has four simple math operators: add (+), subtract (-), multiply (*), and divide (/). Being able to do math in code is nice and a welcome addition to a language that is fairly number heavy.

But is it useful? I've strained my brain in the past trying to think of obviously useful cases. There definitely are some though.

Can't Preprocessors Do...
CSS

Patrick Kunka demos how fluid grids can be created with percentage widths and justified text. I like it because you don't need to think about gutter calculations which is what really complicates grids. If you need specific control over gutters, Don't Overthink It Grids might help.

Direct Link to Article — Permalink

Grids with text-align: justify is a post from CSS-Tricks

CSS

With more people than ever writing in Sass, it bears some consideration how we format it. CSS style guides are common, so perhaps we can extend those to cover choices unique to Sass.

Here are some ideas that I've been gravitating toward. Perhaps they are useful to you or help you formulate ideas of your own.

Use Your Regular CSS Formatting Rules / Style Guide

This post is about Sass-specific stuff, but as a base to this, you should follow a whatever good CSS formatting...

CSS

The following is a guest post by Alexander Futekov. We recently published an article by Joshua Bader in which a 3D inset look was adjusted as the page scrolled to give it a more realistic interaction. This is similar only Alexander is using an extruded look on buttons and employing a totally different technique.

The introduction of CSS3 resulted in the explosion of beautiful and interesting buttons, styled with gradients, shadows, and borders - often to achieve a 3D effect....

CSS

The ultimate primer on web type for web developers by Jessica Hische.

Direct Link to Article — Permalink

jQuery Conference Portland 2013 has a limited number of regular tickets still available. Two days. Two tracks. Fresh speakers. Jun 13-14. $50 off for members of the jQuery Foundation. Join today and get your first year of fan dues paid for with purchase of both a training and conference ticket. Training provided by Bocoup on Jun 12. Use coupon code...

CSS

So you want to make the background of your website red eh? You'll probably put this in your CSS:

body { background: red; }

Done!

Check out this Pen!

You're going about your business and then all the sudden one day this happens:

Check out this Pen!

What in the heck? Why is the red cut off like that? I put red as the background color on the body?

You did, but the fact that that red color floods the background is just a strange anomaly of CSS. The body...

CSS

I always wanted to write something on all the technologies that a website relies on in order to have been created and work. My attempts have so far failed because it spirals out of control so quickly. Kevin Kelly sums it up:

A web page relies on perhaps a hundred thousand other inventions, all needed for its birth and continued existence. There is no web page anywhere without the inventions of HTML code, without computer programming, without LEDs or cathode ray tubes, without solid...

CSS

Just in case you have brain farts about this constantly like I do.

If

That's what media queries are: logical if statements. "If" these things are true about the browser, use the CSS inside.

And

The keyword and.

@media (min-width: 600px) and (max-width: 800px) { html { background: red; } } Or

Comma separate.

@media (max-width: 600px), (min-width: 800px) { html { background: red; } }

Technically these are treated like to separate media queries, but that...

CSS

I'll be speaking at the upcoming Front End Design Conference in Florida. If you have tickets, see you there! If not, sorry, this one is sold out.

I recently spoke at TXJS, and they recorded the talks, so mine and a bunch of others are available on their Vimeo channel.

Next week I head out for Graves Mountain, as I do every year. So this week I'm planning for that, both getting ready for it as well as getting ready to be unplugged for the week.

ShopTalk is going strong...

CSS

Is an open-source app modeled after CodeKit. Prepros runs on Windows where CodeKit is Mac only. From people who have tried it, it seems good.

Direct Link to Article — Permalink

Prepros is a post from CSS-Tricks

Pages

Switch theme

Random theme

Welcome to the Drupal 7 Theme Gallery

Drupal 7 Theme Gallery is a place for you to view demonstrations of the free contributed themes available for Drupal 7.

All the themes shown on the site are available from http://drupal.org

The theme gallery is a free resource provided by Ruby Design

You can change the theme used to display the site by either:

  • Use the theme switch dropdown selector
  • Find a theme using the theme gallery and click the preview link
Ruby Design