Archive

Archive for November, 2020

What’s Missing from CSS?

November 21st, 2020 No comments

The survey results from the State of CSS aren’t out yet, but they made this landing page that randomly shows you what one person wrote to answer that question. Just clicking the reload button a bunch, I get the sense that the top answers are:

  • Container Queries
  • Parent Selectors
  • Nesting
  • Something extremely odd that doesn’t really make sense and makes me wonder about people

Direct Link to ArticlePermalink


The post What’s Missing from CSS? appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Categories: Designing, Others Tags:

How You Might Build a Modern Day Webring

November 20th, 2020 No comments

I’m sure different people picture different things when they think about webrings, so let me clarify what I picture. I see an element on a website that:

  1. Signifies this site is part of a webring
  2. Allows you to move to the next or previous site of the webring
  3. Maybe has other functionality like going to a “random” site or seeing the complete list

But then another major thing:

  1. Site owners don’t have to do much. They just plop (it?) on the site and a functional webring UI is there.

So like this:

A Calvin & Hobbes webring UI that comes up all the time when you search the web about webrings

How did it used to work? You know what? I have no idea. My guess is that it was an ancient situation, but this stuff is before my time a bit. How might we do this today?

Well, we could use an , I guess. That’s what sites like YouTube do when they give “embed code” as an HTML snippet. Sites like Twitter and CodePen give you a

(or whatever semantic HTML) and a , so that there can be fallback content and the script enhances it into an . An might be fine, as it asks very little of the site owner, but they are known to be fairly bad for performance. It’s a whole document inside another document, after all. Plus, they don’t offer much by the way of customization. You get what you get.

Another problem with an iframe is that… how would it know what site it is currently embedded on? Maybe a URL parameter? Maybe a postMessage from the parent page? Not super clean if you ask me.

I think a Web Component might be the way to go here, as long as we’re thinking modern. We could make a custom element like . Let’s do that, and make it for CSS sites specifically. That’ll give us the opportunity to send in the current site with an attribute, like this:

<webring-css site="http://css-tricks.com">
  This is gonna boot itself up into webring in a minute.
</webring-css>

That solves the technology choice. Now we need to figure out the global place to store the data. Because, well, a webring needs to be able to be updated. Sites need to be able to be added and removed from the webring without the other sites on the webring needing to do anything.

For fairly simple data like this, a JSON file on GitHub seems to be a perfectly modern choice. Let’s do that.

Now everyone can see all the sites in the webring in a fairly readable fashion. Plus, they could submit Pull Requests against it to add/remove sites (feel free).

Getting that data from our web component is a fetch away:

fetch(`https://raw.githubusercontent.com/CSS-Tricks/css-webring/main/webring.json`)
  .then((response) => response.json())
  .then((sites) => {
     // Got the data.
  });

We’ll fire that off when our web component mounts. Let’s scaffold that…

const DATA_FOR_WEBRING = `https://raw.githubusercontent.com/CSS-Tricks/css-webring/main/webring.json`;

const template = document.createElement("template");
template.innerHTML = `
<style>
  /* styles */
</style>

<div class="webring">
  <!-- content -->
</div>`;

class WebRing extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: "open" });
    this.shadowRoot.appendChild(template.content.cloneNode(true));

    fetch(DATA_FOR_WEBRING)
      .then((response) => response.json())
      .then((sites) => {
        // update template with data
      });
  }
}

window.customElements.define("webring-css", WebRing);

The rest of this isn’t so terribly interesting that I feel like we need to go through it step by step. I’ll just blog-sketch it for you:

  1. Pull the attribute off the web component so we can see what the current site is
  2. Match the current site in the data
  3. Build out Next, Previous, and Random links from the data in a template
  4. Update the HTML in the template

And voilà!

CodePen Embed Fallback
Could you do a lot more with this, like error handling, better design, and better everything?

Yes.


The post How You Might Build a Modern Day Webring appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Categories: Designing, Others Tags:

A Dynamically-Sized Sticky Sidebar with HTML and CSS

November 20th, 2020 No comments

Creating page content that sticks to the viewport as you scroll, something like a jump-to-anchor menu or section headings, has never been easier. Throw a position: sticky into your CSS ruleset, set the directional offset (e.g. top: 0) and you’re ready to impress your teammates with minimal effort. Check out this CSS-Tricks article to see some real fancy sticky positioning use cases.

But sticky positioning can get a bit tricky, particularly when it comes to height and the dangerous situation of hiding content in a position that can’t be scrolled to. Let me set the stage and show you the problem and how I fixed it.

I recently worked on a desktop layout that we’re all familiar with: a main content area with a sidebar next to it. This particular sidebar contains action items and filters that are pertinent to the main content. As the page section is scrolled, this component remains fixed to the viewport and contextually accessible.

CodePen Embed Fallback

The layout styling was as easy to implement as I had mentioned earlier. But there was a catch: The height of the component would vary based on its content. I could have capped it with a max-height and set overflow-y: auto to make the component content scrollable. This worked well on my laptop screen and my typical viewport height, but in a smaller viewport with less vertical real estate, the sidebar’s height would exceed the viewport.

When the sticky sidebar height is larger than the viewport, some of its content becomes inaccessible until reaching the bottom of the container, when the element is no longer sticky.

That’s where things got tricky.

Thinking through solutions

I initially considered reaching for a media query. Perhaps I could use a media query to remove the sticky positioning and have the component sit relative to the top of the sidebar container. This would grant access to the entirety of its content. Otherwise, when scrolling the page, the sticky component’s content is cut off at the bottom of the viewport until I reach the end of its parent section.

Then I remembered that the height of the sticky component is dynamic.

What magic value could I use for my media query that would handle such a thing? Perhaps instead I could write a JavaScript function to check if the component flows beyond the viewport boundaries on page load? Then I could update the component’s height…

That was a possibility.

But what if the user resizes their window? Should I use that same function in a resize event handler? That doesn’t feel right. There must be a better way to build this.

Turns out there was and it involved some CSS trickery to get the job done!

Setting up the page section

I started with a flex display on the main element. A flex-basis value was set to the sidebar for a fixed desktop width. Then the article element filled the rest of the available horizontal viewport space.

If you’re curious about how I got the two containers to stack for smaller viewports without a media query, check out The Flexbox Holy Albatross trick.

I added align-self: start to the sidebar so its height wouldn’t stretch with the main article (stretch is the default value). This gave my positioning properties the ability to cast their magic:

.sidebar {
  --offset: var(--space);
  /* ... */
  position: sticky;
  top: var(--offset);
}

Check that out! With these two CSS properties, the sidebar element sticks to the top of the viewport with an offset to give it some breathing room. Notice that the top value is set to a scoped CSS custom property. The --offset variable can now be reused on any child element inside the sidebar. This will come in handy later when setting the sticky sidebar component’s maximum height.

You can find a list of global CSS variable declarations in the CodePen demo, including the --space variable used for the offset value in the :root ruleset.

The sticky sidebar

Keep in mind that the component itself is not what is sticky; it’s the sidebar itself. General layout and positioning should typically be handled by the parent. This gives the component more flexibility and makes it more modular to use in other areas of the application.

Let’s dive into the anatomy of this component. In the demo, I’ve removed the decorative properties below to focus on the layout styles:

.component {
  display: grid;
  grid-template-rows: auto 1fr auto;
}


.component .content {
  max-height: 500px;
  overflow-y: auto;
}
  • This component uses CSS Grid and the pancake stack idea from 1-Line Layouts to configure the rows of this template. Both the header and footer (auto) adjust to the height of their children while the content (1fr, or one fraction unit) fills up the rest of the open vertical space.
  • A max-height on the content limits the component’s growth on larger screen sizes. This is unnecessary if it’s preferred that the component stretch to fill the viewport height.
  • overflow-y: auto allows the content to be scrolled when necessary.

When the component is being used in the sidebar, a max-height is needed so that it doesn’t exceed the viewport height. The --offset previously scoped to the .sidebar class is doubled to create a margin on the bottom of the element that matches the top offset of the sticky sidebar:

.sidebar .component {
  max-height: calc(100vh - var(--offset) * 2);
}

That wraps up the assembly of this sticky sidebar component! After some decorative styles were applied, this prototype became ready for testing and review. Give it a try! Open up the demo in CodePen and click on the grid items to add them to the sidebar. Resize your browser window to see how the component flexes with the viewport while staying in view as you scroll the main content section.


This layout may work well on a desktop browser, but isn’t entirely ideal for smaller devices or viewport widths. However, the code here provides a solid foundation that makes it easy to add improvements to the UI.

One simple idea: A button could be affixed to the viewport window that, when clicked, jumps the page down to the sidebar content. Another idea: The sidebar could be hidden off-screen and a toggle button could slide it in from the left or right. Iteration and user testing will help drive this experience in the right direction.


The post A Dynamically-Sized Sticky Sidebar with HTML and CSS appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Categories: Designing, Others Tags:

Top New CMS Plugins, November 2020

November 20th, 2020 No comments

Since there are so many CMS plugins out there, it can be overwhelming to choose the best ones for your website. We’ve done the research for you; this list contains the top new CMS plugins for November 2020. You’ll find useful plugins for WordPress, Craft, Shopify, and Joomla.

Let’s get started…

WordPress

404 Page Editor

404 Page Editor is a simple WordPress plugin that helps you add custom text to the default 404 page on your website. The plugin comes with seasonal and industry-related 404 templates. One useful feature of the plugin is that it backups your current 404 page before changing it. So you can restore the backup page anytime you choose. The plugin duplicates your current 404.php page to wp-content/uploads/404-page-editor/ so you can easily find it. You can also change the text on the plugin to fit your local dialect.

UnusedCSS Power-Up

Most WordPress themes and plugins load their CSS in the wrong areas of your website. This can slow down your site. A slow website will reduce user experience and lead to increased bounce rates.

UnusedCSS will help reduce the size of your website’s CSS files by up to 95%. The best part is that the plugin works automatically. It will remove any unused CSS when visitors view any page on your website. UnusedCSS will automatically reduce your website’s load times by reducing your CSS files and page size. The plugin also optimizes the performance of other WordPress plugins and extensions. UnusedCSS also works with WooCommerce themes and plugins.

Simple Redirects

Simple Redirects is a WordPress plugin that helps you to automatically redirect requests to another page on your site or any other place on the web. The plugin allows you to easily redirect users from your old web pages to new pages using 301 or 302 redirects. You don’t have to worry about losing backlinks or page rank. Any incoming links to the old web page will be automatically passed along to the new page. The page rank on the old page is also transferred to the new page. The plugin is useful when migrating a WordPress site when don’t want to retain the URL structure.

HTML Validation

HTML Validation plugin helps you identify any HTML validation errors on your website. The plugin works automatically in the background of your website and will send you regular reports. There is a progress bar on the report screen to show you the progress of the scan. The plugin uses WordPress Cron to scan the content of your website. There is also an option for the plugin to automatically fix any HTML validation issues on your website. You can also choose to fix the issues manually.

Just Highlight

Just Highlight is a simple WordPress plugin that helps you highlight text in your posts or pages. You can use this plugin to highlight any portion of the page you want to draw the reader’s attention to. You can highlight the background of the page and also add animation to the highlighted text. In the WordPress admin area, you can change the speed and color of the animation. The plugin is compatible with Gutenberg, and the WordPress classic editor.

DeviantArt Embed

DeviantArt Embed is a simple plugin that helps you embed any work from Deviant Art into a post. The plugin provides a block for the WordPress block editor so you can easily embed the image. It uses a DeviantArt oEmbed API to pull the images and their descriptions, and creates an embedded image.

Static Optimizer

Static Optimizer is a static file optimization plugin that serves and optimizes static files on your website. The plugin will help you increase your website speed by automatically compressing your static files. It is easy to set up, you just need an API key to get started. Other useful features that the plugin offers include automatic JS and CSS minification, automatic image optimization, and processing of responsive images. You don’t have to worry about losing your files if their server is down. The plugin automatically backs up your files and will load your original files when their servers are down (either because of an upgrade, maintenance, or outage). By default, only images are compressed when you activate the plugin; you can also choose to optimize fonts, CSS, and JS files.

RankBear

RankBear is a keyword rank tracker plugin that helps you analyze your SEO efforts. With RankBear, you can track the keywords for each of the posts and pages on your site. While the plugin has a paid plan, you can track up to five keywords for free. On the free plan, you will receive weekly reports on each keyword you are tracking. You can search for the rank and volume of a keyword in every location supported by the Google search engine. RankBear is a lightweight software-as-a-service plugin hosted by Amazon Cloud Services. The plugin also offers the option to download the keyword reports to CSV.

Table of Contents Block

Table of Contents Block is a plugin that allows you to easily create a Table of Contents for your WordPress posts. The plugin is lightweight and will automatically add a Table of Content in your website’s posts and pages. You can select the heading tags you want to add to the Table of Content. It also has a dedicated support team to assist you. The plugin works fine with all standard WordPress themes.

Markease For WooCommerce

Markeaze is an all-in-one communication plugin that allows you to add live chat to your online stores. The plugin will help you improve your customer service by decreasing your response times. With the plugin, you can collect your visitor’s contact information via a widget. This feature is useful in building a subscriber database. You can also use the plugin to track customer behavior on your site, inform customers about new products, help customers with active orders, and collect customer feedback. You can also use the auto-reply function to answer commonly asked questions.

Craft CMS

Image Toolbox

Image Toolbox is a Craft CMS plugin that offers image-related tools for your templates. The plugin will automatically create a WebP variant of the images you upload. It also has a fallback for browsers that do not support WebP images. Other useful features the plugin offers include automatic creation of placeholder images and generation of responsive images with multiple variants. The plugin also supports Imager-X (or old Imager).

Element Panel

Element Panel plugin allows you to add elements and an eager-loading panel to the debug toolbar. This feature will help you benchmark your templates in Craft CMS. For elements, the panel has a dashboard that shows how many elements are populated. It also shows how many elements are duplicates. The plugin also shows you how many eager-loading elements are detected. Duplicate elements are grouped by field name.

Shopify

VStore Shoppable Videos

VStore Shoppable Videos is a Shopify plugin that allows your customers to shop directly from your videos. The plugin allows you to embed your products into any video. Since videos have a high engagement rate, this plugin will significantly improve your store’s conversion rates.

