How to Create Custom WordPress Template Tags

Original Source: https://www.hongkiat.com/blog/wordpress-custom-template-tags/

Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to display post or page contents. There are many…

Visit hongkiat.com for full content.

How A Screen Reader User Accesses The Web: A Smashing Video

Original Source: https://www.smashingmagazine.com/2019/02/accessibility-webinar/

How A Screen Reader User Accesses The Web: A Smashing Video

How A Screen Reader User Accesses The Web: A Smashing Video

Bruce Lawson

2019-02-18T14:00:32+01:00
2019-02-18T16:04:12+00:00

Two weeks ago, I had the pleasure of hosting a Smashing TV webinar with Léonie Watson on how a screen reader user accesses the web. In the talk, Léonie showed some big-name sites, such as BBC, sites nominated by Members (including my own!), Smashing Magazine itself, and the popular third-party service Typeform, because so many of us (including us at Smashing) just assume that the popular services have been checked for accessibility. Throughout, Léonie explained how the sites’ HTML was helping (or hindering) her use of the sites.

We felt that the webinar was so valuable that we would open it up so that it’s free for everybody to use. Hopefully, it will serve as a resource for the whole web development community to understand how — and why — semantic markup matters.

What We Learned

I was pleased that my personal site’s use of HTML5 landmark regions (main, nav, header, footer, etc) helped Léonie form a mental model of the structure of the page. Although I’ve always been scrupulous to avoid link text like “click here” because WCAG guidelines require “The purpose of each link can be determined from the link text alone”, it hadn’t occurred to me before that because I have hundreds of weekly “Reading List” articles, it’s impossible for a screen reader user to tell one from the other when navigating by headings. Since the webinar, I’ve made each new reading list’s heading unique by including its number in the heading (“Reading List 222”).

We also learned that being technically accessible is good, but even better is to be usably accessible. The Smashing Team learned that before Léonie can read her own article on our site, there’s loads of preamble (author bio, email sign-up form) that she can’t easily skip over. We’re correcting this at the moment. There’s also an issue with our quick summaries; Léonie gets no indication when the summary has finished and the article proper has begun. Sighted users get a dividing line, but what can we do for non-sighted users?

After the webinar, Léonie suggested using a semantic HTML element and a sprinkling of ARIA:

<section aria-label=”Summary”>
</section>

This is announced as “Summary region start” and “Summary region end”, and can be skipped over if desired.

Thank You!

We’d like to thank Léonie for giving the webinar, and also our magnificant Smashing Magazine members whose support allows us to commission such content, pay our contributors fairly, and reduce advertising on the site.

Shameless plug: if you enjoyed this webinar, why not consider becoming a Member yourself? There are around three webinars a month free, Smashing eBooks and discounts galore. It costs around two cups of coffee a month, and you can cancel anytime.

Smashing Editorial
(ra, il)

How to Design for 3D Printing

Original Source: https://www.webdesignerdepot.com/2019/02/how-to-design-for-3d-printing/

3D Printing is a revolutionary new technology that allows you to realize, well, just about anything. The most common form of 3D printers use a special form of plastic filament to print durable, hard ABS plastic components or items.

However, there are 3D printers—industrial mostly—that can work with materials like concrete, glass, titanium, steel and more. The tougher materials aren’t really necessary for design, but it’s still a great thing to know especially when you need to consider material design guidelines.

In design and graphic art, you mostly work with hand sketches, digital content and imaging software, and flat, 2D-style designs. How would a 3D printer offer you anything new? Maybe you dabble in the occasional 3D modeling from time to time, or maybe you don’t. Whatever the case, the two mediums just don’t seem to correlate.

We’re going to explain some design tips you should be aware of and how that applies to your particular industry: graphic and visual design.

Major Brands Are Already Using 3D Printing for Design

A variety of large corporations and organizations have not only realized the potential of 3D printing technology — they’ve implemented it in their regular routines.

Nike, Nokia, Ittala, Coca-Cola and even Volkswagen have all been creating and designing with 3D printing tools. Nike even took their 3D printed concepts and rolled them into manufactured products, some of which you can buy on store shelves right now.

If the bigger companies and organizations are starting to adopt and utilize this technology, that will soon trickle down to smaller companies

The reason they’ve taken to this technology is because it streamlines their design and manufacturing processes. All product designs or prototypes can be constructed in-house, and then when it’s time to ship something, they can be manufactured internally as well.

This doesn’t relate to graphic design, but it does point out one obvious thing. If the bigger companies and organizations are starting to adopt and utilize this technology, that will soon trickle down to smaller companies, including you.

More companies will desire 3D printing compatible concepts and visuals, which means turning to professionals who can work with the necessary tools and software. If you haven’t already begun training with these technologies and tools, now is the ideal time.

Learn Printing Technologies

Before diving into the design process, you need to spend some time researching and getting to know the various 3D printing technologies and hardware you’ll be working with. Why? Because depending on the materials and the printer used, you’ll need to work with unique specifications.

ABS, alumide, polyamide, and rubber-like materials all allow you to create components and designs that incorporate interlocking parts. That is, you can build snap-together components that are incredibly easy to assemble. Unfortunately, this is not possible with materials like bronze, gold, silver and resin, but it’s not the consistency of the materials or even textures to blame. It’s really the hardware and 3D printers used during these processes. The latter materials aren’t compatible with the types of printers that can create interlocking parts.

In addition, the way in which these printers create components also differs depending on the material. Be sure to do the research so that you understand how they are all different and how this will influence your design.

