Fundamental Elements of Design (video)
December 13, 2011
Short introduction to the different elements a designer considers when putting together a design solution.
via Inspiredology
Crafting Web sites since 1999
I am a Web designer passionate about creating elegant, inspiring, and usable Web experiences that connect with an audience and fulfull business objectives.
December 13, 2011
Short introduction to the different elements a designer considers when putting together a design solution.
via Inspiredology
November 14, 2011
One of my favorite new tools is Sprite Cow. Sprite Cow helps you get the height, width, and background position of different sprite images within a larger sprite sheet. It is really easy to use and works much like a lot other graphic kinds of tools (i.e., Photoshop).
You just open your image in Sprite Cow, use the marquee tool to select your sprite, and Sprite Cow generates the CSS you need for height, width, and background position.
![]()
I had used simple sprites in the past, but was challenged by a colleague to make sprite sheets to cover the majority of background images for a site to improve performance. Sprite Cow has made it very easy for me to do this. I just build the sprite sheet as I go and use Sprite Cow to do the hard work. No more manual labor in Photoshop to determine these 3 values.
Sprite Cow is a side project from the guys at The Team. They created it to solve their own problem to create a quicker and easier process for this tedious, repetitive, and time consuming process. Then they turned around and shared it with the broader community. High five!
It is always great when you find great tools. And the timing of it coincided with my decision and desire to build more complex sprites back in June.
Shout out to Chris Coyier for mentioning Sprite Cow on CSS Tricks.
UPDATE: Chris Coyier released a screencast today (November 16) on Using Sprite Cow. Check it out.
November 11, 2011
For most of my Web practice, I wrote my own HTML and could add classes and IDs to elements as hooks to target elements in my CSS. So when I first heard about CSS combinators, I did not see much use for them. I wondered why I would need them. Why would I need something general when I could specify an element by class or ID.
Fast forward to this year. After several career changes, I am now working with CMS frameworks that do not give me the control over the code that I had in the past. At times, it can be a challenge to find hooks to target specific element with CSS.
Last Spring, I was reintroduced to CSS combinators. These powerful little statements are now part of my daily workflow.
Sidenote: I read this article around the time that I started using combinators. I found it to be a great resource because it had a handy reference to browser support.
One of the powerful ways that I have started using combinators is to create “conditional CSS.” I had a project where the business unit wanted to add headings to their body content for recipes. They wanted to add “Ingredients” and “Instruction” headings to make the content more clear. At that time, all the ingredients in the ingredient listing were bold. Now that they were adding the headings, they wanted those list items to be normal weight.
The challenge. The headings were going to be added to new articles and then slowly added to existing articles on the site. Could I come up with a solution that would only be implemented on articles with the new headings?
Thus the need for “conditional CSS.” I found my solutions by using the adjacent sibling combinator (E +F) and the child combinator (E > F) to target the elements the ingredients listings and change the font weight to normal.
.recipe-page .body h4 + p > b {
font-weight: normal;
}
.recipe-page .body h4 + div b {
font-weight: normal;
}
.recipe-page .body h4 ~ span {
font-weight: normal !important;
}
I had to come up with several declarations because different editors had entered in the content differently.
On another project where I needed some conditional CSS was showing the comment count for an article.
The challenge was to write CSS to cover several different conditions. Some comments would just show a comment count. Other listing would include a rating or there might be ratings without a comment count.
The business unit also wanted to have a link to the comment area for articles that did not you have a comment or review. The developer needed to have that link always be always present in the code so I had to come up with a solution to hide the link when there was a comment count and/or rating was present. When there was not a comment, there would not be any code for the comment count. So showing the link when there was not a comment was easy.
Here is my solution to hiding the comment link:
The Comment Block on the page

The HTML

The CSS
So I am wanting to hide the div with a class of “rating-buttons” because users have already commented on this article.
.recipe-rating-comments-count .rating + .rating-buttons >
.write-comment, .recipe-rating-comments-count .comment-counts-text + .rating + .rating-buttons >.rate-review,
.recipe-rating-comments-count .comment-counts-text + .rating-buttons > .rate-review,
.recipe-rating-comments-count .comment-counts-text + .rating-buttons > .write-comment {
display: none;
}
Using a combination of adjacent selector and child combinator, I can target the different conditions in which I want to hide the “Write a Comment” link.
I also used a couple of combinations of adjacent sibling combinator and child combinator to add different margin depending on what elements were present. For example, I wanted the ratings to have more margin at the top when a comment count was not present.
I spend the majority of my time working in Drupal. Both of my examples are not from a Drupal environment but I could share more. One of the ones I use most often is Panel Separators. I can use the adjacent sibling combinator to use target the class of the pane that precedes the panel-separator to target it for styling.
Just like a lot of things in life, once you are aware of something, you begin to see it everywhere. Or is this case, I keep seeing problems that these combinators provide a great solution for.
Special thanks to Chris Coyier, who encouraged me to blog about this when I shared the idea with him at Front End Design Conference.
A snapshot of my life online.
Today |
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Great post by @emilylewis on building a better Web by understanding the fundamentals. http://t.co/Ky4CjRnJ [webcraftsman]
|
|
I have enjoyed listening to @ShopTalkShow on my commutes last night and this morning. cc/ @chriscoyier @davatron5000 [webcraftsman]
|
Yesterday |
|
|
|
|
|
RT @imagineryan: The fact that God actively searched for Adam after he messed up is one of the best promises we're given. God will seek ... [webcraftsman]
|
|
This is just crazy. Mac OS X Lion CSS3: d.pr/MDSn Wonder how much time it took to program this.
(via @cameronmoll via @vpieters ) [webcraftsman]
|
January 25th |
|
|
|
|
Are you using <section> correctly? http://t.co/uuQ5XhZc [webcraftsman]
|
|
|
|
|
RT @jasonvanlue: Design—at its core—solves problems, making life's experiences better and more enjoyable. [webcraftsman]
|
January 24th |
|
|
The separation of structure, presentation and behavior is dead http://t.co/6wuUk0Cp via @thinkvitamin
Interesting ideas. [webcraftsman]
|
|
|
|
|
RT @jonacuff: I know not what this day holds, but I know the one who holds it & that gives more peace than pretending I can control the day [webcraftsman]
|
January 23rd |
|
|
|
Posted HTML5 Please.
|
January 20th |
|
|
RT @jonmorosi: Carlos Pena agrees to one-year deal with #Rays worth $7.25M, source confirms. @JonHeymanCBS first to report. [webcraftsman]
|
|
|
|
|
|
|
January 19th |
|
|
RT @andyrutledge: Speaking of Star Wars, this is friggin hilarious: The Bark Side http://t.co/6ShFy0Nt (watch to the end!) [webcraftsman]
|
January 18th |
|
|
Hoping my Internet at work is faster than it was yesterday afternoon. [webcraftsman]
|
January 17th |
|
|
Spending time with my son at Orlando Magic game. First time he has seen NBA game. #magic #NBA http://t.co/94KlRGNS [webcraftsman]
|
January 16th |
|
|
Orlando Twitterverse. Going to Magic game tomorrow night. Need suggestions on where to park. Looking for something $10 or cheaper. Thanks. [webcraftsman]
|
January 13th |
|
|
RT @_DavidSmith: I wrote a complete walk-through for using @instapaper on the Kindle. http://t.co/wSVJFpXA [webcraftsman]
|
Powered by Lifestream.
... loading ...
© 2012 Jeff Bridgforth