ProofMotion Video Testimonials

ProofMotion Video Testimonials plugin helps you to easily collect video testimonials. The plugin sends an automated email or SMS requests to customers asking for their satisfaction feedback after making a purchase. The responses are analyzed to determine whether the customer had a negative or positive experience. Customers that offer negative feedback are sent to customer care to help them with the problem they encountered. Happy customers are prompted to make video testimonials of their positive shopping experience. ProofMotion guides the customer through the interview so they can give the best testimonial. They also offer an on-site widget so you can easily share your testimonials.

Real ID

Real ID is a Shopify plugin that allows you to verify customers’ real identity using a photo ID and facial biometrics. The plugin is perfect for orders that have an age restriction, verifying flagged fraud goods, and selling expensive goods. Real ID will help you identify whether a government-issued-ID is fake during fulfilment. All the customer needs to do is take a selfie on their phone. This way, even if a customer has access to a stolen physical ID, they won’t still be able to make any purchase. The plugin can verify documents such as passports, visas, national IDs, driver licenses, and more. Real ID will help you handle GDPR compliance. The plugin is available in hundreds of countries around the world.

Joomla

Accessibility

Accessibility is a Joomla plugin that allows your website visitors to easily access your website content. The plugin will remove any barrier between the visitor and your Joomla site. There is no coding required and you can customize the plugin directly from the module manager. The plugin has a useful feature called Dyslexic Readability; this feature allows your visitors to set the entire document font to a dyslexic-friendly font. Visitors can also grayscale the page, resize the fonts, and resize the word space. From the backend module, you can add any custom CSS and JS. The plugin is also available in 12 different languages.

Reading Time

Reading Time is a simple plugin that will help you easily show the reading time of your Joomla articles. The plugin is easy to set up and does not require any coding. You can customize every parameter, including the text, in minutes. You can also choose to exclude categories, articles, and menu items. Reading Time also allows you to easily add custom CSS code from the plugin parameters.

Featured image via Pexels.

Source

Categories: Designing, Others Tags:

console.log({ myVariable });

November 19th, 2020 No comments

I think this might be my most popular tweet of all time, but I’m not sure how to verify that these days. I’ll restate this neat little trick here because blogging is cool and fun.

I used to do this a lot while debugging JavaScript:

console.log("myVariable: ", myVariable);

But now I do this because it’s just easier to type quickly:

console.log({ myVariable });

And you don’t miss out on anything in DevTools:

Now that this is a blog post, I can elaborate a smidge…

The output display there (and really, console.log itself) is a DevTools thing, but the syntax isn’t. By using curly brackets in JavaScript, I’m creating an object. I don’t have to assign an object to anything, it can just be.

{
  foo: "bar"
}

You see that a lot when passing an object to a function, like myFunction({ config: options });. The “trick” is that when you’re making an object, you can “shorthand” it by providing only a variable, which makes it implied). So like:

const fruit = "apple";

// Shorthand
let x = {
  fruit
}

console.log(x);

// Normal way, literally the same exact thing
x = {
  "fruit": fruit
}

console.log(x); // identical

When you have a variable and you log it like console.log({ myVariable }); you’re using that shorthand object creation syntax and it gets logged like the object it becomes.

One strike against this idea is that sometimes DevTools chooses to output it as ? Object and you have to click to open to see the value. I don’t know what the heuristics are of when it chooses to do that and when it doesn’t. If you don’t like that, or the output format of an object in general, you might prefer the console.table({ myVariable }); format:


The post console.log({ myVariable }); appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Categories: Designing, Others Tags:

mediastack

November 19th, 2020 No comments

Have you ever had the idea for a website or new app that involved showing news content? You don’t have to create content yourself to have the right to build an innovative news reading experience. I remember when Flipboard came out. They didn’t (and still don’t) actually produce content — they just made a fantastic experience for reading it, and did very well with that.

Where do you get that news content? mediastack. You’re going to need a great API for delivering news content, and that’s exactly what mediastack is.

You sign up and get an API key. It’s free to use for 500 requests/month, which is enough to prototype what you’re building, particularly if you’re being smart about caching responses. Then, when you need more requests, it scales up very reasonably in price.

Gotta love a good API that does exactly what you need it to do, so you can get to work.

Another thing I like about mediastack is that it’s from apilayer, who have been doing APIs like this for a long time. Their whole business is about providing purpose-built APIs for tasks that developers need to do. I like it when companies are incentivized to do a good job for you because you’re very directly their customer and using their product for exactly what it’s for.


The post mediastack appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Categories: Designing, Others Tags:

Color Theming with CSS Custom Properties and Tailwind

November 19th, 2020 No comments
A box with a light red heading that reads join our mailing list above a dark red body that reads be the first to hear about our new offerings right before a red signup button.

Custom properties not only enable us to make our code more efficient, but allow us to work some real magic with CSS too. One area where they have huge potential is theming. At Atomic Smash we use Tailwind CSS, a utility class framework, for writing our styles. In this article, we’ll look at how custom properties can be used for theming, and how we can integrate them with Tailwind to maximize the reusability of our code. We won’t cover getting up and running with Tailwind — check out the official documentation for that — but even if you’re new to it you might find some of these tips useful.

Theming overview

Let’s say we have a “Call To Action” (CTA) component with a heading, body copy, and button.

Writing regular (non-Tailwind) CSS for this color scheme would look something like this:

.cta {
  background-color: #742a2a; // dark red
  color: #ffffff; //white
}
    
.cta__heading {
  background-color: #e53e3e; // medium red
  color: #742a2a;
}


.cta__button {
  background-color: #e53e3e;
}

Using Tailwind, we would apply these colors as utility classes in our HTML:

<div class="bg-red-900 text-white">
  <h3 class="bg-red-600 text-red-900">Join our mailing list</h3>
  <div>
    <p>Be the first to hear about our new offerings</p>
    <button class="bg-red-600" type="button">Sign up</button>
  </div>
</div>

I’ve deliberately left out classes relating to anything other than the basic color scheme, but you can see the example in its entirety in this demo:

CodePen Embed Fallback

Now, if we wanted to apply a different color scheme to our component, we would need to override the color values of our original component. Without Tailwind, a common way to do that would be to append a theme class to the component itself, and redefine the color values lower down in the cascade. So for a component with a modifier class of .cta--blue (using the BEM convention) we’ll apply the CSS values for a blue color scheme:

.cta--blue {
  background-color: #2a4365; // dark blue
}


.cta--blue .cta__heading {
  background-color: #3182ce; // medium blue
  color: #2a4365;
}


.cta--blue .cta__button {
  background-color: #3182ce;
}
A box with a light blue heading that reads join our mailing list above a dark bluebody that reads be the first to hear about our new offerings right before a blue signup button.

If we’re using Sass or another preprocessor, it’s likely we’ll make life easier for ourselves by using variables for those color names, and we might nest the .cta__heading and .cta__body selectors. It doesn’t exactly make our code more concise, but it does make it more manageable by having a single place to update those values.

Now, suppose we have 10 different color schemes, as was my experience on a recent project. Our code starts to get longer, as we’re basically duplicating the above example 10 times in order to change those color values. Now imagine every component in our design system needs 10 color schemes, and many of those components are far more complex than our simple CTA. Maybe our themes need different fonts too. Suddenly we have a lot of CSS to write.