Mind the Wall Thickness

When working with traditional 2D-based designs, dimensions are important, but you don’t necessarily have to worry about the thickness of your models. You can use specifications and number measurements to indicate true size, but you don’t actually have to design to scale — at least in many cases.

That’s not so with 3D printing, as you’ll always want to mind the wall thickness of the items you’re creating. Walls that are too thick can generate too much internal stress, causing the item itself to collapse or the surfaces to crack. If the walls are too thin, it can make the concept or prototype fragile and easy to break.

Considering you’ll likely be designing and planning the dimensions so that you end up with a durable, reliable product this is one feature you’ll want to brush up on.

File Resolution Is Still Important

With 3D printing, the designs are still parsed and transferred via digital files or blueprints, if you will. In graphic and visual design, file resolution is extremely important especially when working with larger products or prints.

If you stretch a smaller resolution file too much, it ends up looking grainy and pixelated. That’s why it’s important you always design in larger environments and dimensions because scaling down is more accurate than scaling back up.

The common file format for 3D printing designs is STL, or standard triangle language format. The design—when printed—is translated into triangles in a wider 3D space, which makes it easier for the printers and related hardware to construct the resulting item.

Similar to visual design, you don’t want the resolution or file size of your blueprint to be too big, or too small. Too big means the internal content will be too much for machines and other designers to handle. Too small means no one will ever be able to get a quality print out of your STL.

The solution is to consider not just the file resolution, but something called “tolerance” in the world of 3D modeling.

3D Printing Is Not So Different

At a glance, it seems as though 3D printing, and designing for the medium, are much different than the current work you do in graphic and visual design. That’s not necessarily the case though, as both forms of design require you to have working knowledge of modern digital software and tools.

Sure, you might use a different tool to design say, an infographic or visual model than you would a 3D STL file, but the concepts and mechanics are similar.

As long as you mind the tips discussed here, you should do just fine. If you haven’t already started learning how to work with 3D modeling and design tools, you might want to get on that as soon as possible.

The market for additive and manufacturing products and services—which will call for reliable designers and visual artists—is predicted to increase by as much as seven times the current rate by 2020. At that time, the market value is expected to surpass $20 billion.

 

Featured image via Unsplash

Add Realistic Chalk and Sketch Lettering Effects with Sketch’it – only $5!

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

Top Differences Between Graphic Designer and UI Designer

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/8Pc9UmIE5YY/top-differences-between-graphic-designer-and-ui-designer

When one mentions design people quickly assume that one is talking about graphic design. However, in website design and development, designing is diverse with more than just graphic design. This diversity has been brought by the advancement in technology where new and more specialized design tools are being developed. Comparing the two including the work they […]

The post Top Differences Between Graphic Designer and UI Designer appeared first on designrfix.com.

Take your web development skills to new heights

Original Source: http://feedproxy.google.com/~r/CreativeBloq/~3/2gY6HsdNUBQ/take-your-web-development-skills-to-new-heights

If you're hoping to leverage your programming skills in the job market, one of the best ways to do just that is by learning full stack development. With the Complete Full Stack Web Development Master Class Bundle, you'll gain mastery in the hottest web frameworks and technologies to become the most sought after coder out there. You'll begin with learning the basics like HTML, CSS, PHP, and MySQL before moving into more advanced concepts like React and Redux, Angular 7, NodeJS, and Angular. 

Across all the courses, you'll get to put your new skills to the test and build a bevy of projects from scratch. By the time you finish, you'll have the knowledge and resources to develop beautiful and dynamic applications. The Complete Full Stack Web Development Master Class Bundle usually retails for $693, but you can get it today for just $29.

Read more:

The best laptops for programming right nowThe future of web designWeb design tools to help you work smarter

20 Best New Portfolios, February 2019

Original Source: https://www.webdesignerdepot.com/2019/02/20-best-new-portfolios-february-2019/

Welcome back, Readers! It’s February, and I don’t think I have a single pink or chocolate-themed site anywhere in the mix. Ah well…

I really shouldn’t have typed that. Now I want to either eat some peanut-butter and chocolate goodies, or base a design on that color scheme. I probably will.

Anyway, we’ve got a generally mixed bag of portfolios for you to check out, with a number of aggressively monochromatic designs in there. Enjoy!

Note: I’m judging these sites by how good they look to me. If they’re creative and original, or classic but really well-done, it’s all good to me. Sometimes, UX and accessibility suffer. For example, many of these sites depend on JavaScript to display their content at all; this is a Bad Idea™, kids. If you find an idea you like and want to adapt to your own site, remember to implement it responsibly.

Rob Weychert

Rob Weychert’s portfolio may not be new as such, but I just found it… and probably should have found it sooner. He used to be a designer at Happy Cog, and is now at ProPublica, so you should expect earthy tones and fantastic typography. He sells his expertise mostly through his client list and his extensive blog, using the “go look at my work, it’s super famous” approach to marketing.

Well, it works.

Platform: Static Site (as far as I can tell)

Transatlantic Film Orchestra

The Transatlantic Film Orchestra do exactly what you think they do. Music for video. And on their website, they do it right: no music plays when you load the site. All you get is a calm, dark, and monochromatic one-page portfolio.

I do particularly like the implementation of the audio players, though. The Morse code, the grainy photos, it all works.

Platform: WordPress

Ramon Gilabert

