::before vs :before

Note the double-colon ::before versus the single-colon :before. Which one is correct?

Technically, the correct answer is ::before. But that doesn’t mean you should automatically use it.

The situation is that:

  • double-colon selectors are pseudo-elements.
  • single-colon selectors are pseudo-selectors.

::before is definitely a pseudo-element, so it should use the double colon.

The distinction between a pseudo-element and pseudo-selector is already confusing. Fortunately, ::after and ::before are fairly straightforward. They literally add something new to the page, an element.…

The post ::before vs :before appeared first on CSS-Tricks.

Read more

A Basic WooCommerce Setup to Sell T-Shirts

WooCommerce is a powerful eCommerce solution for WordPress sites. If you’re like me, and like working with WordPress and have WordPress-powered sites already, WooCommerce is a no-brainer for helping you sell things online on those sites. But even if you don’t already have a WordPress site, WooCommerce is so good I think it would make sense to spin up a WordPress site so you could use it for your eCommerce solution.

Personally, I’ve used WooCommerce a number of times to …

The post A Basic WooCommerce Setup to Sell T-Shirts appeared first on CSS-Tricks.

Read more

20+ Business Flyer Templates (Word & PSD)

Today we’re bringing you a collection of the best business flyer templates to help you design professional flyers to promote your business and upcoming events. Flyers are an important part of promoting a business. Whether it’s a business conference, a networking event, or even promoting a service, you need a perfectly designed flyer to attract […]
Read more

Torque Toons: A New Motto

Facebook’s old motto, “Move fast and break things”, hasn’t aged well and is still often embraced by many new start ups. It got me thinking that maybe it’s time for a new motto for the web. Don’t forget to check out our other editorial toons!
The post Torque Toons: A New Motto appeared first on Torque.
Read more

Advanced OOP For WordPress Part 9: Extensible Plugins Using the Plugins API

In this series on applying advanced object-oriented programming (OOP) principles to the PHP code we use in WordPress plugins, we are creating a plugin that modifies how REST API routes work to improve their search capabilities. One of the great things about WordPress is its extensibility. In this post, I’m going to walk through using …
The post Advanced OOP For WordPress Part 9: Extensible Plugins Using the Plugins API appeared first on Torque.
Read more

10 Poster Design Ideas & Inspiration

Creating a poster can be one of the most fun – or frustrating – design projects that you ever take on. Posters are a highly visible, public design project that can lead people to attend an event or generate buzz about something. These designs are often large in scale and there’s nothing like seeing something […]
Read more

Using feature detection to write CSS with cross-browser support

In early 2017, I presented a couple of workshops on the topic of CSS feature detection, titled CSS Feature Detection in 2017.

A friend of mine, Justin Slack from New Media Labs, recently sent me a link to the phenomenal Feature Query Manager extension (available for both Chrome and Firefox), by Nigerian developer Ire Aderinokun. This seemed to be a perfect addition to my workshop material on the subject.

However, upon returning to the material, I …

The post Using feature detection to write CSS with cross-browser support appeared first on CSS-Tricks.

Read more