Theming with Tailwind

If we’re using Tailwind, on the other hand, we’d need to change multiple classes in the HTML itself. Even if we’re using a JavaScript framework, like React or Vue, this is not exactly a trivial task. In order to ensure unused styles are removed in a production build, Tailwind discourages the use of string concatenation for class names (at the time of writing). So building our themes means potentially piling a lot of logic into our components.

Theming with Custom Properties

By using custom properties for our color themes, we can drastically reduce the amount of code we need to write, and alleviate the maintenance burden. Let’s first take a look at how we can do this in regular CSS.

We define our custom properties as variables on the :root selector, making them global variables. (The body selector would serve us just as well.) Then we can use those variables in a selector, in place of our color property values:

:root {
  --primary: #742a2a; // dark red;
  --secondary: #e53e3e; // medium red
}


.cta {
  background-color: var(--primary);
  color: white;
}


.cta__heading {
  background-color: var(--secondary);
  color: var(--primary);
}


.cta__button {
  background-color: var(--secondary);
}

This is where the real magic happens: now the code for creating each of our themes becomes a case of only updating those custom property values. The new values will be inherited wherever we apply our theme class:

.th-blue {
  --primary: #2a4365; // dark blue
  --secondary: #3182ce; // medium blue
}

If we want a blue color scheme, we can apply that .th-blue class to the component, or even use it on the tag to apply to apply a page-wide theme, which can be overridden on individual components as desired. Using a utility class potentially saves us writing even more code compared to a component-specific class (such as .cta--blue in the original code), as it could be applied anywhere in our codebase.

CodePen Embed Fallback

Handling older browsers

Like many agencies, plenty of our clients at Atomic Smash still require us to support Internet Explorer 11. While I’m okay with a progressive enhancement approach in most cases (by providing simpler fallback layouts for browsers that don’t support CSS Grid, for instance), I find theming is one area that often doesn’t allow for easy compromise. Clients want their brand colors and fonts seen, even on older browsers. Providing fallbacks using feature queries would entail a lot of extra work that would negate the benefits of using custom properties in the first place. To overcome this, we need a polyfill.

There are a couple of options for polyfilling custom properties in IE 11.

postcss-custom-properties

The first is using a PostCSS plugin called postcss-custom-properties. If you’re already using PostCSS in your workflow, this is fairly simple to add. It works by processing your CSS and outputting the result of the variable as the property value. So if you have the following CSS:

:root {
  --color: red;
}


h1 {
  color: var(--color);
}

The processed result will be:

h1 {
  color: red;
  color: var(--color);
}

Browsers that don’t support custom properties will ignore the second rule and fall back to the regular property value. There is also an option to remove the rules with the custom properties in the output, so the file size will be smaller. This means that no browsers will get the custom property — which is an issue if you’re updating variables dynamically — but you’ll be able to use them for static values in your code with no ill effects.

Unfortunately this polyfill has some limitations:

  1. You need to specify the file (or files) in your config where you’re defining the custom properties.
  2. Custom properties can only be defined on the :root selector.

The first limitation is relatively trivial, but the second unfortunately renders this polyfill entirely useless for our theming use case. It means we can’t redefine variables on a selector to create our themes.

ie11CustomProperties

This polyfill option involves serving a client-side script, rather than preprocessing the CSS. We can add the following script to our head to ensure the polyfill will only be loaded in IE 11:

<script>window.MSInputMethodContext && document.documentMode && document.write('<script src="https://cdn.jsdelivr.net/gh/nuxodin/ie11CustomProperties@4.1.0/ie11CustomProperties.min.js"></script>');</script>

This permits us to enjoy the full benefits of custom properties as in the examples here, so it’s the solution I decided to go with. It has a limitation where custom properties set in style attributes aren’t polyfilled. But I’ve tested it for the theming example above and it works just fine.

But what does this have to do with Tailwind?

As we’ve already seen, utility classes — single-purpose classes that can be applied anywhere in our HTML — can make our code more reusable. That’s the main selling point of Tailwind and other utility class frameworks — the size of the CSS file you ship should end up smaller as a result. Tailwind makes multiple color classes available: .bg-red-medium would give us a red background-color property value, .text-red-medium for color and so on for border, box-shadow, or any place you can think of that you might need a color value.

Colors can be defined in a config file:

module.exports = {
  theme: {
    colors: {
      red: {
        medium: '#e53e3e',
        dark: '#742a2a'
      },
      blue: {
        medium: '#3182ce',
        dark: '#2a4365'
      }
    }
  }
}

If we want to use custom property values for our Tailwind classes, we can specify them in the config:

module.exports = {
  theme: {
    colors: {
      'th-primary': 'var(--primary)',
      'th-secondary': 'var(--secondary)'
    }
  }
}

I’m prefixing my colors and theme-related class names with th- so that it’s obvious they’re specifically related to theming, but feel free to use whatever convention suits you.

Now those classes will be available to us through Tailwind. Using .bg-th-primary gives us the equivalent of writing:

.some-element {
  background-color: var(--primary);
}

In our CSS we can define our custom properties for our themes as before:

:root {
  --primary: #742a2a;
  --secondary: #742a2a;
}


.th-blue {
  --primary: #2a4365;
  --secondary: #3182ce;
}

Let’s apply those classes to our HTML. The first example gives us a component with our default theme (the variables defined on the :root). The second has our blue theme. The only difference is the addition of the .th-blue class on the component. (Once again, I’ve omitted the classes unrelated to the theme, for brevity and clarity.)

<!--Component with default (red) theme-->
<div class="bg-th-primary">
  <h3 class="bg-th-secondary text-th-primary">Join our mailing list</h3>
  <div>
    <p>Be the first to hear about our new offerings</p>
    <button class="bg-th-secondary" type="button">Sign up</button>
  </div>
</div>


<!--Component with blue theme-->
<div class="th-blue bg-th-primary">
  <h3 class="bg-th-secondary text-th-primary">Join our mailing list</h3>
  <div>
    <p>Be the first to hear about our new offerings</p>
    <button class="bg-th-secondary" type="button">Sign up</button>
  </div>
</div>

Using the config as a style guide

Tailwind encourages you to define all variables in the config, and personally I agree that it’s a better approach. It means that the config file can be a single source of truth rather than (potentially) ending up with multiple places to define your colors and other theme values. Luckily, we can also use values from the Tailwind config file for our custom properties. We’ll need to first define all of our colors in the config (assuming we’re not using the default color palette included with Tailwind):

module.exports = {
  theme: {
    colors: {
      red: {
        medium: '#e53e3e',
        dark: '#742a2a'
      },
      blue: {
        medium: '#3182ce',
        dark: '#2a4365'
      },
      'th-primary': 'var(--primary)',
      'th-secondary': 'var(--secondary)'
    }
  }
}

Then we can access the theme object in the CSS:

:root {
  --th-primary: theme('colors.red.dark');
  --th-secondary: theme('colors.red.medium');
}


.th-blue {
  --th-primary: theme('colors.blue.dark');
  --th-secondary: theme('colors.blue.medium');
}

Wrapping up