Ramon Gilabert’s portfolio brings us a calming and classic minimalist design combined with some beautifully-used SVG graphics. Mind you, it’s a little confusing when you click on the “social” link in the navigation, as the social links are practically hidden at the bottom, on the right, and on their side. Otherwise, it’s a beautiful and charming design.

Platform: Static Site

Charlie Gray

Charlie gray’s portfolio is full of cinematic-looking photography and Hollywood celebrities, so this layout that feels like a cross between a magazine layout and a PowerPoint is actually right on the money. I’d almost be disappointed if a site like this wasn’t loaded down with a bit too much JS.

In the end, it’s the images that sell everything anyway.

Platform: WordPress

Jordy van den Nieuwendijk

This portfolio is pretty much an art gallery, and it embraces the theme with a full-screen slideshow on the home page, lots of white space, and monospaced type. It’s a classic approach and it hold up well in this case.

Platform: Static Site

Atelier Florian Markl

Atelier Florian Markl has taken the inherent “blockiness” of web design and absolutely run with it. The theme of the day is rectangles and bold colors. You might have a hard time seeing anything, but once your eyes adjust to the glare, you won’t forget this highly modernist design in a hurry.

Platform: Joomla

Nathan Mudaliar

Nathan Mudaliar’s copywriting portfolio may not be the fanciest out there, but it is a master class in showcasing your work creatively. There’s a sort of conversational bit of UI where he showcases his work in different “voices”, interactive examples of his copywriting techniques, and more.

It’s a bit hard sell, perhaps, but you can’t argue with results.

Platform: Static site

WebinWord

WebinWord know how to to stick to a theme. This minimal-ish but highly animated site manages to use the shape of their logo mark all over just about every page. And weirdly enough, it works.

Platform: WordPress

Okalpha

Okalpha goes right for bright colors and pseudo-3D graphics to catch your attention. Honestly, they’re using the same colors and shapes people have been using on us since we were toddlers, so why wouldn’t it work? Slightly kid-ish or not, I think it works.

Platform: Custom CMS (Probably)

Makoto Hirao

Makoto Hirao’s portfolio is ticking a lot of boxes for me, including great type, good use of imagery, and a horizontal home page layout that I actually really like, and that feels intuitive.

My only real criticism would the the usual one about JS dependence.

Platform: Custom CMS

Lydia Amaruch

Lydia Amaruch brings us a beautiful grid-themed portfolio (I am, as always, a sucker for this look) combined with some fantastic illustrations, and decidedly modernist layout. Some bits are weirdly low-contrast, but it’s a darned pretty site overall.

Platform: Static Site

The Sweetshop

The Sweetshop, being a video production company, naturally puts a lot of video front and center with the dark layout you’d expect. But even so, their typography game is surprisingly strong, and there’s not a serif in sight. Even their press releases look pretty.

Platform: WordPress

Noughts & Ones

Noughts and Ones is another agency that’s sticking to their theme, with their branding being a big part of their site’s aesthetic. Other than that, it’s pretty classic minimalism. I personally adore their footer.

Is that a weird thing to say?

Platform: Squarespace

Margaux Leroy

If I had to describe Margaux Leryo’s portfolio—and I do, that’s my job—I’d call it a fusion of ‘90s era futurist design with more modern trends. It’s dark, it’s sleek, and some of the text might be a little too small and low-contrast.

Why did we think text would be that small in the future anyway? Did we think everyone would have augmented eyes?

Anyway, flaws aside, it looks fantastic.

Platform: Static Site (as far as I know)

Julia Kostreva

Julia Kostreva’s portfolio keeps it simple with some pseudo-asymmetry and soft tones. As a branding designer, she lets that branding work do, well, most of the work. And it works.

Platform: Squarespace

Baibakov Art Projects

Baibakov Art Projects takes the monochromatic to another level, and the animations are only sometimes in the way. It’s tall, dark, and elegant, like the work it features. Fantastic use of asymmetry, too.

Platform: Static Site

Kolaps

Kolaps has a decidedly modernist design that feels at once very “business-friendly” and quite eye-catching. It’s classic minimalism come back again with a touch of sci-fi futurism and particle effects.

Platform: Custom CMS (I think)

Betty Montarou

Betty Montarou’s portfolio is kept dead simple with a sort of “click to collage” method of showing off her work. It keeps the whole experience down to about two pages, and only shows off the very best of what she does.

Platform: Static Site

Jordan Sowers

Jordan Sower’s portfolio is another artsy one that sort of mimics the art gallery aesthetic a little. Still, it’s pretty. It’s interesting in that it functions as a portfolio and a store at the same time, but the store is kept almost hidden unless you actually click a link to buy something. It’s a store without the hard sell, and so it’s free to be artistic in its own right.

Platform: Static Site

Heller

And finishing off our list we have another monochromatic design with Heller. It’s modern, it’s pretty, and it has an interesting approach to the collage patterns we see everywhere. This one is definitely going for a futurist feel, even as it’s grounded in the trends of yester-month.

I like the horizontal swipe-in animation they use for images. I mean, if you’re going to animate everything, why not give it that Star WarsTM feel?

Platform: Static Site

Add Realistic Chalk and Sketch Lettering Effects with Sketch’it – only $5!

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

How to Increase Mobile Engagement with Simpler Contact Forms

Original Source: https://www.webdesignerdepot.com/2019/02/how-to-increase-mobile-engagement-with-simpler-contact-forms/

Contact forms are a necessity for websites. Without them, your clients would be relegated to handling website- or business-related matters over the phone or email. Worse, they’d have absolutely no context for the call or message, which would increase the amount of time they’d have to spend responding to it.

