Quick Tip: LESS Mixins for Pure CSS Pinterest / Masonry style grid layout

Pinterest popularized the masonry grid style layout. Here’s a simple solution for a masonry layout built with pure CSS3, and no javascript or floats.

[css]

// Parent Element, or Container
.grid (@columns: 3, @gap: 10px, @width: 100%) {
-moz-column-count: @columns;
-moz-column-gap: @gap;
-webkit-column-count: @columns;
-webkit-column-gap: @gap;
column-count: @columns;
column-gap: @gap;
width: @width;
}

// Child Element, or Tile
.grid-box (@margin-bottom: 20px) {
display: inline-block;
margin-bottom: @margin-bottom;
width: 100%;
}

// Example: Book Shelf concept
.book-shelf {
background: #fff;
.grid (3, 10px, 960px)
}
.book {
.grid-box (15px);
}

[/css]

Based on Radu’s Masonry CSS. Check out his post for info on browser compatibility and fallbacks.

My plugin gets added to WordPress core!

WordPress 3.5 was released yesterday. After upgrading my site, I checked the editor screen and noticed a tiny tweak that made me smile. It looks like my humble suggestion finally made it in to WordPress core.

Screen Shot 2012-12-11 at 11.59.41 PM

Notice the Add Media button… it’s an actual button! The previous version of the button looked like this:

The old Upload/Insert button or link

It was an easily overlooked text and icon combo labeled “Upload/Insert” . This caused problems for users as I’ve discussed beforeI don’t know if this small change to a more clickable and noticeable “Add Media” button happened because I suggested it, but I’m glad it’s there. So after suggesting this usability improvement to the WordPress core team, their developers took notice and made it happen.

WordPress-usability-improvement-ticket

Thanks, WP devs. Also, I didn’t suggest the name change, but good choice on the new wording from “Upload/Insert” to “Add Media”. Much better.

One rule to rule them all.

lord_of_the_rings_the_fellowship_of_the_ring-to-rule-them-all

Impossible to please.

21 Not everyone who calls me their Lord will get into the kingdom of heaven. Only the ones who obey my Father in heaven will get in. 22 On the day of judgment many will call me their Lord. They will say, “We preached in your name, and in your name we forced out demons and worked many miracles.” 23 But I will tell them, “I will have nothing to do with you! Get out of my sight, you evil people!”

– Matthew 7:21-23, CEV

In the past felt a hopeless desperation to figure out what exactly it meant to “obey my Father in heaven”. It felt impossible to know that I was doing the will of God.

Listen to the words that are coming out of my mouth.

Today, for the first time, I thought about this section of Jesus’ sermon a little differently and felt a little hope grow inside:

  • Jesus is the image of God the Father on earth.
  • Jesus’ words are God’s words.
  • Obeying Jesus’ teaching is obeying the Father in heaven.

So… what did Jesus teach? Well, a lot, but The Golden Rule sums it up nicely.

12 Treat others as you want them to treat you. This is what the Law and the Prophets are all about.

– Matthew 7:12, CEV

When in doubt, I just focus on that.

Breaking the cycle: Why I’m voting for a 3rd party candidate.

This is an old problem

Politics in America bend to the will of two parties: Democrats and Republicans. Why?

  1. Money. Big dollars bank roll these two parties. It takes a lot of money to keep your agenda in the news and part of the culture. Brain-washing is expensive. Which brings us to reason number two.
  2. Exposure. They are the loudest parties. They get the most press time and overall attention from major media companies.

Affiliation with, or much less voting for, a party that is neither blue nor red seems foolish. Everybody knows the president is going to come from one of the two big parties. If your values, principles, knowledge of history, or opinions about who would be best for the country bring you to the conclusion that your ideal candidate is not part of the two-party system, you must choose the lesser of two evils, right? It’s the only strategic move, right?

Wrong.

The way out = Principles + Money + Votes

If we continue to vote for the least evil candidate, there will never be other options. Someone must decide to open the door for a more diverse political landscape. The Federal Election Commission allows any party that receives at least 5% of the general election to gain access to federal monies specifically set aside for presidential campaigns. http://www.fec.gov/press/bkgnd/fund.shtml

Since no third-party candidate received 5% of the vote in 2008, only the Republican and Democratic parties are eligible for 2012 convention grants, and only their nominees may receive grants for the general election when they are nominated. Third-party candidates could qualify for retroactive public funds if they receive 5% or more of the vote in the general election.