I’m really excited about the benefits of being able to use custom properties without having to worry about browser support, even more so to be able to integrate them smoothly with our existing workflow. It’s hard to overstate the amount of time they will save us for theming. I hope that even if you’re not a Tailwind user, this article might encourage you to give custom properties a go for this use case.


The post Color Theming with CSS Custom Properties and Tailwind appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Categories: Designing, Others Tags:

Communicating with Donors in a Crisis: 4 Nonprofit Strategies

November 19th, 2020 No comments

Nonprofit professionals like yourself understand how important it is to develop relationships with your donors.

By developing relationships, you can encourage supporters to continue contributing in the future and to get involved with other aspects of your organization, such as volunteering or attending events.

The most important way that you can build the foundation for and continue developing these relationships is through effective communication. Historically, you may have used platforms like email, social media, direct mail, phone conversations, or even face-to-face meetings to keep up with your supporters.

Now, the tides of communication have shifted slightly. The COVID-19 crisis has created an environment where communication is even more important, but yet it is different and (in some ways) more difficult to accomplish than before.

Communicating with donors during a crisis requires additional planning and likely some adjustments to your nonprofit’s strategic plan. In this guide, we’ll be covering some top tips that you should use to best maintain communication with donors during a crisis and continue building relationships. These strategies include:

  1. Increase your use of virtual communication platforms.
  2. Openly explain your nonprofit’s circumstances.
  3. Directly ask for support.
  4. Tell donors about this year’s work and future plans.

If you haven’t yet adjusted your communication strategy to adhere to the COVID-19 crisis, now’s the time to start. If you’ve already adapted your communications plan, these tips can still help you continue to improve your strategy.

1. Increase your use of virtual communication platforms.

Crises change the daily habits of individuals. In the case of COVID-19, this means that everyone needs to stay home, cancel plans, practice social distancing, and wear masks. However, this change of plans isn’t unique to the coronavirus pandemic. In the economic crash of 2008, many people changed their plans to practice frugality, avoid going out to purchase items, and put their vacations on hold. No matter what the crisis is, when people panic about an external situation, their habits, and plans also change dramatically, meaning keeping in touch with them through these changes can be difficult, yet vital, to maintaining relationships.

That’s why the first strategy that’s important to remember when a crisis occurs is to meet your donors where they are—in this case, by increasing your use of virtual communication platforms.

We have constant access to communication devices, from our phones and computers. Not only that, we have those devices with us almost constantly. We recommend increasing your use of platforms such as the following to make sure you stay top of mind for supporters even in the midst of a crisis:

  • Email. Email is like the bread and butter of nonprofit communication strategies. When you increase the use of email to communicate with supporters, you’ll also want to reinforce your segmentation strategies to ensure each email is personalized for its recipient. For example, if a nonprofit uses Bloomerang for donor management, they should be sure to use deduplication features and make sure everything is up-to-date before revisiting segments to ensure they’re best suited to reach the donors. Then, that organization could sync data with Mailchimp to send the perfectly crafted emails.
  • Phone calls. While email allows your organization to send a lot of messages very quickly, it doesn’t have the same personal touch that a phone call has. Personalized phone calls to thank supporters for their contributions or simply to check in on how they’re handling the crisis allows you to have a conversation that’s as close to face-to-face as possible for our current times. For some of your more prominent supporters, you may try to schedule a video call using Zoom or Facetime to create an even more intimate connection.
  • Social media. There are several ways that your organization can use social media to amplify your communications with supporters. Reach your entire audience by posting directly from your profile; or, you can use direct messaging for a more personalized approach and call supporters to action; finally, you may decide to foster your community of supporters by creating a group on social media where they can share their experiences with one another.

We recommend using as many personal platforms to reach your audience as possible. Bloomerang found that in a random sampling of 4,000 users, those who reached out using personal methods increased their fundraising revenue substantially:

If you meet with donors frequently in-person to discuss their involvement with your organization, you can’t just stop communication because these meetings are no longer possible. Increasing your use of virtual technology will fill these gaps and maintain your connections.

You should not only use these virtual platforms more often, but you should also adjust your content for the messages you send to better explain the newfound situation your organization finds itself in.

2. Openly explain your nonprofit’s circumstances.

Too many nonprofits feel the need to “put on a brave face” and only tell supporters part of the truth when they come across hard times. For instance, consider the following example:

Last year, an animal shelter started a capital campaign to raise the funds necessary for building a new facility where they’ll be able to host over 100 more animals. They raised their funds in the quiet phase impressively quickly and moved to the public phase within a year. However, just as they thought they were hitting their stride, COVID-19 hit. They suddenly found it much more difficult to obtain the funds they need to finish out the campaign. It threw them off schedule.

The options this organization has are to pretend that everything is going well and it won’t be much longer until the campaign is wrapped up or to either come forward and explain to their supporters why the campaign has hit a small bump in the scheduling for the build. Let’s explain why each of these is tempting:

  • If you pretend that everything is going well, you may feel that your organization is maintaining supporters’ confidence. However, the truth is that supporters are more likely to see through the little fib (or missing information if you hold back the truth), which will make them lose confidence in the organization. That’s the opposite of what you anticipated.
  • If you explain what’s going on and why your organization is running a little late with the campaign, your supporters may appreciate the honesty. They’re experiencing the same crisis that you are and won’t blame you for the changing time period. Plus, when you explain the situation, you can turn the explanation into a call-to-action and ask supporters to help your organization get back on track.

The obvious choice here is to openly explain your supporter’s circumstances in order to maintain the trust of your supporters and maybe even obtain some additional support.

In a crisis, what your supporters want to see is transparency and your plans to get back on track. Therefore, when trouble hits, honesty is the best policy. Then, keep them looking forward to your new plan to get everything back on track. From there, you’ll need to keep everyone informed about your progress on the project. You may choose to:

  • Include a new progress section of your email newsletter.
  • Send an additional personalized thank-you to supporters..
  • Post progress reports on social media platforms.

When you make a realistic plan to get back on track and communicate that plan to your supporters, you’ll not only restore their trust in your organization, but you’ll also be held accountable to create and follow a set plan to achieve your goals.

3. Directly ask for support.

Fundraising is only effective when you’re not afraid to ask for support. During a crisis (especially an economic crisis), many fundraisers become embarrassed or ashamed to ask for help from their supporters because they assume that those individuals must be feeling the financial strain that so many others also feel.

When you assume that supporters won’t give and fail to ask, you guarantee they won’t give to your organization.

Keep asking! You may adjust how you ask or how much you ask for, but don’t stop asking altogether. Make sure you continue creating content that informs supporters of the various ways they can get involved. For example, make sure you communicate with supporters about:

  • Digital fundraising platforms. Cornershop Creative’s digital fundraising guide explains that digital fundraising encompasses any and all contributions made through online platforms. When you ask for support using email, social media, or other digital platforms, link them directly to your online giving pages to make sure it’s easy to find where to contribute.
  • Mail-in donation options. In your donor database, you might have a list of supporters who prefer to contribute using direct mail. You can bet that these people will still prefer giving this way during a crisis. Be sure to adjust your fundraising letters to mention the crisis and explain why this is an especially important time for your organization to obtain funds. If you’re having trouble putting together a new fundraising letter, use resources like this one to make sure you’ve hit all of the important points.
  • Volunteer positions. Undoubtedly, some of your supporters will find it difficult to give during a crisis. Therefore, make sure you have another way that they can contribute to your organization, such as through volunteer work. Provide opportunities where they can still contribute time to your mission rather than money.