Contact forms, instead, gather essential details from visitors so that your clients can go into each conversation better prepared.

Of course, mobile contact forms are tricky. With less screen space to work with, how do you design a form that captures all the details your clients require? The fact of the matter is, you might not be able to. Instead, you’ll have to look at ways to do more with less.

Even if all a form does is collect a name, email, and phone number for someone interested in learning more about a service, the digital collection of that data ensures your clients won’t lose track of leads or capture details incorrectly when writing them by hand. And when forms collect more than that (say, details about an issue they’re experiencing with the website or product), your clients can better prepare themselves for a possibly stressful encounter.

But there’s a delicate balance you must strike when designing forms for mobile users. If you want them to engage with the forms so you can keep your clients from missing out on leads as well as sales, you have to keep a number of things in mind.

Columns

Plain and simple: there’s no excuse for using more than one column on a mobile contact form. Leadformly has a beautiful example of a mobile contact form that keeps everything in a vertical line.

The same principle applies to the fields themselves. If you’re thinking about breaking up the “Name” field into “First Name” and “Last Name”, don’t do it. It’s hard enough inputting information into a mobile contact form. Instead, only place one field per horizontal line and always merge fields that belong together.

Fields

When creating a contact form for your clients’ website, ask yourself: Is each of these fields necessary?

Take, for instance, the Shopify mobile contact form:

Although the store address field is optional, it’s a good choice in this context since this is a support contact form. If someone’s asking for support, then they’re a Shopify customer with a corresponding store address to share.

The “Subject” field, on the other hand, seems like a waste. This form is coming from the help desk. The designer could easily program submissions from this form to include a descriptive subject line so the support representative knows what he or she is about to read.

When too many unnecessary or optional fields are shown, a few things can happen:

Visitors will be frustrated with the extra time spent reading each label, deciding whether or not it’s necessary, and then tabbing over to the next one.
Visitors will give up before they ever get started because the length of the form alone is daunting.
Visitors will be confused by some of the fields, wondering what they’re for and trying to figure out the answer to them.

All in all, a poor selection of form fields can lead to a negative user experience. But only your client and the end user will know which of these fields is absolutely necessary, so make sure you engage with them so you can create the optimal mobile form experience.

Pages

In cases when you have a lengthy contact form you want to put on mobile, you have to think of ways to keep it from appearing overwhelmingly long.

One way to do this is by creating a multi-page form. While you can do this for mobile contact forms that are legitimately lengthy, this is something anyone could use really. Here’s an example from Typeform:

With a handy progress bar at the bottom of the form, users have a clear picture of how much more is left to fill out.

I’d also argue that this is a more engaging mobile contact form experience than a static form stuck to the page.

If you’re not too keen on creating multi-page forms, that’s fine too. There are other things you can do to shorten the space without compromising how many fields are shown. For instance, you can use collapsible menus to only display certain parts of the form at any given time. You can also turn checkbox or radio dial lists into hidden dropdowns.

Labels

In your attempts to conserve space in mobile contact forms, you have to be careful with labels, hints, and error messages that appear within them. Just because you make a form faster to get through space-wise doesn’t mean the instructive text won’t cause friction.

Here’s a good example from MailChimp you can use:

Within this form:

Each field is succinctly and clearly labeled outside of the field.
Any hint text (i.e. instructions on what to do with the field) appears inside the field in a lighter color.
Error messages immediately appear once a user has failed to properly fill in a field.

Also, take notice of the fact that MailChimp does not use asterisks to indicate required fields. This keeps labels clear of unnecessary debris and easy to focus on. If the majority or all of your fields are required, it’s not necessary to mark them as such.

Keyboards

Want to decrease the time it takes users to fill out your mobile contact form? Program it to display the correct keyboard per field. Here is how WPForms does this:

Basic text fields show a standard alpha keyboard:

Email fields show a lowercase alpha keyboard along with punctuation commonly used in email addresses:

Website fields provide options for “/” as well as “.com”:

Saving users time hunting down punctuation and numbers, or typing out expected responses or snippets, will encourage more of them to complete your form.

Wrap-Up

Let’s be honest: for most businesses, the chances of someone converting from a mobile website are quite low — at least lower than they are on desktop. Until consumers become more confident in converting from a smartphone, we have to find other ways to capture their information so we can stay in touch.

That said, just because mobile visitors are unwilling to convert doesn’t mean they’ll be unwilling to fill out a mobile contact form. It’s a low-risk alternative to entering their sensitive data into a mobile website and device, and puts the onus on the company to take the next step. Of course they’re going to prefer this option, so make sure it’s a worthwhile one to take.

 

Featured image via Unsplash.

Add Realistic Chalk and Sketch Lettering Effects with Sketch’it – only $5!

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

SVG Filter Effects: Conforming Text to Surface Texture with <feDisplacementMap>

Original Source: http://feedproxy.google.com/~r/tympanus/~3/Y4bYyA4e2OY/

SVGFilterEffects_displacementMap_featured

Applying texture to text is one of the most popular text effects in graphic design. As much of print and graphic design has made its way into the Web platform, such effects have also been recreated on the Web using CSS, as well as using features of SVG such as patterns, masks and clipping paths. I have an article right here on Codrops that gives you a full overview of different ways to create textured text on the Web using CSS and SVG today that you may be interested in checking out. Yoksel touched on another area of this topic and wrote an article all about animating text fills.