Some say the electoral college really chooses the presidential election winner so the popular vote doesn’t really matter. But the popular vote does matter. Even if it’s just a bit. Just enough to give a third-party the wedge they need to get into the public’s spotlight a little more.

If your principles line up more with a third-party, then don’t give up hope. Support the candidates you believe in. Vote for what you believe in.

How do you know which candidate lines up with your principles?

I use tools like  VoteSmart.org, ISideWith.comBrigade.com, and OnTheIssues.org to learn who actually makes decisions in favor of things I value. I use FiveThirtyEight.com to keep track of the polls in real time.

Find the candidate that aligns the most with your principles, opinions, morals, economic philosophy, or whatever you really believe would be best for our country. Vote for that person with a clear conscience. You’ve done your part.

The END of the WORRRRLD!

I know, I know, every election is literally the end of all humanity if the other candidate is elected. Remember in 2000 when the Earth exploded upon the election of Bush? Remember in 2008 when the Solar System vaporized when Obama was elected?

Nope.

But maybe this time it really is the end. Maybe if Dollary Clump, or Honald Trinton,  gets elected the galaxy will finally lose hold of itself and collapse deservedly into its own blackhole.

And of course, Aliens

Either way, the newly elected president will obviously walk directly into a meeting with the secret aliens to accept his marching orders. So… why not go down in history as voting for what matters to you!

[Updated for 2016]

Worx WG787 Cordless Electric Lawn Mower Review

The best mower I’ve ever used

After moving from an apartment into a house with a grassy yard, I headed up to Lowes for some lawn mower shopping with my son. We eventually chose the Worx WG787 Cordless Electric Lawn Mower for three reasons:

MY FAVORITE FEATURES:

  1. No gas.
  2. No cords.
  3. Quiet Mode.

OTHER GREAT FEATURES:

  • Cuts up to 15,000 square feet on a single charge
  • Up to 45 minutes of runtime
  • 3-in-1 cutting for mulching, bagging, or rear discharge; push-button starting
  • Adjustable mowing height from 1.5 to 3.5 inches; 17-inch cutting width
  • IntelliCut mowing technology adds torque when you’re cutting tough grass
  • Special mulching blade chops up clippings better than standard blades

Over the past few months I’ve put these features to the test during the fast-growing sub-tropical Alabama summer.

Smart Design

The Worx 787 proves to be a lightweight, but durable, grass-eating beast that’s easy to maneuver. A hefty 12-volt rechargeable/removable battery makes up the bulk of the mower’s weight. Its lightness makes it feel deceptively delicate, but it’s actually pretty tough. I’ve banged it around the front and back yard in bumpy muddy weed-heavy terrain without any problems.

The battery slides in and out of the mower body with ease. So easily in fact, if the mower tips over while in use the battery actually falls out, turning off the blade motor. At first I thought this was a flaw, but I realized it may be a safety feature since the blades are exposed if the mower is on its side. Even if it wasn’t an intentional decision by the industrial designers, I appreciate the feature while doing yard work with kids around.

And of course, the battery-powered device is free from the hassle managing cords.

I do wish the wheels were a bit larger, to help it cruise through deep overgrowth a bit better, but if you mow regularly, it’s not an issue.

Politely powerful

The Quiet Mode has a clever feature called Intellicut, which ramps up the power if you need it, but remains quieter than a hair dryer so you can mow at night without disturbing your neighbors. Not that you’d want to mow at night, but if you’re like me, you may want to get some yard work in while the kids are taking a nap.

Treat yourself to the best cordless electric mower around… or the bigger one.

Now that I’ve owned the Worx 787 for several months I have zero regret. Simple, clean, and surprisingly quiet, it dominates the lawn. Buy it on amazon.com

Or check it its big brother, the more powerful self-propelled model.

Anybody else have a favorite mower?

Locked Mess Monster

Better photoshop locked layer alert idea

Have you ever tried to move a folder or selection of layers in Photoshop, but were interrupted by this alert?

Photoshop locked layer alert
BLAM! Those layers aren’t moving anywhere.

Somewhere deep down in your selection is a locked layer. If you’re working in a huge file with tons of layers, finding the locked layer or layers could take awhile.

Wouldn’t this be more helpful than just an alert?

Photoshop unlock layer option
SKUDOOSH! Problem solved.

The Photoshop team could add a checkbox to the alert that would automatically unlock the locked layers, so that you can continue moving/nudging your selection.

This small usability improvement would save me a lot of time.

Does anyone know if another solution to this problem already exists in Photoshop? Let me know in the comments section below.