Constrained CSS grids without `max-width`

Featured Imgs 23

Ain’t nothing wrong with max-width, but Ethan makes a point in the last sentence:

Rather than simply defaulting to max-width as a constraint, I can use the empty space around my design, and treat it as a layout tool.

If the space “around” your grid is actually part of the grid, it’s easier to use. Maybe you’d decide to scootch some author information up there after all, or show an ad, or who knows what. It will be more robust if you do it within the established grid.

Direct Link to ArticlePermalink

The post Constrained CSS grids without `max-width` appeared first on CSS-Tricks.

How To Disable RSS Feeds In WordPress

Featured Imgs 21

By default, there is no option to disable RSS feeds in WordPress, because RSS feeds allow users to subscribe to your blog posts. However, there are certain situations where you may want to turn off RSS feeds. There are a few plugins that you can use to do this, but whenever possible we always try to use as few plugins as possible and use our own code.

UNLIMITED DOWNLOADS: 500,000+ WordPress & Design Assets

Sign up for Envato Elements and get unlimited downloads starting at only $16.50 per month!




 

By placing the following code in your theme’s functions.php file (or a site-specific plugin) when someone tries to go to the RSS feed link (yoursite.com/feed/) they will receive a message that no feed is available.

function 1wd_disable_feed() {
wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}

add_action('do_feed', '1wd_disable_feed', 1);
add_action('do_feed_rdf', '1wd_disable_feed', 1);
add_action('do_feed_rss', '1wd_disable_feed', 1);
add_action('do_feed_rss2', '1wd_disable_feed', 1);
add_action('do_feed_atom', '1wd_disable_feed', 1);
add_action('do_feed_rss2_comments', '1wd_disable_feed', 1);
add_action('do_feed_atom_comments', '1wd_disable_feed', 1);

Now you know how to disable RSS feeds in WordPress. Be sure to check out our other WordPress tutorials for more tips!

The Contrast Triangle

Category Image 052

Chip Cullen:

Let’s say you’re building a site, and you’re working with a designer. They come to you with some solid designs, and you’re ready to go. You’re also a conscientious front end developer and you like to make sure the sites you build are accessible. The designs you’re working from have some body copy, but you notice that the links inside the body copy are missing underlines.

You are now in The Contrast Triangle.

The “triangle” meaning a three-sided comparison:

  • The contrast between the background and text
  • The contrast between the background and links
  • the contrast between text and links

I would think this matters whether you underline links or not, but I take the point that without underlines the problem is worse.

I’d also argue the problem is even more complicated. You’ve also got to consider the text when it is selected, and make sure everything has contrast when that is the case too. And the hover states, active states, visited states, and focus states. So it’s really like hexacontakaienneagon of contrast or something.

Direct Link to ArticlePermalink

The post The Contrast Triangle appeared first on CSS-Tricks.

User interface design

558fe5180e0e8fc922d31c23ef84d240

I found this great article on User Interfaces that I wanted to share. Two points I wanted to add

  1. Just because it's old doesn't mean it's bad.
  2. Just because it's new doesn't mean it's better.

And can we please all decide that light grey text on a white background is just retarded?

Dealer.com Announces API to Simplify Third-Party Dealership Integrations

Featured Imgs 23

Dealer.com, an automotive industry end-to-end digital marketing solution, announces a new integration enhancement to its website platform to help dealers deliver a better online user experience. The new website integration API makes it easier to create immersive third-party experiences on the Dealer.com platform, ultimately building more trust between shoppers and dealers through seamless user interactions.

Leave at Door: New Free WooCommerce Plugin Enables Contact-free Delivery

Category Image 091

As many countries around the world are currently in some form of lockdown to mitigate the spread of the coronavirus, the hospitality industry has been one of the hardest hit by the new restrictions. Restaurants and breweries in particular have had to radically change how they do business and either lay off or furlough the majority of their employees. Many of those that have survived the mandated dine-in closures are jump-starting delivery services in order to stay afloat.

Scott DeLuzio, a WordPress plugin developer and founder of Amplify Plugins, recently noticed a “leave at door” option when ordering food from a local restaurant. He thought it would be a helpful option for WooCommerce store owners to add and created a plugin that makes it easy.