However, one effect that was untouched on was that of text conforming to the texture of a surface. When text conforms to a surface, it takes the shape of that surface. Depending on the surface and texture used, you could end up some really eye-catching results. This is what this article will touch on. And the best part? All these effects are applied to real, searchable, selectable and accessible text.

This is the fifth in a series of articles on SVG filters. In the previous weeks, we got an introduction to SVG filters and learned how to create and use them to produce various effects from outlined text to posterized images, and how to replicate Photoshop-like duotone image effects with SVG filter operations.

Conforming Text to Surface Texture: The Photoshop Way

As with the duotone effect, I looked into how to make text conform to surface texture in Photoshop in an attempt to replicate that effect with SVG filters. I found this step-by-step tutorial on YouTube. The following video is a sped-up version of that tutorial:

In the Photoshop tutorial, the designer created this effect by using what is known as a displacement map. A displacement map is an image whose color information is used to distort the content of another element. To create our text effect, the texture of the image will be used to distort the text so that it conforms to the shape of the texture.

In Photoshop, in order to conform text to a surface the designer followed these steps:

Desaturate the image.
Reduce the amount of detail in the image by blurring it by 1px.

Save the image as a displacement map.

Create the text, and apply a distortion filter to it using the image as a displacement map.
Re-use the original image as a background behind the text.

Then refine the effect more by adding a slight transparency to the text and blending it with the background image.

The displacement map image is blurred in the second step before it is used to displace the text because if the image has too much or too little detail the resulting effect would look less realistic. Usually blurring the image up to 2px is enough to get a moderate amount of detail that’s just enough.

If you’ve read the previous articles in this series, you know that thinking in steps is important to create and recreate effects with SVG filter primitives. And you may have already guessed how to replicate some of these steps using SVG filter primitives, a few of which we have covered in the previous articles.

But the most important step in this effect is the creation and application of the displacement map. How do we do that in SVG?

Conforming Text to Surface Texture in SVG

In order to recreate the effect from the Photoshop tutorial above, we need to first create a displacement map. In SVG, the feDisplacementMap primitive is used to displace content using a displacement map.

feDisplacementMap takes two inputs to produce one result. The image you want to use to displace your content is specified in the in2 attribute. The in attribute is reserved for the input that you want to apply the displacement effect to.

And as with all other primitives, the input for feDisplacementMap can be anything from the SourceGraphic itself to the result of another filter operation. And since we want to apply the displacement map to our source text, this means that the in attribute will have SourceGraphic for a value.

So let’s recreate the Photoshop tutorial steps with SVG filter primitives. The process of conforming text to texture in SVG is very similar to that we saw in Photoshop. I’ll elaborate on each step as we go.

Get the image that will be used as a texture using feImage.

Desaturate the image using feColorMatrix.
Apply a 0.5px Gaussian blur to the image using feGaussianBlur.
Use the image to distort the text using feDisplacementMap.
Blend the text into the background image using feBlend and apply a translucent effect to it (decrease opacity using feComponentTransfer).

Display the text and the image behind it by merging the two layers using feMerge.

The feImage filter primitive is the filter version of the <image> element and has the same attributes as the <image> element too. So in order to render an image in the filter region, we will use feImage. Once we’ve got our image, we can use it as input to other filter operations. It will be used by the feColorMatrix operation to boot because we need to desaturate it.

We’ve mentioned feColorMatrix before, but what we didn’t mention is it comes with a few keywords that are shortcuts to pre-defined matrices. Instead of always having to provide a matrix as a value, you can change the type attribute and use one of the keywords available:

matrix | saturate | hueRotate | luminanceToAlpha

The matrix type is what you’d use when you want to provide a custom matrix as a value for the matrix operation. The other keywords are convenience shortcuts.

To desaturate an image, we use the saturate type. You specify the amount by which you want to desaturate the image in the values attribute. Since we want to completely desaturate our image, we will provide 0 as a value. Note that values are provided as fractions, with 1 (default value) being fully saturated and 0 being completely desaturated (grayscale).

So, let’s start translating our steps into code:

<!– I’m extending the filter region just to increase its area for visual purposes. This is not required or needed for the effect to work.–>
<filter id=”conform” x=”-50%” y=”-50%” width=”200%” height=”200%”>

<!– Get the image. –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none”></feImage>

<!– Desaturate the image. –>
<feColorMatrix type=”saturate” values=”0″ result=”IMAGE”/>

<!– … –>

At this point, our filter region looks like this:

Screen Shot 2019-01-16 at 15.15.00

After desaturating the image, we will blur it by a small amount enough to reduce the amount of detail without losing too much of it. For this particular effect, I chose to blur it by 0.25 pixels only. You may need to experiment with the values to get the right one depending on the image you use and the effect you’re after.

<!– I’m extending the filter region just to increase its area for visual purposes. This is not required or needed for the effect to work.–>
<filter id=”conform” x=”-50%” y=”-50%” width=”200%” height=”200%”>

<!– Get the image. –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none”></feImage>

<!– Desaturate the image. –>
<feColorMatrix type=”saturate” values=”0″ result=”IMAGE”/>

<!– decrease level of details so the effect on text is more realistic –>
<feGaussianBlur in=”IMAGE” stdDeviation=”0.25″ result=”MAP”></feGaussianBlur>

<!– … –>

And our displacement map now looks like this:

Screen Shot 2019-01-16 at 15.43.19

Using feDisplacementMap we can now distort the text with our displacement map:

<!– I’m extending the filter region just to increase its area for visual purposes. This is not required or needed for the effect to work.–>
<filter id=”conform” x=”-50%” y=”-50%” width=”200%” height=”200%”>

<!– Get the image. –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none”></feImage>

<!– Desaturate the image. –>
<feColorMatrix type=”saturate” values=”0″ result=”IMAGE”/>

<!– decrease level of details so the effect on text is more realistic –>
<feGaussianBlur in=”IMAGE” stdDeviation=”0.25″ result=”MAP”></feGaussianBlur>

<!– Use the displacement map to distort the source text –>
<feDisplacementMap in=”SourceGraphic” in2=”MAP” scale=”15″ xChannelSelector=”R” yChannelSelector=”R” result=”TEXTURED_TEXT”></feDisplacementMap>

<!– … –>

At this point, the image we used to distort the text is no longer rendered as it has been used to generate a new result, which is the distorted text. The filter region at this point thus only contains the text that is now conforming to the shape and texture of the fabric in our displacement map:

Screen Shot 2019-01-16 at 15.39.23

You can already see the texture of the fabric take shape on the edges of the text. This is great.

Just like in the Photoshop tutorial, we will now re-display the image behind the text. We will do that by using feImage again:

<!– I’m extending the filter region just to increase its area for visual purposes. This is not required or needed for the effect to work.–>
<filter id=”conform” x=”-50%” y=”-50%” width=”200%” height=”200%”>

<!– Get the image. –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none”></feImage>

<!– Desaturate the image. –>
<feColorMatrix type=”saturate” values=”0″ result=”IMAGE”/>

<!– decrease level of details so the effect on text is more realistic –>
<feGaussianBlur in=”IMAGE” stdDeviation=”0.25″ result=”MAP”></feGaussianBlur>

<!– Use the displacement map to distort the source text –>
<feDisplacementMap in=”SourceGraphic” in2=”MAP” scale=”15″ xChannelSelector=”R” yChannelSelector=”R” result=”TEXTURED_TEXT”></feDisplacementMap>

<!– Re-display the image as a background image –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none” result=”BG”></feImage>

<!– … –>

Lastly, we want to blend the text into the background image to improve the effect. We will decrease the opacity of the text to 0.9 using feColorMatrix, and then we will use the feBlend primitive to apply a blending mode to the text.

Similar to CSS Blend Modes, we have 16 blend modes to choose from. For our effect, the multiply blend mode will do. (In the Photoshop tutorial, the designer used the linear burn, which is not available in SVG/CSS.)

feBlend will take two inputs to blend together: the text and the background image:

<!– I’m extending the filter region just to increase its area for visual purposes. This is not required or needed for the effect to work.–>
<filter id=”conform” x=”-50%” y=”-50%” width=”200%” height=”200%”>

<!– Get the image. –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none”></feImage>

<!– Desaturate the image. –>
<feColorMatrix type=”saturate” values=”0″ result=”IMAGE”/>

<feGaussianBlur in=”IMAGE” stdDeviation=”0.25″ result=”MAP”></feGaussianBlur>

<!– Use the displacement map to distort the source text –>
<feDisplacementMap in=”SourceGraphic” in2=”MAP” scale=”15″ xChannelSelector=”R” yChannelSelector=”R” result=”TEXTURED_TEXT”></feDisplacementMap>

<!—->
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none” result=”BG”></feImage>

<!– Reduce the opacity of the text –>
<feColorMatrix in=”Textured_Text” result=”Textured_Text_2″ type=”matrix”
values=”1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 .9 0″ />

<!– Blend the text with the background –>
<feBlend in=”BG” in2=”Textured_Text_2″ mode=”multiply” result=”BLENDED_TEXT”></feBlend>

<!– … –>

And last by not least, we will layer the new blended text layer on top of the background image layer with feMerge:

<!– I’m extending the filter region just to increase its area for visual purposes. This is not required or needed for the effect to work.–>
<filter id=”conform” x=”-50%” y=”-50%” width=”200%” height=”200%”>

<!– Get the image. –>
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none”></feImage>

<!– Desaturate the image. –>
<feColorMatrix type=”saturate” values=”0″ result=”IMAGE”/>

<!– decrease level of details so the effect on text is more realistic –>
<feGaussianBlur in=”IMAGE” stdDeviation=”0.25″ result=”MAP”></feGaussianBlur>

<!– Use the displacement map to distort the source text –>
<feDisplacementMap in=”SourceGraphic” in2=”MAP” scale=”15″ xChannelSelector=”R” yChannelSelector=”R” result=”TEXTURED_TEXT”></feDisplacementMap>

<!—->
<feImage xlink:href=”…” x=”0″ y=”0″ width=”100%” height=”100%” preserveAspectRatio=”none” result=”BG”></feImage>

<!– Reduce the opacity of the text –>
<feColorMatrix in=”Textured_Text” result=”Textured_Text_2″ type=”matrix”
values=”1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 .9 0″ />

<!– Blend the text with the background –>
<feBlend in=”BG” in2=”Textured_Text_2″ mode=”multiply” result=”BLENDED_TEXT”></feBlend>

<!– Layer the text on top of the background image –>
<feMerge>
<feMergeNode in=”BG”></feMergeNode>
<feMergeNode in=”BLENDED_TEXT”></feMergeNode>
</feMerge>
</filter>