Don’t assume that your fundraising will automatically be lesser this year than in the past. In fact, many Bloomerang users have raised more this year than in previous years when they’ve proactively reached out to supporters:

You never know how supporters will respond to your ask until you actually go through with it. Be sure to invite an open conversation with your supporters. If they’re not able to give financially, make a note of that and invite them to stay involved in other ways such as volunteering.

4. Tell supporters about this year’s work and future plans.

As we approach the end of a year full of crisis, you probably have a few different things on your mind. How can you make the most of year-end fundraising? What adjustments still need to be made for your various events and activities? How can you prepare for next year?

During an ongoing crisis (such as this one), it’s important that you look back over the data you’ve collected during the crisis itself in order to inform your future decisions. Consider how you’ll handle this year-end with COVID-19. For instance, you may leverage resources such as your annual report to communicate any strategic changes.

As you prepare your annual report for this year, consider the following:

  • Don’t ignore the crisis. Create a report that reflects the changes we’ve seen in society. When you look back and communicate campaign results with supporters, be sure to mention how the crisis impacted those results.
  • Look towards the future. According to this Bloomerang guide on annual reports, sharing your future plans as a part of your annual report generates excitement in your supporters. Just confirm your plans are realistic and don’t set an assumptive end date for the crisis.

While not every crisis will last as long as the COVID-19 pandemic has, communicating both past and future plans is a key aspect of ensuring your donors are caught up.

They’ll appreciate being kept in the loop and will feel more secure in your organization’s ability to react to a changing environment.


Communication is always important to maintain relationships with your supporters. During a crisis, it becomes even more vital. When you communicate effectively, your supporters will realize that you’re not only trying to build a relationship when it’s convenient for you. You want them to know that you’ll stick by them through thick and thin. By incorporating these four tips, they’ll know for sure that you care!

Categories: Others Tags:

3 Steps to Increase your Blog Traffic in 2021

November 19th, 2020 No comments

You are here because you love blogging, and you are not alone. Each month, 70 million posts are being published by WordPress users. More and more people want to have a piece of the pie, that’s why the competition is getting higher and higher.

You devote a fair amount of time to your posts doing research and writing about a topic. And now comes the exciting part. You hit publish and wait.

Oops, no traffic for your site.

No worries, I’ve been there before, and I know the feeling of that empty comment section at the bottom as well as the zero count shares on social media.

It is time to change all these with this blog post, as we will explore useful resources to increase our blog traffic.

Here’s what we will learn:

  1. Optimize our post for search engines
  2. Increase our chances of virality in our posts
  3. Create our community

A bonus tip is waiting for you at the end of the article to upgrade your game, so take your time and read religiously until the end.

Let’s now see each of these steps in detail.

Step #1: Optimize our post for search engines

It may sound difficult for most people, but search engine optimization is one of the most crucial parts of the game.

Do you want to know the most exciting part?

It’s not even that hard. Here are some search engine optimization (SEO) tips to help get your blog noticed.

  • Keyword Research. One of the essential parts is to find the right keywords. By trying to elaborate on your topic, you already add many relevant keywords in your post. But there are more practical ways that you may not have considered.

    The Google Adwords Keyword Tool and Ubersuggest are great options to help you have a deeper understanding of the keywords you use. They allow you to find keywords on your specific topic and look at your competition to see what words and phrases they target to bring traffic to their site.

  • Place the keywords strategically. Now that you found the most relevant keywords, it is essential to place them throughout the post to impact human interaction and search engine crawlers. Title, headings, introductory sentences, and your concluding paragraph are some of the ideal places.
  • Image optimization. Whenever you upload a photo to your blog, be sure to include keywords in the file name and fill out the alternate text field with a brief, keyword-rich description of the picture. Also, ensuring that your images are as small as possible may be a critical factor in reducing your site’s loading time, which is another ranking factor, according to Google.

Fun fact: A one-second delay in page response can result in a 7% reduction in conversions. (Some exciting bonus stats from Sean Work )

Step #2: Increase our chances of virality in our posts

Creating viral content is the easiest way to increase your reach for your blog. What if I tell you that there are some secrets behind viral posts and that your next post may be one? Would you be interested? I know you do, so let’s explore them.

The title.

The title is what your audience sees in the first place. A great title is the best kickstart for your blog post. Research showed that 8 out of 10 people would read a headline, but only 2 out of 10 will read the rest.

Therefore, to ensure that we are on the right track, these are some practical tips for you to follow. These are based on Iris Shoor and her company’s research, which tried to figure out which headlines work the best, analyzing the top 100 blogs on the web.

This is what they found:

Give your audience numbers – Bigger numbers are better.

  • Making lists: “9 habits of…”, “16 ways to…” – it is more practical and will show diversity in the eyes of your readers.
  • Using digits rather than words: “5 steps to…” is more efficient than “Five steps to…”.
  • Placing the number at the beginning: “8 effective tips to increase your newsletter signup rate in 2020.”

Everyone wants to learn something new. Using terms like “Introduction,” “The advanced guide,” “In 8 minutes,” and “DIY” will result in better conversions.

For example, instead of “How to start your first blog in 2020”, try “The 10-minute guide on how to start a blog in 2020?. Keep in mind that being specific while having an in-depth article is what will make you stand out at the end.

Long-form content.

In February 2012, Google released Google Panda, a new algorithm update that affected nearly 12% of all results and negatively affected sites with “thin content.” Later studies found the same results, longer content equals better ranking in search engines.

The explanation behind that is simple. When you produce an in-depth article about a topic, your readers perceive it as more authoritative. They find all the information they need about their “problem” in the same place thus, it is easier and more reliable for them as a resource.

By increasing the number of words, you create more shareable content. The content that readers share on social media is more than 1,000 words long. Long-from content between 2,500-3,000 words has even more potential. More words mean more opportunities for SEO, which translates to a higher conversion rate.

Tip: Although, in most cases, a high number of words is preferable as they attract more people, it is essential to remember that quality is vital. Focus on people and try to solve their problems. Make it practical without adding too much boring information. In the end, viral content tends to have a high utility, and if you can get your point across with 500 words, that is what you should do.

Have a strong idea.

As we mentioned earlier, your article should be useful. To achieve that, a strong idea about what to write is essential. Your most valuable resources are your comment section, forums, and keyword research tools.

  • Having a comment section at the bottom of your articles can drastically improve your posts’ interaction and give you insights about subjects ideas that your readers are interested in.

    Your audience should be your primary focus, so why don’t you listen to them or, even better, ask them to tell you what they want to hear from you.

  • Forums are also an excellent resource for useful information concerning blog post ideas. Reddit and Quora are the most popular of them, and therefore, hundreds of people visit them daily to post about their thoughts and questions.

    Take advantage of that and create a beautiful post full of information that covers these problems. Become a problem solver in your niche, and your traffic will increase significantly.

  • Search engines can help you a lot with this challenging task. And we are talking about stats here. We can search for what keywords or topics are the most popular in our niche and go after them.

    My favorite tool for this is “AnswerThePublic,” where you can discover what people ask about, entering a topic, a brand, or even a product.