Leave at Door is now available for free from the official WordPress Plugin Directory. It enables customers to maintain social distancing while receiving deliveries. The plugin adds a checkbox before the Place Order button at checkout, which reveals an optional text input for additional delivery instructions. If the customer chooses contact-free delivery, store owners will see it displayed on the admin order edit screen and in the order email. It will also be displayed on the customer’s order invoice.

DeLuzio’s Amplify Plugins shop focuses on plugins that improve the customer experience in WooCommerce. He reported that his products have seen more activity since social distancing recommendations were put in place. With the pandemic slowing down shipments from Amazon and other major retailers, local and independent stores have an opportunity to gain the confidence of new customers.

“I have definitely seen an uptick in plugin sales over the last month or so,” DeLuzio said. “I think, through talking to a few customers, this can probably be attributed to traditional brick and mortar stores and restaurants that are looking to move online to compensate for the lack of foot traffic that they are getting in their stores.”

The availability of contact-free delivery may be the deciding factor for some customers in quarantine, which could make all the difference for small business owners.

“There are probably a good number of local businesses that are struggling these days,” DeLuzio said. “Their customers are probably very concerned with the virus and maintaining social distancing, so if something like this plugin can help them out, even in a small way, I’m happy to have been able to put it together for them.”

Even when some economies begin opening up, there will undoubtedly be customers who will still be keen on having a contact-free delivery option, especially those among the populations most vulnerable to COVID-19. The notion of contact-free delivery may have a longer run beyond this current crisis and perhaps even become a permanent fixture on e-commerce checkout screens.

Advantages of VPS Web Hosting

Featured Imgs 07
Wondering why VPS web hosting is becoming increasingly popular? Read on to find the advantages of VPS Web Hosting and Why it’s the best Today!! Image source: https://www.pexels.com/photo/adult-books-business-coffee-374016/ Why Choose VPS Web Hosting Wondering why...

Does GeoIP ever change?

Category Image 041

We had a bug a little while back where we were accessing an old database for the GeoIP API.

That meant that, for users whose geolocation were mapped from their IP address, it was incorrect/unknown for IP subnets not in the database.

Now, 1-2 years later, can we go back and retroactively retrieve the correct location for each of those IP addresses with a more updated database? Or, is it possible, for example, that ISPs may recycle IP addresses across different cities/states?

CSS Scrollbar With Progress Meter

Category Image 052

Scrollbars are natural progress meters. How far the scrollbar is down or across is how much progress has been made scrolling through that element (often the entire page). But, they are more like progress indicators than meters, if you think of a meter as something that “fills up” as you go.

We can use some CSS trickery to make the scrollbar fill up as we go.

This will only work with -webkit- vendor-prefixed scrollbar-styling properties. In other words, these are non-standard. The standardized scrollbar styling properties are scrollbar-width and scrollbar-color, which can’t pull this kind of thing off, but are probably a safer bet in the long run. Still, the vendor-prefixed versions probably aren’t going anywhere, so if you consider this a weird form of progressive enhancement, that’s probably fine.

What’s the trick?

Essentially, it’s hanging a huge box-shadow off the top of the scrollbar thumb — or off the side if it’s a horizontally scrolling element.

:root {
  --shadow: #43a047;
  --scrollbarBG: #eee;
  --thumbBG: #66bb6a;
}
::-webkit-scrollbar {
  width: 16px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbarBG);
}
::-webkit-scrollbar-thumb {
  background-color: var(--thumbBG);
  box-shadow: 0 -100vh 0 100vh var(--shadow), 0 0 15px 5px black;
}

Demo

I first saw this in a Pen by Myk.

That example didn’t differentiate the thumb part of the scrollbar at all, which makes it more meter-like, but also harder to use. My demo has a slightly different color thumb.

Can I really use this?

No! Aside from it being super weird and non-standard. Safari flips it’s lid and I have no idea how to fix it.

I do happen to have a favorite CSS trick that is highly related to this though.

I want to learn more about styling scrollbars

Cool, here you go.

The post CSS Scrollbar With Progress Meter appeared first on CSS-Tricks.