<text dx=”60″ dy=”200″ font-size=”10em” font-weight=”bold” filter=”url(#conform)” fill=”#00826C”> organic </text>

And this is our final result:

Screen Shot 2019-01-16 at 16.12.16

Notes about using Displacement Maps in SVG

The feDisplacementMap element has three attributes that determine how the displacement map will affect the source graphic:

xChannelSelector: specifies which color channel (R/G/B/A) from in2 to use for the horizontal displacement;
yChannelSelector: specifies which color channel (R/G/B/A) from in2 to use for the vertical displacement;
scale: determines the amount by which you want to distort the image. The higher the scale, the stronger the distortion effect is. You’ll probably find yourself experimenting with this value to get the desired result.

Possibly the most important thing to be aware of when using images to displace content in SVG filters is that the image and the content are subject to CORS rules. Make sure you’re serving both the image and the content from the same source to ensure that the browser does not skip the displacement operation.

You can also inline an image in the filter (in feImage) and use it as a displacement map. This pen by Gabi is a great example which uses an inlined SVG pattern to distort the source image. The circular pattern resulting in a ripple-like effect is my favorite.

Applying a Transformation to the Source Text

In the Photoshop tutorial that we followed for this effect, the designer applies a rotation transformation to the text that adds a nice touch to the overall effect.

If we apply a rotation transformation to the <text> to which we are applying the filter, the whole filter region will be rotated, including the image in the background:

Screen Shot 2019-01-16 at 19.32.58

This also happens if you apply other styles to the source text. For example, if you set the opacity on the <text> to 0.5, the text and the image in the background will also be affected by that.

In order to rotate the text but not the rest of the filter region, we can wrap the text in a group (<g>) and apply the filter to the group, and then apply the rotation transformation on the text. This will ensure that only the text is rotated, while the rest of the filter region, which is now defined by the group wrapper, remains unaffected by the transformation. This workaround is courtesy of Amelia Bellamy-Royds.

<g filter=”url(#conform)”>
<text dx=”60″ dy=”200″ font-size=”10em” transform=”translate(-20 30) rotate(-7)” fill=”#00826C”>organic</text>
</g>

I’ve tweaked the transformation a little to add a translation to make sure the text remains centered in the filter region. The result of this transformation now looks like this:

Screen Shot 2019-01-16 at 19.40.50

Note that I’m applying the rotation transformation to the text using the SVG transform attribute and not via CSS because, at the time of writing of this article, Internet Explorer and MSEdge don’t support CSS transformations on SVG elements.

Live Demo

This text displacement effect currently works in all major browsers, including MSEdge. The following is a screenshot of the effect in MSEdge:

Screen Shot 2019-01-16 at 17.44.57

This said, Chrome has recently stopped applying the distortion effect on the text. There’s some more information about this issue in this thread. The rest of the filter operations, however, work and are applied just fine, so, until Chrome fixes this issue, you should be able to see the text blended with the background, only without the distortion along its edges. The following is a screenshot of what the demo looks like in Chrome:

Screen Shot 2019-01-16 at 18.06.57

You can check the live demo out here.

Final words

I hope you’re starting to enjoy the power of SVG filters and thinking of more possibilities and effects to create with them already.

If you liked the idea of conforming text to surface texture, then you’re going to love learning how to create your own texture in SVG. Yup, you read that right. SVG can create texture. In the next article, we’re going to learn how to create a simple texture using a combination of SVG-generated noise and lighting effects. Stay tuned.

SVG Filter Effects: Conforming Text to Surface Texture with <feDisplacementMap> was written by Sara Soueidan and published on Codrops.

When Is It Time to Abandon a WordPress Plugin?

Original Source: http://feedproxy.google.com/~r/1stwebdesigner/~3/RHX7N8ab_z4/

One of the biggest reasons to love WordPress is the sheer number of available plugins. It seems like, no matter what type of functionality you need, there is at least one plugin that can do the job.

But it’s no secret that plugins can sometimes outlive their usefulness. As both our needs and WordPress itself change, we can find ourselves looking for better options. That can mean moving on from a plugin that had previously served us well.

Still, it’s not always the easiest decision to make. Sort of like an athlete that’s past their prime, we can let plugins hang around long after their best days have come and gone.

So, how do you know when it’s time to ditch a plugin and start fresh with something new? The following are a few telltale signs to watch out for.

It Hasn’t Been Updated in a Long Time

Think of a WordPress plugin as a living thing. If it’s properly cared for, it will flourish. If not, the results won’t be nearly as good.

Those of us who build websites with WordPress would ideally like to see that a plugin is updated at least on a semi-regular basis. That shows that its author is still actively involved, adding new features and fixing bugs.

That’s never been more important, what with WordPress moving to the Gutenberg editor and PHP 5.x being phased out. If a plugin hasn’t been actively maintained, then it’s likely to fall short of being compatible with either of these major changes. Plus, there could be serious concerns regarding security as well.

Now, that doesn’t mean that a particular plugin has to be updated weekly or even monthly. Depending on its purpose, that may not be necessary. But you will want to look for, at the very least, a couple of updates per year. Anything less than that and you might as well give it one last hug goodbye.

An abandoned cockpit.

Updates Routinely Break

On the opposite end of the spectrum are plugins that, while continuously maintained, have become functionally unreliable. Updates are released frequently, but it’s usually because the previous ones have wreaked havoc on a number of websites.

This is frustrating, as you have a plugin that (at one point) did what you needed it to do. However, an over-aggressive developer has managed to cause as many problems as they have solved (if not more).

Depending on your personality, you may be willing to show some patience in this situation. Sometimes it actually pays off, as even a quality plugin can go through a rough patch and eventually right the ship. But inevitably things have to get better in short order. Otherwise, it’s just not worth the trouble.

Bits of broken glass.

It Has Become Bloated

A plugin quite often starts out trying to solve a specific problem. If it accomplishes that goal, its author may decide to add some related features to make it even more useful. This can be a great thing, if the new additions are well-executed.

The downside is that, over time, some plugins morph from solving a single problem into something that tries to solve every problem. This once terrific piece of software now is more accurately described as bloatware.

This can have negative effects on your website. For one, more features mean more code. The chances of both annoying bugs and hits to performance rise with every new feature.

It can get to the point where a plugin is no longer a good fit. In that case, it’s time to look for one that’s more focused and efficient in its functionality.

A boulder sitting in grass.

There’s Something Better

When it comes to plugins, part of a web designer’s job is to provide clients with the best option available. But just because a plugin was once the best option doesn’t mean it will stay that way forever.

This is especially so when it comes to plugins that occupy overcrowded categories like SEO or photo galleries. It seems like someone always comes along and tops whatever the previous leaders have done.

That doesn’t necessarily mean that we should immediately jump off the bandwagon when something new comes out. But it does suggest that it’s worth keeping an eye on what else is out there. You may find that another plugin offers something that you just can’t pass up.

Sky with the word "CHANGE" written in clouds.

Change Can Be Difficult, but Necessary

Let’s face it. It can be a real pain to swap one plugin for another. The process often involves refactoring or even recreating content that was being used by the old plugin so that it plays nicely with the new one. Therefore, it’s not a decision to take lightly.

Then, there’s always the unknown of how that new plugin will work out. Will there be any unintended consequences from using it? How can you be sure that it will still be around in a few years? Testing helps, but there’s still a leap of faith required when making a switch.

In the end, this is all part of a website’s lifecycle. The good news is that, with so many choices out there, making those changes to a WordPress website will just about always lead you to a better path forward.


Collective #491

Original Source: http://feedproxy.google.com/~r/tympanus/~3/UtlBtoRlrDg/

C491_regex

New JavaScript Features That Will Change How You Write Regex

Faraz Kelhini explains the new JavaScript features that enhance text processing capabilities.

Read it

C491_VueBook

Affiliate Link
Vue.js 2 Cookbook: Build modern, interactive web applications with Vue.js

101 hands-on recipes that teach you how to build professional, structured web apps with Vue.js.

Check it out

C491_videopl

IVID

IVID is an interactive video player for modern browsers that is easy to setup and use.

Check it out

C491_alistapart

Paint the Picture, Not the Frame: How Browsers Provide Everything Users Need

A very interesting article by Eric Bailey Every on how adjustments to the appearance and behavior of the features browsers can come at the expense of alienating users.

Read it

C491_vue

Vue 2.6 released

Evan You writes about all the new features that come with this update of Vue.

Read it

C491_captureWebsite

capture-website

A tool that lets you capture screenshots of websites.

Check it out

C491_vixel

Vixel

A WebGL path tracing voxel renderer built with regl.

Check it out

C491_activetheory

The Story of Technology Built at Active Theory

Read about the interesting tools that were developed at Active Theory for streamlining their workflow.

Read it

C491_hackertools

Hacker Tools

Learn to make the most of the tools that hackers have been using for decades.

Check it out

C491_sticky

Position: stuck; – and a Way to Fix It

Dannie Vinther writes about the shortcomings of position: sticky when working with overflow.

Read it

C491_svgfilter

SVG Filters are 💕

An amazing SVG filters demo by yoksel as part of her latest talk.

Check it out

C491_remedy

CSS Remedy

Start your project with a remedy for the technical debt of CSS.

Check it out

C491_whitespace

Contrast illusion, negative space animation

A beautiful collection of demos by Kunuk Nykjaer.

Check it out

C491_boring

Make it Boring

Jeremy Wagner explains why “boring” can be preferable to “exciting” when it comes to front-end development.

Read it

C491_terminal

Qoa

Lightweight and without any external dependencies, qoa enables you to receive various types of user input through a set of intuitive, interactive and verbose command-line prompts.

Check it out

C491_thirdparty

Third Party Web

A summary of which third party scripts are most responsible for excessive JavaScript execution on the web.

Check it out

C491_github

User owned projects—your personal workspace

Learn about user owned project boards, GitHub’s latest release.

Read it

C491_issuesorgan

GitHub Organization Issues Link

A Chrome extension that adds an Issues tab and lets you browse all issues of an organization.

Check it out

C491_shapesdemo

Canvas Times Tables (Circles)

A fantastic demo for the February 2019 CodePen Challenge on shapes.

Check it out

C491_performance

Vue.js App Performance Optimization Part 1

Filip Rakowski’s first article in a series on Vue performance optimization techniques.

Read it

C491_inputcolor

Dear web developers: set the font color, too

Steven Luu on the importance of setting the text color and background color of form inputs.

Check it out

C491_setupmac

How to set up your Mac for Web Development

Michael Uloth guides us through the minimum setup for getting up and running with JavaScript-based web development on a Mac.

Read it

C491_blotter

From Our Blog
Text Distortion Effects using Blotter.js

Some text distortion experiments using the Blotter.js library. The idea is to distort text as we scroll or move the mouse.

Check it out

Collective #491 was written by Pedro Botelho and published on Codrops.