Add visuals to your post.

Apart from a strong idea, your article should be visually appealing. In other words, adding visuals to your storytelling can improve the experience of your readers.

To put that into perspective, articles with images get 94% more views than those with no visuals. Another exciting research found that 43% of consumers increasingly want video content from marketers.

As bloggers, these are the only numbers we need to start thinking about our approach to this topic.

There are three main reasons for that:

  • A picture is worth a thousand words. Complex ideas can be conveyed by a single image more effectively than a mere verbal description. Photos and videos help explain difficult concepts easier, and as a result, the reader absorbs more information.

    Tip: If you are not a designer or simply don’t have the time to become one, there are many online photo and video editors that can make your life easier and save you time.

  • The main picture of our post will be our billboard whenever our audience shares our post. If we don’t have a powerful cover, it’s less likely to generate traffic to our site.
  • We can optimize images by adding keywords to a picture’s alternative text, file name, and caption to help search engines understand what our post is about. This will create more traffic to our blog and will help Google understand more about our content.

Step #3: Create our community

Having a group of people that support your work is what every creator is looking for. You have to provide value and solve their problems in your area of expertise so that they are more than happy to follow you and read your articles throughout the process. There are some ways we can create that sense of community:

Improve your email marketing

Email is probably the most effective marketing tool at our disposal and the most cost-efficient. We are losing potential subscribers each day without an email list. Once we have that tool, we can send regular email newsletters to bring more visitors to our blog.

So, how do we do this?

When people visit our site to read our articles, they are there for a reason. If we have done most of the traffic generation steps above correctly, they must be interested in our topic.

If this is the case, we have the opportunity to create a bond with these people so that we can drive more traffic and shares in future posts. To do that, we have to know their email and the best way to do that is with email tools available in the market.

Create a simple and aesthetically pleasing landing page that showcases how your readers will find value from signing up for your newsletter. Remember, less is more in this kind of situation. Build a specialized list of subscribers so that they always open and act on your emails.

There are many email marketing services out there that can provide you with the best tools to start building your next list.

With a list of around 1,000 targeted emails, we can have a successful business ready to take it to the next level. We always have to clean up our list from people who don’t need what we have to offer – we ONLY need the right people, not everyone.

Build backlinks to your posts

A backlink is an incoming link to our content from an external website and, according to research, one of the clearest signals in Google’s rankings. Getting backlinks from high authority websites and blogs is very difficult, not only for beginners but also for experienced bloggers.

Here are some tips on how to make our life easier:

Backlinks through infographics

Infographics are an excellent method for bringing traffic to your website and gaining valuable backlinks. They are easy to understand and share, so more bloggers add them to their arsenal.

Guest articles

Guest blogging is a popular way to increase your audience and attract new readers. By publishing on popular websites, you will expand your reach and win more exposure for your website.

Using Google is an easy way to find where to post:

  • your keyword + guest-posts
  • your keyword + become an author
  • your keyword + submit an article

Podcast and interviews

If you are an expert in your industry, a great strategy is to go after some podcasts and interviews. One or two each month will do the trick. Not only will you be in front of new audiences, but you will also increase your trustworthiness and your authority.

Leverage all Social Media Platforms – Make Online Groups

Facebook or LinkedIn are great places to create your first groups and share your valuable information with some blog posts’ teasers. As your community grows, so will your influence.

Having a strong foundation supporting your content and sharing it on social media may be the best traffic source for your blog after some time.

THE BONUS TIP EVERYONE WAS WAITING FOR!

Spy on your competitors. If you are serious about getting more organic traffic, staying up to date with your main competitors’ online marketing strategies is mandatory. You have to spy on your competitors’ social media and look for their link-building or earning techniques, as well as their content marketing methods.

There are many marketing tools out there like Similarweb or Ubersuggest that can provide all this essential information to reconstruct your marketing approach.

Analyze where your competitors get their backlinks from and which social media platform generates the most traffic for them. If it is youtube, for example, maybe there is some potential there for you too.

Knowledge is power, and when you have the tools to understand your competitors, you have an advantage over them.

Conclusion

Keep in mind that some of these tips are a long-term process.

That’s why consistency is critical.

Add them to your toolbox and continue adding value to your community. After all, people will always have the last word. Focus on them, and you will see great results.

I hope you’ve enjoyed my tips on how to increase blog traffic! If so, do feel free to share it on social media.

Until the next one, keep blogging 🙂


Photo by Austin Distel on Unsplash
Creator; Alex, content writer at Moosend. Find out more on LinkedIn.

Categories: Others Tags:

3 Steps to Increase your Blog Traffic in 2021

November 19th, 2020 No comments

You are here because you love blogging, and you are not alone. Each month, 70 million posts are being published by WordPress users. More and more people want to have a piece of the pie, that’s why the competition is getting higher and higher.

You devote a fair amount of time to your posts doing research and writing about a topic. And now comes the exciting part. You hit publish and wait.

Oops, no traffic for your site.

No worries, I’ve been there before, and I know the feeling of that empty comment section at the bottom as well as the zero count shares on social media.

It is time to change all these with this blog post, as we will explore useful resources to increase our blog traffic.

Here’s what we will learn:

  1. Optimize our post for search engines
  2. Increase our chances of virality in our posts
  3. Create our community

A bonus tip is waiting for you at the end of the article to upgrade your game, so take your time and read religiously until the end.

Let’s now see each of these steps in detail.

Step #1: Optimize our post for search engines

It may sound difficult for most people, but search engine optimization is one of the most crucial parts of the game.

Do you want to know the most exciting part?

It’s not even that hard. Here are some search engine optimization (SEO) tips to help get your blog noticed.

  • Keyword Research. One of the essential parts is to find the right keywords. By trying to elaborate on your topic, you already add many relevant keywords in your post. But there are more practical ways that you may not have considered.

    The Google Adwords Keyword Tool and Ubersuggest are great options to help you have a deeper understanding of the keywords you use. They allow you to find keywords on your specific topic and look at your competition to see what words and phrases they target to bring traffic to their site.

  • Place the keywords strategically. Now that you found the most relevant keywords, it is essential to place them throughout the post to impact human interaction and search engine crawlers. Title, headings, introductory sentences, and your concluding paragraph are some of the ideal places.
  • Image optimization. Whenever you upload a photo to your blog, be sure to include keywords in the file name and fill out the alternate text field with a brief, keyword-rich description of the picture. Also, ensuring that your images are as small as possible may be a critical factor in reducing your site’s loading time, which is another ranking factor, according to Google.

Fun fact: A one-second delay in page response can result in a 7% reduction in conversions. (Some exciting bonus stats from Sean Work )

Step #2: Increase our chances of virality in our posts

Creating viral content is the easiest way to increase your reach for your blog. What if I tell you that there are some secrets behind viral posts and that your next post may be one? Would you be interested? I know you do, so let’s explore them.

The title.

The title is what your audience sees in the first place. A great title is the best kickstart for your blog post. Research showed that 8 out of 10 people would read a headline, but only 2 out of 10 will read the rest.

