Moving Backgrounds With Mouse Position

Let’s say you wanted to move the background-position on an element as you mouse over it to give the design a little pizzazz. You have an element like this:

And you toss a background on it:

.module {
background-image: url(big-image.jpg);
}

You can adjust the background-position in JavaScript like this:

const el = document.querySelector("#module");

el.addEventListener(“mousemove”, (e) => {
el.style.backgroundPositionX = -e.offsetX + “px”;
el.style.backgroundPositionY = -e.offsetY + “px”;
});

See the Pen Move a background with mouse

The post Moving Backgrounds With Mouse Position appeared first on CSS-Tricks.

Read more

20+ Best Tattoo Fonts & Lettering

Many designers now use tattoo lettering fonts to give an artistic hand-drawn look to their designs. In this post, we bring you a set of tattoo style fonts you can use with your own design projects to create that same unique effect. The inconsistent, stylish, and decorative designs of the tattoo fonts help give a […]
Read more

WordPress 5.0 Slated for November 19, 2018

A tentative 5.0 release schedule was published during today’s core dev chat. The official release is targeted for November 19, 2018 with beta 1 expected October 19 and RC 1 released October 30. In addition to getting Gutenberg merged into core, the scope for 5.0 includes a few new items (more…)
Read more

The Codification of Design

Jonathan Snook on managing the complexity between what designers make and what developers end up building:

Everything that a designer draws in a Sketch or Photoshop file needs to be turned into code. Code needs to be developed, delivered to the user, and maintained by the team.

That means that complexity in design can lead to complexity in code.

That’s not to say that complexity isn’t allowed. However, it is important to consider what the impact of that complexity is—especially …

The post The Codification of Design appeared first on CSS-Tricks.

Read more

Why Will You Never Win Without Google AdSense

Google is by far the largest search engine in the world, and it can help you figure out which ads will best promote your website’s content. In this article, we will discuss how to set up Google AdSense matched content in WordPress. Google advertising products via selling a slot Google AdSense is a program used …
The post Why Will You Never Win Without Google AdSense appeared first on Torque.
Read more

How Do You Put a Border on Three Sides of an Element?

I saw a little conversation about this the other day and figured it would be fun to look at all the different ways to do it. None of them are particularly tricky, but perhaps you’ll favor one over another for clarity of syntax, efficiency, or otherwise.

Let’s assume we want a border on the bottom, left, and right (but not top) of an element.

Explicitly declare each side
.three-sides {
border-bottom: 2px solid black;
border-right: 2px solid black;
border-left: 2px

The post How Do You Put a Border on Three Sides of an Element? appeared first on CSS-Tricks.

Read more

Do You Need to Know React as a WordPress Developer?

The new WordPress content editing system Gutenberg will be powering the WordPress post editor in WordPress 5.0. Gutenberg is a “block-based” editor. When creating content, everything is a block. If you have a post that is one paragraph, one header, and then two paragraphs, that’s four blocks. Gutenberg comes with a set of default “core” …
The post Do You Need to Know React as a WordPress Developer? appeared first on Torque.
Read more