SolarizedPrecision colors for machines and people
Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It has several unique properties. I designed this colorscheme with both precise CIELAB lightness relationships and a refined set of hues based on fixed color wheel relationships. It has been tested extensively in real world use on color calibrated displays (as well as uncalibrated/intentionally miscalibrated displays) and in a variety of lighting conditions.
See the changelog for what’s new in the most recent release.
Currently available in formats for (cf screenshots below):Editors & IDEs
Terminal Emulators
- Xresources / Xdefaults
- iTerm2
- OS X Terminal.app
- Putty courtesy Brant Bobby and on GitHub
Other Applications
Palettes
- Adobe Photoshop Palette (inc. L*a*b values)
- Apple Color Picker Palettes
- GIMP Palette
Don’t see the application you want to use it in? Download the palettes (or pull the values from the table below) and create your own. Submit it back and I’ll happily note the contribution and include it on this page. See also the Usage & Development section below for details on the specific values to be used in different contexts.
Download
Current release is v1.0.0beta2. See the changelog for details on what’s new in this release.
Fresh Code on GitHub
You can also use the following links to access application specific downloads and git repositories:
Note that through the magic of git-subtree these repositories are all kept in sync, so you can pull any of them and get the most up-to-date version.
Features
Selective contrast
On a sunny summer day I love to read a book outside. Not right in the sun; that’s too bright. I’ll hunt for a shady spot under a tree. The shaded paper contrasts with the crisp text nicely. If you were to actually measure the contrast between the two, you’d find it is much lower than black text on a white background (or white on black) on your display device of choice. Black text on white from a computer display is akin to reading a book in direct sunlight and tires the eye.
Solarized reduces brightness contrast but, unlike many low contrast colorschemes, retains contrasting hues (based on colorwheel relations) for syntax highlighting readability.Both sides of the force
I often switch between dark and light modes when editing text and code. Solarized retains the same selective contrast relationships and overall feel when switching between the light and dark background modes. A lot of thought, planning and testing has gone into making both modes feel like part of a unified colorscheme.16/5 palette modes
Solarized works as a sixteen color palette for compatibility with common terminal based applications / emulators. In addition, it has been carefully designed to scale down to a variety of five color palettes (four base monotones plus one accent color) for use in design work such as web design. In every case it retains a strong personality but doesn’t overwhelm.Precision, symmetry
The monotones have symmetric CIELAB lightness differences, so switching from dark to light mode retains the same perceived contrast in brightness between each value. Each mode is equally readable. The accent colors are based off specific colorwheel relations and subsequently translated to CIELAB to ensure perceptual uniformity in terms of lightness. The hues themselves, as with the monotone *a*b values, have been adjusted within a small range to achieve the most pleasing combination of colors.See also the Usage & Development section below for details on the specific values to be used in different contexts.
This makes colorscheme inversion trivial. Here, for instance, is a sass (scss) snippet that inverts solarized based on the class of the html tag (e.g. <html class="dark red"> to give a dark background with red accent):
$base03: #002b36; $base02: #073642; $base01: #586e75; $base00: #657b83; $base0: #839496; $base1: #93a1a1; $base2: #eee8d5; $base3: #fdf6e3; $yellow: #b58900; $orange: #cb4b16; $red: #dc322f; $magenta: #d33682; $violet: #6c71c4; $blue: #268bd2; $cyan: #2aa198; $green: #859900; @mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3) { background-color:$rebase03; color:$rebase0; * { color:$rebase0; } h1,h2,h3,h4,h5,h6 { color:$rebase1; border-color: $rebase0; } a, a:active, a:visited { color: $rebase1; } } @mixin accentize($accent) { a, a:active, a:visited, code.url { color: $accent; } h1,h2,h3,h4,h5,h6 {color:$accent} } /* light is default mode, so pair with general html definition */ html, .light { @include rebase($base3,$base2,$base1,$base0,$base00,$base01,$base02,$base03)} .dark { @include rebase($base03,$base02,$base01,$base00,$base0,$base1,$base2,$base3)} html * { color-profile: sRGB; rendering-intent: auto; }See also the full css stylesheet for this site.
Installation
Installation instructions for each version of the colorscheme are included in the subdirectory README files. Note that for Vim (and possibly for Mutt) you may want to clone the specific repository (for instance if you are using Pathogen). See the links at the top of this file.
Font Samples
Solarized has been designed to handle fonts of various weights and retain readability, from the classic Terminus to the beefy Menlo.
Clockwise from upper left: Menlo, Letter Gothic, Terminus, Andale Mono.
Preview all code samples in specific font faces by selecting a link from this list:
Screenshots
Click to view.
Mutt
C (Vim)
Haskell (Vim)
HTML (Vim)
Java (Vim)
Javascript (Vim)
Pandoc Markdown (Vim)
These screen shots show Vim running with my own Pandoc Kit Syntax.
Perl (Vim)
PHP (Vim)
Python (Vim)
Ruby (Vim)
Shell (Vim)
TeX (Vim)
The Values
L*a*b values are canonical (White D65, Reference D50), other values are matched in sRGB space.
SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB --------- ------- ---- ------- ----------- ---------- ----------- ----------- base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46 base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51 base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93 base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60Usage & Development
If you are considering developing a port for Solarized, please see also the developer notes for information about optional repository structure and readme formats.
Solarized flips between light and dark modes. In each mode, four monotones form the core values (with an optional fifth for emphasized content).
Thus in the case of a dark background colorscheme, the normal relationship for background and body text is base03:base0 (please note that body text is not base00). Note also that in cases where the background and foreground can be specified as a pair value, text can be highlighted using a combination of base02:base1. The L*a*b lightness difference between base03:base0 and base02:base1 is identical by design, resulting in identical readability against both normal and highlighted backgrounds. An example use case is folded text in Vim which uses base02 for the background and base1 for the foreground.The values in this example are simply inverted in the case of a light background.
jQuery.PercentageLoader is a jQuery plugin for displaying a progress widget
in more visually striking way than the ubiquitous horizontal progress bar / textual counter.
Installation and use is quick and simple. It makes use of HTML 5 canvas for a rich graphical appearance
with only a 10kb (minified) javascript file necessary (suggested web font optional), using vectors rather than
images so can be easily deployed at various sizes. It is open source (BSD licensed) and available
with instructions on BitBucket [here] or you can just grab the files [here]Controllable
It's also possible to use the percentage loader as a controller - try clicking and dragging on the widget. You can pass in a callback function to the widget to capture the new value as the user updates the widget (notice the bidirectional communication between the jQuery UI slider beneath the loader).
Multiple
run loadersYou can easily run multiple loaders simultaneously.
back to top
This demo also demonstrates how the loader appears at a smaller size.
File Upload widget with multiple file selection, drag&drop support, progress bars and preview images for jQuery.
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
Icons Guide helps you to find the best stock icons shop you are looking for. Here is a list of all major high-quality icon shops to compare their offers at one place.
A modern, HTML5-ready alternative to CSS resets
Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. We researched the differences between default browser styles in order to precisely target only the styles that need normalizing.
What does it do?
- Preserves useful defaults, unlike many CSS resets.
- Normalizes styles for a wide range of HTML elements.
- Corrects bugs and common browser inconsistencies.
- Improves usability with subtle improvements.
- Explains what code does using detailed comments.
How do I use it?
Normalize.css is intended to be used as an alternative to CSS resets. It's suggested that you read the normalize.css file and consider customising it to meet your needs. Alternatively, include the file in your project and override the defaults later in your CSS.
Who uses it?
Twitter Bootstrap, HTML5 Boilerplate, Rdio, GOV.UK, iA, CSS Tricks, and many others.
Browser support
Chrome, Firefox 3+, Safari 4+, Opera 10+, Internet Explorer 6+
Source code
Available on GitHub: necolas/normalize.css
$ git clone git://github.com/necolas/normalize.css.gitAcknowledgements
Normalize.css is a project by Nicolas Gallagher (@necolas) and Jonathan Neal (@jon_neal).
Detailed information on default UA styles: WHATWG suggestions for rendering HTML documents, Internet Explorer User Agent Style Sheets and CSS2.1 User Agent Style Sheet Defaults
Since our last round-up of useful CSS techniques, we’ve seen a lot of truly remarkable CSS geekery out there. With CSS3, some of the older techniques now have become obsolete, others have established themselves as standards, and many techniques are still in the “crazy experimentation” stage.
Since the release of the previous post, we’ve been collecting, sorting, filtering and preparing a compact overview of powerful new CSS techniques. Today we finally present some of these techniques. Use them right away or save them for future reference.
Please note that many techniques are not only CSS-based, but also use HTML5 and JavaScript. We are going to present useful CSS tools and responsive design techniques in separate posts. Please don’t hesitate to comment on this post and let us know how exactly you are using them in your workflow. However, please avoid link dropping; share your insight and experience instead, and feel free to link to techniques that really helped you recently. Thanks to all of the featured designers and developers for their fantastic work!
Table of Contents
- CSS Transitions and Animations
- Useful and Practical CSS Techniques
- CSS Typography and Text Techniques
- CSS Navigation Menus and Hover Effects
- Visual Techniques With CSS
CSS Transitions And Animations
CSS transitions and animations are often used to make the user experience a bit more smooth and interesting, especially when it comes to interactive effects on hover or on click. Designers are experimenting with technology and create sometimes crazy, sometimes practical—but often innovative techniques which you could use to make your websites just a tiny bit more engaging.
Interactive CSS3 lighting effects
An interesting effect to create interactive lighting effects with 3-D transforms, CSS gradients and masks; the cast shadow was created using box shadows and transforms.CSS3 dodecahedron
A fancy dodecahedron experiment, created using CSS Transforms and a tiny JavaScript snippet.CSS 3D Lighting Engine Photon
Our editor Tom Giannattasio has created a JavaScript library that adds simple lighting effects to DOM elements in 3D space using the WebKitCSSMatrix object. It would be great to have an implementation for other rendering engines as well.3D Thumbnail Hover Effects With CSS
This technique produces 3D thumbnail hover effects with CSS 3D transforms. The code is quite verbose and probably could be optimized, but the effect is quite neat.Slide In Image Boxes
A technique for creating a “slide in” effect for boxes on hover to make them a bit more interactive.CSS3 bitmap graphics
The bitmap graphics is rendered with CSS: no images, no canvas, no data URIs and no extra markup. The pixels are drawn with CSS gradients, sized precisely to the pixel’s boundaries.Paperfold CSS
A visual folding effect for hidden comments by Felix Niklas. The plugin takes a DOM element, slices it into parts and arranges them like a folded paper in 3-D space.Beercamp: An Experiment With CSS 3D
A CSS 3D popup book á la Dr. Seuss. The website was a test to see how far SVG and CSS 3D transforms could be pushed. This is the article about it.Covers: A JS / CSS Experiment
Now, that’s quite an experiment: what if we combined a music song, stylesheet and beat detector to create animated… covers? Sure, we can do it with CSS3 and JavaScript! Covers does exactly that. The result is interesting, what can you do with this approach?Animation on Apple’s page
John B. Hall explains the CSS animation on Apple’s Web page for the iPhone 4S.Experimental animations for image transitions
A post about experimental 3-D image transitions that use CSS3 animations and jQuery. Only CSS3 transforms are used.Maintaining CSS style states using “infinite” transition delays
This demo allows you to move the character around with the D-pad, and notice how it always keeps its position after you stop moving. This demo doesn’t use any JavaScript. The effect is made possible by using a virtually infinite transition delay, so that the CSS rules never return to their default state. The figure will be stuck in a transition and will move only when you hold down a button.CSS 3-D clouds
An experiment in creating 3-D-like clouds with CSS3 transforms and a bit of JavaScript.Animated popover of profile box
A technique for an animated profile popover menu, built using CSS transitions.CSS3 scrolling effects
A library of various scrolling effects, such as curl, wave, flip, fly, skew and helix, created with CSS3 and sometimes with JavaScript to spice up the scrolling behavior.Spin those icons with CSS3
A simple technique for creating a neat effect that spins social icons with the help of a transform and transition when you hover over them. By Tom Kenny.Scrolling the Z Axis with CSS 3D Transforms
This article explains how to create the z-scroll effect step by step.Useful and Practical CSS Techniques
CSS3 Family Tree
Display organizational data or a family tree using just CSS, without Flash or JavaScript. The markup is very simple and uses just nested lists. Pseudo-elements are used to draw the connectors. It also has hover effects: hover over a parent element and the entire lineage will be stylized. Make sure to check Nicolas Gallagher’s Introduction to CSS Pseudo Element Hacks.iOS-style popover
A simple technique for iOS-style custom checkboxes and a subtle hover effect. The technique is a bit buggy but a good starting point in case you need it. Also, check an excerpt from Lea Verou’s talk on customized checkboxes and her article on rule filtering based on specific selector(s) support.Timeline-Style Comments
Nicolas Gallagher developed a simple and clean technique to present comments in a timeline-alike overview.CSS Table Grid
Here is a nice technique for aligning columns in a table, building a “table grid system” of sorts. The idea is to apply classes to col elements in a table’s colgroup; you always leave one col without a class so that it remains fluid and can “soak up” the effects of any breakages elsewhere in the table.Confirmation Feedback Buttons
This article explains how to create buttons that take on different states depending on the user’s interaction. This type of interaction is especially useful on links such as “Purchase” and “Delete” for which it’s wise to confirm that the user indeed wants to take the specific action. It looks too much like an iTunes button, though.A calendar in CSS3 and jQuery
A step by step tutorial on how to create a CSS3 calendar with some jQuery animation. Also, check out David Bushell’s responsive calendar demo.Outdenting properties for debug CSS
Let’s assume you are experimenting with CSS or debugging code. You add properties to figure out how things fit together. How often do you forget to remove all of them? A simple technique for this is to mark a CSS property as a temporary or debugging property by outdenting it and putting it at column 0 in the file. A small trick that can save a lot of time.Show Markup in CSS Comments
Chris Coyier discusses the idea of including the basic markup that you will be styling as a comment at the top of your CSS file.Selectively displaying data
This technique shows how to selectively display content in a table and add responsive breakpoints to create an responsive, complex multi-column table.Remove Margins for First/Last Elements
If you ever wanted to remove the top or left margin from the first element in a container, or the right or bottom margin from the last element in a container, you can do this by using pseudo-selectors :first-child and :last-child.CSS Diagnostics Stylesheet
A very useful snippet to have nearby when you are debugging your CSS or want to find mistakes in HTML.Radio Buttons With Two-Way Exclusivity
Learn about the :empty pseudo-class selector and jQuery to ensure that when a radio button is clicked, the area is determined and all other radio buttons in that column are turned off, and then is turned back on when clicked on.Tabbed Navigation With CSS
An elegant tabbed navigation menu with drop-down menus — no JavaScript, of course. Nothing new, but it’s a quite clean solution.Menu With Notification Badges With CSS
A ready-to-use snippet for a navigation menu with notification badges.Styling based on sibling count (slides)
A fantastic overview of the possibilities for styling based on sibling count. Also, make sure to click through the rest of the slide deck — valuable and useful techniques. Make sure to watch Lea Verou’s presentation as well.Stuff you can do with the “Checkbox Hack”
Wiht the “checkbox hack,” you use a connected label and checkbox input and usually some other element that you are trying to control. Learn what you can do with it.CSS3 Facebook Buttons
Nicolas Gallagher presents a set of CSS buttons for Facebook with different colors and icons. You might want to check Nicolas’ CSS3 Social Sign-In buttons as well as Free Social CSS3 Buttons that we released earlier as well.YouTube Popup Buttons
This article explores the default state of YouTube buttons, which have a very subtle bevel but pop up on :hover and :focus states, eager to be clicked.Centering in the Unknown
When it comes to centering things in Web design, the more information you have about the element being centered and its parent element, the easier it is. Chris Coyier shows how to do it when you do not know anything.Uncle Dave’s Ol’ Padded Box
What if you combined background-size: cover and Thierry Koblentz’ intrinsic ratios. The result is images and video than maintain their aspect ratio; but you can also use background-size: cover to change the aspect ratio and auto-cropping of images with just a little CSS. And the great news is that the property is supported in all modern browsers and matches media-query support exactly.Micro Clearfix: Force Element To Self-Clear its Children
Chris Coyier presents various technique for forcing elements to self-clear its children, including Nicolas Gallagher’s short code snippet from 2011.Conditional CSS
A clever technique by Jeremy Keith to load additional content conditionally. The idea is that once a media query fires, the content on the body element is generated and can be detected by a JavaScript, prompting extra content to be loaded.* { box-sizing: border-box } FTW
Once you start mixing and matching various units in CSS — such as % for the container width, em for padding and px for border — then you run right into the box-model problem because the width of the container doesn’t include padding and border. We can easily solve this using box-sizing: border-box. And the best part: it is even supported in IE 8.Multiple Attribute Values
How to treat multiple values in attributes rather than classes.Diagonal CSS Sprites
If you build a sprite on a diagonal, there will be no components below or to the right of the component you are showing. This allows you to make the element using the sprite as wide or as tall as it needs to be, without worrying about exposing the next component. Also, check out David Storey’s article on CSS sprites for the moder era.Double Click in CSS
Is there a way to detect whether a link is tapped or double-clicked on mobile devices? In fact, we can. However, the code requires some hardcore CSS nerdery. Also, check Pure CSS Clickable Events Without :target by Ryan Collins.Replacing the -9999px hack (new image replacement)
In the beginning was FIR (Fahrner image replacement). Scott Kellum, design director at Treesaver, has now developed this refactored code for hiding text.Fighting the Space Between Inline Block Elements
A series of inline-block elements formatted like you would normally format HTML will have spaces between them. But we often want the elements to butt up against each other, thus avoiding in the case of navigation) those awkward little unclickable gaps. How do you solve it? Chris Coyier has found a couple of solutions.CSS pointer-events and a pure CSS3 animating tooltip
The pointer-events property allows you to specifiy how the mouse interacts with the element it is touching. See what you can do with it and what to consider when using them.Anatomy of a mobile-first responsive Web design
An excellent article by Brad Frost about the different considerations for responsive designs. How do you start? What features would you implement and how? What about advanced optimization such as LocalStorage or AppCache? This article provide an excellent guide for getting started with future-friendly responsive designs.SouthStreet Progressive Enhancement Workflow
A fantastic article by Scott Jehl and Filament Group in which they present a set of tools that form the core of an advanced responsive design workflow. Definitely useful to keep in mind for your next responsive design project.Typography And Text With CSS
Advanced CSS techniques provide us with remarkable options to style text in very different ways. Not only can we make the typography look sharper and beautiful on the Web with tools such as Lettering.js, Kerning.js and FitText; we can also play with glyphs, line breaks, font sizing, truncating text and styling lists. The typography can be adjusted and improved with just a couple of practical approaches.
Interactive Typography effects with HTML5
This techniques uses canvas and JavaScript to create ab interactive typography effect. Users can interact with the glyphs and as designer you can define forms or shapes of the word you’d like to present and how you’d like them to change on hover. Fancy!Rocking letters with CSS3 and jQuery
A simple animation of letters with CSS3 and jQuery.CSS 3D Typography
What about integrating stripes into glyphs and adjust the shadow on hover? This technique uses just that, creating a nice, subtle yet engaging visual effect. You can find more interesting type experiments in CSS3type Showcase.CSS3 animation and masking text
Chandler Van De Water had a challenge for Trent Walton after seeing the header animation in his “CSS3 in Transition” post. Noticing that he used a PNG image file with knockout transparency, he wanted to do the same CSS animation with selectable text. Trent was happy to oblige! At the moment, this works only in Safari and Chrome.CSS mask-image and text
Trent Walton uses background-clip: text and mask-image to implement a subtle gray-flecked texture effect over white text. Hover over the box to see how it degrades in unsupported browsers. Make sure to check out Lea Verou’s “Text Masking: The Standards Way” as well.Fake bolding of Web fonts
Most browsers simulate bold weights for fonts that do not actually have bold weights. For example, Helvetica Neue Light does not have a bold weight. If you used font-weight: bold with it, browsers would artificially create a bold weight. This article explains how to avoid fake bolding of Web fonts in your designs. By Divya Manian.Tomorrow’s Web type today: Say it With a Swash
The excellent series “Tomorrow’s Web type today” by Elliot Jay Stocks provides insights into what will be possible with Web typography soon, e.g. swashes. In fact, you can already use them today if you include a swash subset of a font to achieve the desired effect.Internationalization Language CSS
A very handy CSS nippet with language-specific quotes. Perfect for international, multilingual projects.Experiments with background-clip: text
With the CSS property background-clip: text, we can add a background image to a text element.A Call for ::nth-everything
With CSS3, we have positional pseudo-class selectors to help us select a particular element when it has no distinguishing characteristics other than where it is in the DOM in relation to its siblings.Smooth font using the text-shadow property
A common problem: is there a way smooth the appearance of glyphs on older machines, especially Windows XP (standard / ClearType rendering mode)? Yes, perhaps. You can give a try the text-shadow-property which adds text-shadow on the top-left and the bottom-right to smooth text.Fluid Type
Trent Walton explains his approach to fluid typography in which he asks himself how we can make sure that browser width and typographic settings such as measure or font-size and how should we handle panoramic viewports? An interesting article, especially if you use a typography-out approach in your designs.Pragmatic, practical font sizing in CSS
Harry Roberts shares his thoughts on how to size fonts more efficiently, writing your CSS differently in the process.Automatic line breaks with CSS3 hyphens and word-wrap
Roger Johansson shows how to solve a common problem: as columns of text become narrower, the risk of a single word being longer than the column’s width increases. When that happens, the text normally extends beyond the column. Luckily, CSS offers two properties to improve the situation: word-wrap and hyphens.Molten leading (or fluid line height)
When a responsive composition meets a viewport, there are different ways to fill space. Adjusting any one element without also adjusting the others is a recipe for uncomfortable reading, which is one reason why designers have such a difficult time with fluid Web layouts. Tim Brown started a discussion about this issue and provides a couple of techniques for opimization.Prevent Long URL’s From Breaking Out of Container
Another snippet by Chris Coyier for keeping long URLs within the container. word-wrap, word-break and hyphens properties in use. Also, learn how to Prevent Superscripts and Subscripts from Affecting Line-Height.Viewport-sized typography
This technique uses new CSS values for sizing elements relative to the viewport’s current size: vw, vh and vmin. This allows you to couple the size of, say, a typographic heading to the available screen space. Browser support is quite poor for now, so if you are looking for an alternative, check out FitText.js.Minimum paragraph widths in fluid layouts
This article shows how to solve the problem of paragraphs that are too narrow, by implementing a minimum paragraph width. If the space left a the floating image is less than this width, then the whole paragraph moves below the image.Styling ordered list numbers
Roger Johansson shows how we can style ordered list numbers with the :before pseudo element, which can take a counter as a value through the content property. Also check out Chris Coyier’s post and Louis Lazaris’ CSS Counters: counter-increment and friends.Reverse ordered lists in HTML5
The reverse attribute allows you to write a descending list of numbered items. Louis Lazaris summarizes what it does and offers a solution to get around a lack of browser support for this attribute.Preserving white space with CSS3 tab size
By default, HTML pages ignore anything more than a single space and collapses them. But there are occasions when you’ll want to preserve this space via one of several possible techniques.Truncating text using only CSS
This code snippet can be used to shorten a line of text using nothing but CSS.New CSS3 properties to handle text and word wrapping
Louis Lazaris explains the possibilities and problems of text-wrap, overflow-wrap, line-break and word-break, text-overflow and hyphens. Also worth reading: Kenneth Auchenberg discusses the options for word wrapping and hyphenation in combination with dynamic width elements.End Articles with Ivy Leaf
A clever technique for adding an extra touch to the end of your articles. :last-child, :after and content in use.Hover Effects and Navigation Menus with CSS
We are used to classical navigation patterns such as tabbed navigation or drop-downs, but we can do a lot more to spice up our navigation menus with pleasant hover effects, often without extra images. Especially if you’d like to add a bit more polish to your portfolio, gallery or e-commerce website, these techniques can be quite useful. What about “over-the top” hover effect for your links,
Circle Navigation Effect With CSS3
A bubble-like thumbnail preview for your navigation with CSS3.Create a CSS3 Image Gallery With a 3D Lightbox Animation
Tom Kenny has extended a CSS lightbox gallery by adding a few hover effects to the gallery grid itself and a 3D rotation to the lightbox content, all with CSS.3D Gallery With CSS3 and jQuery
This article shares an experimental gallery that uses CSS 3D transforms. The idea is to create a circular gallery with an image in the center and two on the sides. Because perspective is being used, the two lateral images will appear three dimensional when rotated.Creative CSS3 animation menus
Mary Lou presents a couple of creative navigation menu hover effects. The idea is to have a simple composition of elements, an icon, a main title and a secondary title that will be animated on hover using only CSS transitions and animations.How to spice up your menu with CSS3
Yes, another technique by Tympanus: this tip shows how to spice up a menu by adding a neat hover effect to it. The idea is to slide an image out to the right when the menu item is hovered over.Create a zoomable user interface
David DeSandro reveals how to use CSS transforms to create a zoomable user interface similar to that of Beercamp 2011. In this tutorial, you’ll also learn how to use JavaScript to hijack scrolling to manipulate the zoom.Flipboard Navigation
An experimental page layout inspired by Flipboard’s interface.Multi-direction hover
This element shows different hover effects when hovering from different directions.Experimental Hover Effects
Original and innovative hover effects discovered via Twitter on what appears to be a Japanese code sharing website.Over-the-top hover effect
A CSS and JavaScript technique for creating an “over-the-top” hover effect using the transform-origin transform-style properties as well as 3-D transforms.Accordion With CSS3
Mary Lou experiments with the adjacent and general sibling combinator and the :checked pseudo-class. Using hidden inputs and labels, she creates an accordion that animates the content areas on opening and closing.Expanding Text Areas Made Elegant
An expanding text area is a good choice when you don’t know how much text the user will write and you want to keep the layout compact. In this article, Neil Jenkins explains how to do this simply. Also, you might want to take a look at Textarea Auto Resize, another technique by Louis Lazaris, using a hidden clone element.Filter Functionality With CSS3
Using the general sibling combinator and the :checked pseudo-class, we can toggle states of other elements by checking a box or radio button. This tutorial explores those CSS3 properties by creating a experimental portfolio filter that toggles the states of items of a specific type.An accessible, keyboard-friendly custom select menu
A new approach for more accessibility by Roger Johansson. He styles only the select element.Visual Techniques with CSS
We used to heavily on images and visual elements to create basic visual effects on the Web. With CSS3, we can not only improved the loading speed of the content, but also make our visual elements more flexible and adaptive. Let’s take a look on a couple of examples of how we can achieve that.
Create the Illusion of Stacked Elements with CSS3 Pseudo-Elements
Tom Kenny shows how to create a simple “stacked” look to a group of images.CSS3 Unfold Map with Pins
A handy snippet for placing pins on a map. The code looks a bit verbose, so you might want to remove a couple of visual “nice-to-have” elements.Turn Images Into Postage Stamps With CSS3 border-image
Dudley Storey shows a simple way to create a postage stamp from a simple image with border-image.Slopy elements with CSS3
Angled shapes and diagonal lines can create an interesting visual flow and add some unexpected excitement. This tutorial shows some simple examples and ways how to create slopy, skewed elements with only CSS.CSS Flip Clock
A code snippet for displaying a flip clock-alike time display using CSS.CSS3 Image Styles
When applying a CSS3 inset box-shadow or border-radius directly to an image element, the browser won’t render the CSS style perfectly. Here’s a quick tutorial on how to use jQuery to make perfect rounded corner images dynamically. And check out the second part.Creating Reusable and Versatile Background Patterns
A simple tutorial on how to create reusable background patterns with Photoshop and CSS.Diagonal Graph Paper Gradient
A very nice CSS technique for creating diagonal graph paper gradients using repeating-linear-gradient property in CSS.Tucked Corner Effect
A clean CSS technique for producing tucked corners using the pseudo-elements :after and :before as well as data URI-coded images. Also, check out Corner Ribbon Effect with CSS.Scrolling… shadows!
An original technique by Roman Komarov to create CSS-only shadow-scrolling effect using background-attachment: local. Developed by Lea Verou, inspired by Roman Komarov.Multi-colored CSS progress bars
A quite verbose yet CSS-only solution for displaying multi-colored progress bars. It’s linear-gradient in action! Also, check out CSS3 progress bars that display data inside localized leaderboards for the new analytics platform at G5. They are lightweight and require no JavaScript or images.CSS3 breadcrumbs
Learn how to create your own cool CSS3 breadcrumbs. Also, check the CSS Breadcrumbs Example which uses only CSS linear gradients.Adobe-like Arrow Headers
A detailed article about the technique Adobe uses to create header bars for modules on its website.Adding a Top Shadow to a website
If you ever wanted to add a shadow along the top edge of the website, you can easily do it by styling body:before.A flexible shadow with background-size
It’s amazing what you can achieve when you combine different techniques—even when facing a challenge such as a flexible shadow. If you had to create an adaptive shadow effect, how would you create it?Star Ratings With Very Little CSS
Chris Coyier shows how to code star ratings done with very little CSS code and lots of a bit of Unicode madness.Convert Images to Black And White With CSS
Filters allow us to visually process an image in the browser without needing to go through PhotoShop or use cycle-intensive, script-heavy methods in JavaScript or PHP. CSS3 filters are broadly supported in the most recent versions of Firefox and Chrome, and we can gain support in older versions and alternative browsers — even IE — by using a combination of techniques.Punching Holes With CSS
A clever and simple technique to make a block in a container appear transparent and display a background image. Also, take a look at Lea Verou’s accessible star rating widget with CSS.Simple Styles for Horizontal Rules
With the help of a few contributors, Chris Coyier put together this page of simple styles for horizontal rules.Optimizing Graphics With CSS Masks
In this video, Aaron Bushnell shows how CSS masks can help make the process easier on you and how to make sure you have fallbacks in place for non-Webkit browsers.Browser-Specific CSS Hacks
A useful, comprehensive list of browser-specific CSS hacks for targeting legacy browsers. Unfortunately, most of us will need them quite often.Last Click
CSS3 Lasers!
Shows a laser shot effect when hovering over an element.The DOM Tree
This DOM tree is generated via JavaScript every time you visit the page, so you’ll never see the same one twice. All of the forms are filled with holiday greetings in a variety of languages. CSS3 3D transforms are used to position and rotate, via translate3d() and rotate3d() respectively, the elements when the page loads. The infinitely looping rotation on the tree is controlled by an infinitely looping CSS3 animation. Just one word: crazy!What’s Your Favourite Technique?
We’d love to know your experience with some of the featured techniques, or perhaps you’ve stumbled upon another interesting CSS technique recently? Let us know in the comments to this post!
(jvg) (al) (vf) (ml)
WYSIHTML5 - A better approach to rich text editingwysihtml5 is an open source rich text editor based on HTML5 technology and the progressive-enhancement approach. It uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.
Features
- It's fast and lightweight (smaller than TinyMCE, Aloha, ...)
- Auto-linking of urls as-you-type
- Generates valid and semantic HTML5 markup (even when the content is pasted from MS Word)
- Uses class names instead of inline styles
- Unifies line break handling across browsers
- Uses sandboxed iframes in order to prevent identity theft through XSS
- Speech-input for Chrome
- No jQuery required
Browser Support
Making the design to be responsive is very easy as shown in my Responsive Design in 3 Steps tutorial, but maintaining the elements to look aesthetically balanced on all breakpoint layouts is an art. Today I'm going to share 5 of my commonly used CSS tricks along with sample cases for coding responsive designs. They are simple CSS properties such as min-width, max-width, overflow, and relative value — but these properties play an important part in responsive design.
1. Responsive Video (demo)
This responsive video CSS trick was discovered by tjkdesign.com. I've blogged about it before, you may read the details here. It makes the video embed to expand fullwidth to the boundary.
.video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; } .video iframe, .video object, .video embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }2. Min & Max Width (demo)
Max-width property allows you to set the max width of the element. The purpose of max-width is to prevent the element from extending the boundary.
Max-Width Container
In the example below, I specify the container to display at 800px if possible, but it should not exceed 90% of the boundary width.
.container { width: 800px; max-width: 90%; }Responsive Image
You can make the image auto resize to the max width of the boundary by using max-width:100% and height:auto.
img { max-width: 100%; height: auto; }The above responsive image CSS works on IE7 and IE9, but doesn't work on IE8. To fix it, add width:auto. You may apply a conditional CSS specifically for IE8 or use the IE hack below:
@media \0screen { img { width: auto; /* for ie 8 */ } }Min-Width
Min-width is opposit to max-width. It sets the minimum width of an element. In the example form below, min-width is used on the input text field to prevent the input from getting very small when scaling down.
3. Relative Values (demo)
In responsive design, knowing when to use relative value can simplify the CSS and maximize the best layout result. Below are some examples.
Relative Margin
Below is an example of a commentlist where relative left margin is used to space out the threaded comments. Instead of using fixed pixel value, I used percentage value to space out the sub-lists. As shown on the left side of the screenshot, the content box in the sub-lists gets very small on mobile resolution if pixel left margin was used.
Relative Font Size
With relative value (eg. em or %), the font size, line-height and margin spacing can be inherited. For example, I can change the font size on all descendant elements by simply changing the font-size on the parent element.
Relative Padding
The screenshot below shows it is better to use relative percentage padding as opposed to fixed pixel padding. The box on the left shows an unbalanced padding space if pixel padding was used. The box with percentage padding on the right shows that the content area is maximized.
4. Overflow:hidden Trick (demo)
As posted in my previous article, you can clear float with the overflow property. This trick is extremely useful. You can clear the float from the previous element and keep the content running within the container by applying overflow:hidden.
5. Word-break (demo)
I also talked about the word-wrap property before. You can force unbreaking text (eg. long URL text) to wrap instead of running in a single line.
.break-word { word-wrap: break-word; }
data-width="75" data-fgColor="#fff" data-skin="tron" data-displayPrevious=truedata-width="150" data-fgColor="#fff" data-skin="tron" data-thickness=".2" data-displayPrevious=truedata-width="150" data-fgColor="#fff" data-skin="tron" data-thickness=".1"data-width="100" data-displayInput=falsedata-width="200" data-cursor=truedata-width="200" data-min="-100" data-cgColor="#A9EFFD" data-displayPrevious=trueTicks
data-cursor=true data-skin="tron" data-ticks="8"Readonly
data-thickness=".4" data-fgColor="chartreuse" data-readOnly=trueKnobify!
data-width="200"data-width="50" data-cursor=trueInfinite / iPod click wheel
data-width="150" data-cursor=true data-thickness=".5" data-fgColor="#AAAAAA" data-bgColor="#FFFFFF" data-displayInput="false" + some code0
If there is a commonly reoccurring need for a particular solution, there is a great probability that someone has – by now – solved that need and has finished the legwork involved in researching and constructing something that resolves it. At the very least, you will find documentation on general solutions to related problems that will enable you to gain insight on best practices, effective techniques, and real-world examples on the thing you are creating.
A design pattern refers to a reusable and applicable solution to general real-world problems. For example, a solution for navigating around a website is site navigation (a list of links that point to different sections of the site), a solution for displaying content in a compact space are module tabs.
There are many ways to tackle a specific requirement – and as a designer – the most important thing you can do is selecting the option that best reflects the needs of your users.
In this article, we share with you the best of the best, cream of the crop sites, galleries, online publications, and libraries devoted to sharing information and exploring concepts pertaining to User Interface design patterns. Use these recommended sources to gain knowledge about a particular UI problem or to gain inspiration and insight on best practices, techniques, and examples of exemplary UI designs. Great thank-you goes to Pavel Konoplitski for providing us with related resources.
UI Design Patterns for Sites and Web Applications
UI-patterns.com
UI-patterns.com is a large collection of design patterns for UI designers to gain inspiration from. The site allows users to keep sets of their own (publicly accessible to site visitors) so that you can see other UI design pattern collections.Konigi
Konigi highlights exemplary interaction design and visual design use in the real-world. There are plenty of ways to utilize, navigate, and find your desired content on the site, including a Tags page featuring popular keywords used in entries within the showcase split up into three categories: keyword, product, and company.QUINCE: X Patterns Explorer
QUINCE is a beautiful and stunning web application that helps you explore an innumerable amount of user experience design patterns such as date pickers and two-panel selectors. The application requires the Silverlight plugin and is best viewed under Internet Explorer (though we have verified it to work well in Firefox and Safari).Interaction Design Pattern Library
Welie.com has an interaction design pattern library maintained by Martijn van Welie, a Ph. D. graduate in Human Computer Interaction who now works as an Interaction Design Senior Consultant for Philips Design. The library features a ton of design patterns involving various site tasks such as navigating around a site, searching a site, and basic interactions such as slideshows. Each pattern follows a specific format: (1) the problem, (2) the solution, (3) when to use the pattern, (4) why you should use the design pattern, and (5) examples of the pattern in use.Pattern Tap
Created and maintained by Matthew Smith and Chris Pollock, Pattern Tap is a gallery of popular web-based User Interface components and design patterns such as slideshows and breadcrumbs. Pattern Tap allows users to create their own sets, and they now have over 7,000 user sets. There’s plenty of inspiration to be gained at Pattern Tap.design|snips
This design gallery focuses on common web page components such as navigation as well as popular design trends such as Grid layouts. design|snips has over 30 categories so that you can easily find the design pattern/trend that you’re interested in. What’s more, users are allowed to rate each design featured in the gallery so that you can see what the overall consensus is with regards to the effectiveness and appeal of a design being shown.UI Scraps
Written by Experience Designer Jason Robb, UI Scraps is a weblog that catalogs, good, bad, and notable interface designs. Expect to find critiques of submission forms and praises for good designs and UI Scraps.The UI Pattern Factory
The UI Pattern Factory is a UI design library and gallery. What’s great at UIPF is that they sometimes share videos in each entry to improve the description of design problems and solutions. Entries are further enhanced by user-submitted examples of the pattern, which they archive in their Flickr group: UIPatternFactory.com.Yahoo! Design Pattern Library
The Yahoo! Design Pattern Library, maintained and presented by the Yahoo! Developer Network (YDN), shares design patterns to the web design and web development community. They also have a recently-launched forum where you can swap stories with fellow UI designers and discuss patterns showcased in the design pattern library.StyleIgnite
StyleIgnite archives and displays the latest trends in web design. Hundreds of styles that are submitted by users are there for you to check out and gain inspiration from. What’s unique about StyleIgnite is that not only are they a gallery, but they also provide you with code snippets and assets to achieve the designs that you like.blink design library
blink design library is a weblog-formatted design library that centers a post’s topic on a particular user interaction pattern with the aim of cataloging and exploring that subject. You will find topics and discussions on common interaction components such as buttons and web forms.patternBrowser
patternBrowser is a unique web application for browsing user interface design patterns on a variety of products including mobile devices. It is a great resource for quickly finding a ton of inspiration in a compact, well-organized, and very searchable manner.Web Design Practices
Web Design Practices is a gallery of web design patterns such as breadcrumb navigation with very thoughtful and comprehensive write-ups on each design pattern, often including statistics and helpful resources about a particular website component.Elements of Design
Elements of Design focuses on particular components of a web design such as login forms and site navigation in the hopes of inspiring designers, as well as to highlight prevalent patterns for typical website needs and features.User Interface Engineering
User Interface Engineering is an organization on usability, web design, and information architecture. It is a great place for learning about effective design patterns for common UI problems. For example, you can learn about faceted search or previous and next actions in web forms.CSSbake
CSSbake is a unique web design gallery that focuses on website components rather than the overall web design. For example, you can find showcases of good navigation or beautiful comment sections. CSSbake “focuses on the ingredients that make a site good” and is a great place to attain inspiration for common User Interface design patterns.UI Patterns
UI Patterns is a UI design library that follows a weblog format where each post is a design pattern and a showcase of it in use on a website or web application.Functioning Form
Functioning Form is the weblog of UI designer and author Luke Wroblewski. You can learn about designing for humans by reading through his insightful articles on the site and find useful lists such as a collection of resources on website buttons.MephoBox
MephoBox is a design gallery that presents web design patterns and trends such as login forms and typography use with the aim of inspiring designers with their own work. Users can vote on designs and leave comments on them, allowing viewers to sort results by “most popular” and “most viewed” for quickly finding well-liked designs.Designing Interfaces
Designing Interfaces is a book format site for the book, “Designing Interfaces: Patterns for Effective Interaction Design” written by Jennifer Tidwell. In the site, you will find loads of design patterns and articles on interaction design. You’ll learn about topics such as organizing site content, soliciting actions and commands from users, and presenting complex data.UIZEN
UIZEN is a collection of user interface designs that features real-world websites and web applications. The site serves as a useful reference for times when you are in need of effective design inspiration.UXmatters
UXmatters is a web magazine dedicated to sharing information about the user experience. In the publication, you will find a ton of information on effective and usable design patterns and techniques regarding the design of interfaces centered around its users.Boxes and Arrows
Boxes and Arrows is an online publication dedicated to the art and science of designs. In the site, you will find plenty of information regarding effective interaction designs such as how to get a web form’s structure right and designing for user-generated and social media based content. The tone and style of Boxes and Arrows is professional and academe-centric so articles usually leverage information from research and academic papers.Niche and Specialized Design Pattern Resources
Design Patterns for Data Graphics
This resource deals with the discussion of useful design patterns for presenting data. You will find information and downloads on suggested diverging color themes (to easily distinguish related data sets between each other) and data resolution.Patterns Of cooperative INTERaction
This web page shares information on cooperative (social/team-based) systems design patterns. Here, you will find resources and articles on topics such as multiple presentations of information and collaboration in small groups.Information Design Patterns
There is an art and a science behind presenting information to users. This site discusses and shares information regarding effective and usable information and data structures.Learnability Gallery
What makes information and interfaces learnable? How can you present data so that users are able to absorb the content you are presenting? This visual gallery features effective design patterns that expose techniques for designing information with high-learnability.Designing Social Interfaces
In this resource, you will find patterns for social and collaborative sites and applications. The site is a wiki-style site that allows for user-generated and user-edited content, and is a companion site for a book called “Designing Social Interfaces“. You will find insights on how to effectively present content and build features into your project that leverage the advantages of collective and shared knowledge.Open Source Design Pattern Library
This resource features design patterns as it pertains to open source websites and applications. Users are able to submit their own pattern entries to share.hcipatterns.org
This resource deals with pattern languages in Human-Computer Interaction and user interface design. You can learn about common language patterns, tools used in the study of HCI, and additional useful news and information.Common Ground
Common Ground is a documentation of a pattern language for Human-Computer Interaction design. You will find a lot of wonderful resources on HCI such as WYSIWYG Editor design patterns and presenting information to users using step-by-step instructions.ecommr
ecommr is a website showcase of the best (and worst) e-commerce site and web application designs. The site explores topics in e-commerce content presentation and user interface patterns that allow for a great user experience. They focus on entire site designs as well as specific components of an e-commerce website such as customer service landing pages and size charts.Ajax Patterns
Ajax Patterns is a wiki-style site discussing design patterns that apply the use of Ajax techniques. It is a massive resource for web application developers to gain insight on design patterns involving highly-responsive Rich-Internet Applications.30 Essential Controls
This article is a discussion on design patterns involved in the creation of RIA’s. It talks about important user controls that application designers can take advantage of to clearly denote actions that they’re able to perform when interfacing with an application.Design For Mobile
This site is dedicated to designing mobile applications and websites. The site is a wiki so the content is truly collaborative and user-edited. With mobile devices becoming very prevalent, the need for compatible and usable mobile systems grows, and this should be your first stop to learning more about this emerging field in web technology.Wiki Patterns
Wikis allow for shared collaboration and puts the responsibility of creating and maintaining the site’s content towards its users. This resource discusses effective design patterns for creating (or implementing) a user-friendly wiki.Flickr Collections and Groups
Flickr is a wonderful and visual-based resource for learning and finding design patterns. In this section, we share with you some notable collections and groups to peruse for interaction design pattern research and inspiration.
Design Patterns
This Flickr collection maintained by Chris Messina is a showcase of unique and interesting interfaces on the web. The collection is well-organized into sub-sets such as Drag and Drop interfaces and Calendar Views.Design Patterns Group
In this Flickr Group, there are over 300 items that you can browse through to see interface design trends. With a membership of over 360 Flickr users, you’ll be sure to encounter fresh content on a regular basis.Web Form Design: Filling In the Blanks
Maintained by Luke Wroblewski, this Flickr set is a collection of images pertaining to web form design. It is a handy and inspirational resource to have around for times when you are crafting highly-usable web forms.[Design Solutions]
This Flickr collection by User Experience Designer Gustavo Pimenta presents common interactive design patterns neatly subcategorized into sets such as Graphs and Logins.namics UI Pattern Library
This public Flickr group consists of 9 Flickr members and is a group intended for capturing UI design pattern trends from the real-world.Search Patterns
Peter Morville has a Flickr collection dedicated to gathering design patterns for effective search, subcategorized into helpful sets such as Web Search and Advanced Search.Related content
If you enjoyed this article, please check out the following article which you might also like:
Methods
Practitioners in usability and user-centered design (UCD) employ a wide range of methods for gathering information about users and their tasks, analyzing needs, creating design solutions, iterating designs through testing and evaluation, and measuring efficiency, effectiveness, and satisfaction.
This section of the BoK presents descriptions of methods, including procedures, resources needed, outcomes, appropriate uses, benefits, and costs. These descriptions will form the core of a knowledgebase that defines our field and will help communicate usability methods to clients, project managers, and team members. Usability practitioners will also benefit from cross-referencing of related methods and pointers to outside resources for more details.
Samples of Content
Some Future Subjects
- Affinity Diagramming
- Card Sorting
- Cognitive Walkthrough
- Contextual Inquiry
- Interviews
- Paper Prototyping
- Personas
- Satisfaction Surveys
- Scenarios of Use
- Selecting Methods
- Storyboarding
- Usability Testing
- Use Cases
Soon you’ll make everyone green with envy by showing off your newfound knowledge of this month’s colour! Read on for some interesting bits of trivia, tips, puns and finally, as always, a showcase with a little something for everybody. Enough beating around the bush, let’s get to it!
Other color of the month you might enjoy:
December - Colour Chronicles: Bold Brown
January - Colour Chronicles: Brilliant Blue
February - Set Your Website on Fire with Red Themes, Photos, and Palettes
Basics
Green is a complementary colour that results from the combination of yellow and blue, taking on many of the latter’s characteristics while still retaining its own features and symbology. Interestingly, in many languages, the name itself has its roots in words describing growth, freshness, youth and grass, while others (at least historically) would not even have a separate term for it, instead including it in the words for blue and yellow, respectively.
Characteristics
Green is a tranquil and peaceful colour with soothing properties. The word which best captures its essence is “balance”; neither too warm, nor too cool, calming but still vibrant, easy yet not too easy to perceive. Although present in minerals (emeralds, for example), it is mostly an organic colour.
Studies suggest that the colour improves the ability to concentrate and aids in reading comprehension. In Denmark, during exams, the desks are covered with green tablecloths to help the students focus and to try to relieve some of the stress.
Although no longer accurate, the term “green room” comes from the fact that the waiting room was literally painted green. It was said to relax the performers’ eyes before they would have to face the lights on stage.
Symbolism
Naturally, it represents everything organic, especially the plant world. Now it has become the number one colour for the environment and causes dedicated to preserving or saving it; it has also extended to eco-friendly products and services (the term “green energy” comes to mind).
Going deeper into the topic, it is a symbol of life and fertility. This can come either from the more obvious source of green (plant life) or from water which can occasionally take on greenish shades. Through extension, it can be a symbol of new beginnings, just as tiny sprouts on dark soil let us know that spring is on its way. Saying that someone is “green” means that they are new or inexperienced.
On the other hand, it can also represent the exact opposite: illness, death and decay. It is probably an analogy to the fact that anything green and visible on the human body is toxic, therefore a sign of sickness. Green mold is also a sign of decay.
There are also some figurative associations, such as luck or envy. A four leaf clover traditionally brings good luck and is presumably the source of the connection. The ancient Greeks believed that envy was caused by excessive bile which would normally give a person a pale green complexion.
Combinations
As mentioned in the previous article, its complementary is red and the theoretically ideal proportion is 50-50. However, the pair should be used in less vibrant shades and as accents rather than main elements in order to avoid a Christmas feeling. Another way would be to use orange instead of red.
For an earthy mood, brown is the obvious choice. Darker and less saturated versions of both give a more somber feeling; keeping the dark brown but coupling it with a vibrant (but not default RBG!) green allows you to place emphasis on elements without adding too much glare.
Blue and a more bluish green make for a nice watery combination, but like with red, a proper hierarchy should be used. Using just the two will make the visuals hard on the eyes and you definitely don’t want that! Both of them work great with dark grays and provide great contrast and emphasis.
Palettes
Web – WordPress themes
01. ECOBIZ (premium)
05. efolio (premium)
09. Maze Lime (free / must keep footer)
Artwork – fantastic sceneries
Pure CSS text gradient (no PNGs)
Folks, grab a copy of Safari 4. This is what we’ll be making today:
That’s not an image, it’s HTML text with real fonts provided by Typekit and embedded via CSS @font-face. You can see the actual thing here: Nice Web Type likes Bello and Proxima Nova.
Underware’s Bello Pro sure makes this example look great, but until Typekit is out of technology preview you’ll have to try this technique with a different typeface. (If you do, comment here and link it up!)
Follow along or skip to the final result.
The markup
<h1><a href="#">Filthy</a></h1>That’s it for the type effect. You can have it sit on top of any background you like by placing this h1 inside of a div and giving the div a background (in my example, I used a closeup of motorcycle chrome).
The style
There are actually four HTML items we’ll be addressing with CSS:
- The h1 element
- The text-shadow of the h1 element
- The a element inside the h1 element
- CSS-generated content that lives in the h1 element, beside the a
Style the h1
The first thing we’re going to do is style the h1 so that it takes up a good amount of room. Here’s where you specify the typeface you want to use for the effect. Choose something thick enough that folks will notice the gradient, and something with rounded edges will help simulate the 3D effect of our text-shadows.
h1 { font-family: "your ideal typeface", Verdana, sans-serif; font-size: 300px; line-height: 300px; text-shadow: -3px 0 4px #006; } h1 a:link, h1 a:visited, h1 a:hover, h1 a:active { color: #d12; }Nudge this text-shadow away from the text just slightly. It ends up looking like a neon glow, and you want it to have a touch of finesse. It’s not the main effect. Then, style your a element with the color you’d like to use for the top of your text gradient.
Fading this into nothingness
Now comes the cool part: applying a mask using the CSS mask and CSS gradient properties in Apple Safari (Webkit).
h1 a:link, h1 a:visited, h1 a:hover, h1 a:active { color: #d12; -webkit-mask-image: -webkit-gradient(linear, left top, » left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))); }-webkit-mask will accept a whole bunch of different things, including images. We can use a -webkit-gradient value as a mask because it is technically an image. RGBa color allows us to fade from full alpha-channel opacity to none (transparent alpha channel).
Fading into a different color
You’d think you could, instead of using a mask and RGBa alpha gradient, just use the CSS gradient instead of a color value on your text. But because of what we just read (-webkit-gradient counting as an image), you actually can’t.
So to fade the color of your a element into a second color, you actually need a second copy of the word to be sitting exactly behind the one that’s fading into nothingness.
h1:after { content: "Filthy"; color: #000; text-shadow: 3px 3px 1px #600; }The only text in our markup is, “Filthy”. We could have put a second one in there, wrapped in a span, but we don’t want a second Filthy in there dirtying the markup. Instead, we use the CSS :after pseudo-selector and the CSS content property to inject our twin Filthy into the markup. This one we’ll style black and give a hefty text-shadow to simulate thickness.
Stack them
h1 { position: relative; font-family: "your ideal typeface", Verdana, sans-serif; font-size: 300px; line-height: 300px; text-shadow: -3px 0 4px #006; } h1 a:link, h1 a:visited, h1 a:hover, h1 a:active { position: absolute; top: 0; z-index: 2; color: #d12; -webkit-mask-image: -webkit-gradient(linear, left top, » left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))); }By relatively positioning the h1 and absolutely positioning the a inside, as Doug Bowman once showed us how to do, plus adding a touch of z-index, one can be stacked neatly atop the other.
Now just pop that into a composition you’re working on.
The final result
HTML:
<h1><a href="#">Filthy</a></h1>CSS:
h1 { position: relative; font-size: 300px; line-height: 300px; text-shadow: -3px 0 4px #006; } h1 a:link, h1 a:visited, h1 a:hover, h1 a:active { position: absolute; top: 0; z-index: 2; color: #d12; -webkit-mask-image: -webkit-gradient(linear, left top, » left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))); } h1:after { content: "Filthy"; color: #000; text-shadow: 3px 3px 1px #600; }So there you have it. A pure CSS text gradient with no PNG images necessary. Of course, it only works in Safari … but Safari is the way of the future. Get your mind into techniques like this now, and you’ll know the logic when other browsers catch up.
See this technique in action:
Nice Web Type likes Bello and Proxima NovaUPDATE: the CSS content property doesn’t translate. Fixed.
Easily create and scale voice, VoIP and SMS text messaging applications with Twilio's dead-simple cloud platform. No contracts, commitments or upfront fees.
TinyconA small library for manipulating the favicon
Tinycon allows the addition of alert bubbles and changing the favicon image. Tinycon gracefully falls back to a number in title approach for browsers that don't support canvas or dynamic favicons.
Alerts in the favicon allow users to pin a tab and easily see if their attention is needed.
Demo
Look up and check out the favicon on this page to see the library in action on chrome and firefox.
Download
Tinycon can be downloaded from the public repository on github.
Contact
Please use github to submit issues with Tinycon, or if you just want to say hey - i'm on twitter @tommoor
Here you’ll find a list of tools I’ve developed over the years, to make working with various CSS3 features a bit easier. Since they’re for developers, most of them only work in recent browsers. Also, obviously if you use a tool to help you with a CSS3 feature, it probably won’t work in browsers that don’t support that feature.
Exactly how much CSS3 does your browser support? Link to blog post An interactive CSS playground. Pretty much my most successful project so far, with thousands of visitors every day. Link to blog post A CSS transitions gallery that shows what’s possible with even the most basic of transitions: one property, two values. Link to blog post A tool that helps you work with the easing functions of CSS3 transitions & animations and share them with others. Link to blog post A tool that helps you convert between the different CSS-accepted color formats (including name keywords) as well as share them with others. Link to blog post An interactive gallery that demonstrates what’s possible with just CSS gradients. It also allows you to edit the code, to experiment with gradients yourself. Link to blog post A tool that converts the standard gradient syntax to -webkit-gradient and adds the rest of the prefixes Link to blog post A tool that helps you learn how the :nth-whatever() CSS3 pseudo-classes work. Link to blog post A tool that shows CSS3 newbies some of the things that CSS3 can do, as a reply to a challenge posted in Ajaxian. Link to blog post