Therefore, to ensure that we are on the right track, these are some practical tips for you to follow. These are based on Iris Shoor and her company’s research, which tried to figure out which headlines work the best, analyzing the top 100 blogs on the web.

This is what they found:

Give your audience numbers – Bigger numbers are better.

  • Making lists: “9 habits of…”, “16 ways to…” – it is more practical and will show diversity in the eyes of your readers.
  • Using digits rather than words: “5 steps to…” is more efficient than “Five steps to…”.
  • Placing the number at the beginning: “8 effective tips to increase your newsletter signup rate in 2020.”

Everyone wants to learn something new. Using terms like “Introduction,” “The advanced guide,” “In 8 minutes,” and “DIY” will result in better conversions.

For example, instead of “How to start your first blog in 2020”, try “The 10-minute guide on how to start a blog in 2020?. Keep in mind that being specific while having an in-depth article is what will make you stand out at the end.

Long-form content.

In February 2012, Google released Google Panda, a new algorithm update that affected nearly 12% of all results and negatively affected sites with “thin content.” Later studies found the same results, longer content equals better ranking in search engines.

The explanation behind that is simple. When you produce an in-depth article about a topic, your readers perceive it as more authoritative. They find all the information they need about their “problem” in the same place thus, it is easier and more reliable for them as a resource.

By increasing the number of words, you create more shareable content. The content that readers share on social media is more than 1,000 words long. Long-from content between 2,500-3,000 words has even more potential. More words mean more opportunities for SEO, which translates to a higher conversion rate.

Tip: Although, in most cases, a high number of words is preferable as they attract more people, it is essential to remember that quality is vital. Focus on people and try to solve their problems. Make it practical without adding too much boring information. In the end, viral content tends to have a high utility, and if you can get your point across with 500 words, that is what you should do.

Have a strong idea.

As we mentioned earlier, your article should be useful. To achieve that, a strong idea about what to write is essential. Your most valuable resources are your comment section, forums, and keyword research tools.

  • Having a comment section at the bottom of your articles can drastically improve your posts’ interaction and give you insights about subjects ideas that your readers are interested in.

    Your audience should be your primary focus, so why don’t you listen to them or, even better, ask them to tell you what they want to hear from you.

  • Forums are also an excellent resource for useful information concerning blog post ideas. Reddit and Quora are the most popular of them, and therefore, hundreds of people visit them daily to post about their thoughts and questions.

    Take advantage of that and create a beautiful post full of information that covers these problems. Become a problem solver in your niche, and your traffic will increase significantly.

  • Search engines can help you a lot with this challenging task. And we are talking about stats here. We can search for what keywords or topics are the most popular in our niche and go after them.

    My favorite tool for this is “AnswerThePublic,” where you can discover what people ask about, entering a topic, a brand, or even a product.

Add visuals to your post.

Apart from a strong idea, your article should be visually appealing. In other words, adding visuals to your storytelling can improve the experience of your readers.

To put that into perspective, articles with images get 94% more views than those with no visuals. Another exciting research found that 43% of consumers increasingly want video content from marketers.

As bloggers, these are the only numbers we need to start thinking about our approach to this topic.

There are three main reasons for that:

  • A picture is worth a thousand words. Complex ideas can be conveyed by a single image more effectively than a mere verbal description. Photos and videos help explain difficult concepts easier, and as a result, the reader absorbs more information.

    Tip: If you are not a designer or simply don’t have the time to become one, there are many online photo and video editors that can make your life easier and save you time.

  • The main picture of our post will be our billboard whenever our audience shares our post. If we don’t have a powerful cover, it’s less likely to generate traffic to our site.
  • We can optimize images by adding keywords to a picture’s alternative text, file name, and caption to help search engines understand what our post is about. This will create more traffic to our blog and will help Google understand more about our content.

Step #3: Create our community

Having a group of people that support your work is what every creator is looking for. You have to provide value and solve their problems in your area of expertise so that they are more than happy to follow you and read your articles throughout the process. There are some ways we can create that sense of community:

Improve your email marketing

Email is probably the most effective marketing tool at our disposal and the most cost-efficient. We are losing potential subscribers each day without an email list. Once we have that tool, we can send regular email newsletters to bring more visitors to our blog.

So, how do we do this?

When people visit our site to read our articles, they are there for a reason. If we have done most of the traffic generation steps above correctly, they must be interested in our topic.

If this is the case, we have the opportunity to create a bond with these people so that we can drive more traffic and shares in future posts. To do that, we have to know their email and the best way to do that is with email tools available in the market.

Create a simple and aesthetically pleasing landing page that showcases how your readers will find value from signing up for your newsletter. Remember, less is more in this kind of situation. Build a specialized list of subscribers so that they always open and act on your emails.

There are many email marketing services out there that can provide you with the best tools to start building your next list.

With a list of around 1,000 targeted emails, we can have a successful business ready to take it to the next level. We always have to clean up our list from people who don’t need what we have to offer – we ONLY need the right people, not everyone.

Build backlinks to your posts

A backlink is an incoming link to our content from an external website and, according to research, one of the clearest signals in Google’s rankings. Getting backlinks from high authority websites and blogs is very difficult, not only for beginners but also for experienced bloggers.

Here are some tips on how to make our life easier:

Backlinks through infographics

Infographics are an excellent method for bringing traffic to your website and gaining valuable backlinks. They are easy to understand and share, so more bloggers add them to their arsenal.

Guest articles

Guest blogging is a popular way to increase your audience and attract new readers. By publishing on popular websites, you will expand your reach and win more exposure for your website.

Using Google is an easy way to find where to post:

  • your keyword + guest-posts
  • your keyword + become an author
  • your keyword + submit an article

Podcast and interviews

If you are an expert in your industry, a great strategy is to go after some podcasts and interviews. One or two each month will do the trick. Not only will you be in front of new audiences, but you will also increase your trustworthiness and your authority.

Leverage all Social Media Platforms – Make Online Groups

Facebook or LinkedIn are great places to create your first groups and share your valuable information with some blog posts’ teasers. As your community grows, so will your influence.

Having a strong foundation supporting your content and sharing it on social media may be the best traffic source for your blog after some time.

THE BONUS TIP EVERYONE WAS WAITING FOR!

Spy on your competitors. If you are serious about getting more organic traffic, staying up to date with your main competitors’ online marketing strategies is mandatory. You have to spy on your competitors’ social media and look for their link-building or earning techniques, as well as their content marketing methods.

There are many marketing tools out there like Similarweb or Ubersuggest that can provide all this essential information to reconstruct your marketing approach.

Analyze where your competitors get their backlinks from and which social media platform generates the most traffic for them. If it is youtube, for example, maybe there is some potential there for you too.

Knowledge is power, and when you have the tools to understand your competitors, you have an advantage over them.

Conclusion

Keep in mind that some of these tips are a long-term process.

That’s why consistency is critical.

Add them to your toolbox and continue adding value to your community. After all, people will always have the last word. Focus on them, and you will see great results.

I hope you’ve enjoyed my tips on how to increase blog traffic! If so, do feel free to share it on social media.

Until the next one, keep blogging 🙂


Photo by Austin Distel on Unsplash
Creator; Alex, content writer at Moosend. Find out more on LinkedIn.

Categories: Others Tags: