Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

October 11 2019

19:43
Fall Freebie: Downloadable Halloween Icons and Graphics
16:32

Automatically Create a Multilingual WordPress Site With a Translator Plugin

A multilingual WordPress site is one that offers content in more than one language. For example, a site can provide content in English, French, German, and Spanish. Since most countries have more than one official language, it makes sense to have content in multiple languages. Having a multilingual site is one of the best ways to break into international markets.

With the AJAX Translator Revolution plugin, you can automatically translate your WordPress site into any language you want!

Any site owner aims to reach as many people as possible. The easiest way to achieve that is by creating a multilingual site. There are many plugins that make it easy to translate your site. In this tutorial, we'll look at one of the best: the Ajax Translator Revolution dropdown plugin to create a multilingual website.

By the end of this tutorial, we should have something like this:

Advantages of a Multilingual Site

When it comes to staying ahead of your competition, businesses are inventing all manner of ways to capture as many customers as they can. Having a multilingual site is one of the ways you can stay ahead of your competition. It also has other advantages, as outlined below.

Reach a Wider Audience

The number of internet users in 2019 is an estimated 4.39 billion. This number is expected to go up every year. This population represents potential customers who could be interested in what you have to offer if they can access it—but most of those 4.39 billion people are not English speakers.

Increase in Sales

Making your site multilingual is an effective way of increasing sales. Since more and more people will visit your website, the chances of sales increase rapidly.

Increase in Web Traffic

A multilingual site means that your website will mean that users all over the world will discover your site, especially if it is optimized for SEO. If your site appears for a single search in multiple languages, the traffic on your website will blow up within months, and of course this also has a direct effect on sales.

Expand Into New Markets

A multilingual site can help you break into new markets and acquire new customers without any extra effort. eCommerce websites have perfected this strategy well. A new language on your site can double the number of people who visit your website.

Build Trust

Most people tend to view multilingual sites as global sites, and this proves to be an advantageous trait since it adds a feeling of trust towards your brand.

Ajax Translator Revolution Dropdown Plugin

Ajax Translator is a powerful and user-friendly plugin that makes it easy to translate your site, saving time on manual translation. Ajax Translator comes with over 100 built-in languages, allowing you to offer content with any possible language in the world. It provides the ability to keep your content in every language up to date while still only having to maintain the original content.

It is also easy to set up and allows you to change the default language on your site and arrange the order in which languages will display to the user. It will literally only take a minute to translate your website!

Ajax Translator works by automatically translating content in pages, categories, posts, custom post types, tags, widgets, plugins, and themes—unless otherwise specified.

Key Features:

  • supports 103 languages 
  • integrates with the WordPress admin system
  • search engine optimized.
  • customizable—you can translate anything
  • remembers visitors' languages
  • can show language flags or names

Create a Multilingual Site

To start, download the AJAX Translator Revolution plugin from CodeCanyon. You will get a link to download the files. Alternatively, you can find them in the download section of your account with your other purchased items.

Once you've downloaded the WordPress files, log in to your WordPress site, go to Plugins > Add New, and upload the zip file you got from CodeCanyon. After uploading, click Install Now, wait a few seconds, and then click Activate. You can now start using the plugin.

Configurations

After activation, the plugin should appear as a sidebar menu as Auto Translation option in the admin area of your WordPress site. Go to Auto Translation > Dashboard, click on Settings, and enter the purchase code. 

The next task is to choose which languages you want your site to be translated into. Go back to the settings section and select the languages you wish to translate to, as shown below. Save your changes.

Display Multiple Languages for Content

The next step is to place the Auto Translation widget at the site, preferably at the top right of your website, which in turn allows users to switch between multiple languages when viewing content. Go to Appearance > Widgets, and drag and drop the widget to the sidebar, header, or menu section of your website. Depending on your theme, choose the appropriate place for the widget. In this case, we will place it at the Header Sidebar. Once you are done, save the changes.

Now go back to your site, and you should see the Auto Translation in action. All the active languages are showing automatically everywhere on the site. Your visitors can now choose which language they wish to view your site with. 

For example, if a user is browsing the posts page, they can switch to any language, and Auto Translation displays the posts in the user's preferred language. A Spanish translation will appear as follows.

The plugin also looks good on smaller devices as seen below

All the content on the site now is being translated. However, if you don't wish to have all the content translated, you can disable or hide the translator. Go to Auto Translation > Settings > Hide on Pages, Posts, and Categories, select your preferred options, and save the changes.

Conclusion

A translation plugin is the easiest way to get your content available in different languages. This plugin is suitable for all types of businesses, including educational institutions, blogs of all kinds, and international organizations. It takes the hassle out of translating your site manually, which may end up taking a lot of time and resources.


  • WordPress
    10 Best WordPress Slider & Carousel Plugins of 2019
    Nona Blackman
  • WordPress
    8 Best WordPress Booking and Reservation Plugins
    Lorca Lokassa Sa
  • WordPress
    6 Best Weather WordPress Widgets & Plugins
    Kyle Sloka-Frey
  • WordPress Plugins
    20+ Best Popup & Opt-In WordPress Plugins
    Nona Blackman

14:34

Two Images and an API: Everything We Need for Recoloring Products

I recently found a solution to dynamically update the color of any product image. So with just one <img> of a product, we can colorize it in different ways to show different color options. We don’t even need any fancy SVG or CSS to get it done!

We’ll be using an image editor (e.g. Photoshop or Sketch) and the image transformation service imgix. (This isn’t a sponsored post and there is no affiliation here — it’s just a technique I want to share.)

See the Pen
Dynamic Car color
by Der Dooley (@ddools)
on CodePen.

I work with a travel software company called CarTrawler on the engineering team, and I recently undertook a project a revamp our car images library that we use to display car rental search results. I wanted to take this opportunity to introduce dynamically colored cars.

We may sometimes load up to 200 different cars at the same time, so speed and performance are key requirements. We also have five different products throughout unique code bases, so avoiding over-engineering is vital to success.

I wanted to be able to dynamically change the color of each of these cars without needing additional front-end changes to the code.

Step 1: The Base Layer

I'm using car photos here, but this technique could be applied to any product. First we need a base layer. This is the default layer we would display without any color and it should look good on its own.

Step 2: The Paint Layer

Next we create a paint layer that is the same dimensions as the base layer, but only contains the areas where the colors should change dynamically.

A light color is key for the paint layer. Using white or a light shade of gray gives us a great advantage because we are ultimately “blending” this image with color. Anything darker or in a different hue would make it hard to mix this base color with other colors.

Step 3: Using the imgix API

This is where things get interesting. I'm going to leverage multiple parameters from the imgix API. Let's apply a black to our paint layer.

(Source URL)

We changed the color by applying a standard black hex value of #000000.

https://ddools.imgix.net/cars/paint.png?w=600&bri=-18&con=26&monochrome=000000

If you noticed the URL of the image above, you might be wondering: What the heck are all those parameters? The imgix API docs have a lot of great information, so no need to go into greater detail here. But I will explain the parameters I used.

  • w. The width I want the image to be
  • bri. Adjusts the brightness level
  • con. Adjusts the amount of contrast
  • monochrome. The dynamic hex color

Because we are going to stack our layers via imgix we will need to encode our paint layer. That means replacing some of the characters in the URL with encoded values — like we’d do if we were using inline SVG as a background image in CSS.

https%3A%2F%2Fddools.imgix.net%2Fcars%2Fpaint.png%3Fw%3D600%26bri%3D-18%26con%3D26%26monochrome%3D000000

Step 4: Stack the Layers

Now we are going to use imgix’s watermark parameter to stack the paint layer on top of our base layer.

https://ddools.imgix.net/cars/base.png?w=600&mark-align=center,middle&mark=[PAINTLAYER]

Let's look at the parameters being used:

  • w. This is the image width and it must be identical for both layers.
  • mark-align. This centers the paint layer on top of the base layer.
  • mark. This is where the encoded paint layer goes.

In the end, you will get a single URL that will look like something like this:

https://ddools.imgix.net/cars/base.png?w=600&mark-align=center,middle&mark=https%3A%2F%2Fddools.imgix.net%2Fcars%2Fpaint.png%3Fw%3D600%26bri%3D-18%26con%3D26%26monochrome%3D000000

That gives the car in black:

(Source URL)

Now that we have one URL, we can basically swap out the black hex value with any other colors we want. Let’s try blue!

(Source URL)

Or green!

(Source URL)

Why not red?

(Source URL)

That's it! There are certainly other ways to accomplish the same thing, but this seems so straightforward that it’s worth sharing. There was no need code a bunch of additional functionality. No complex libraries to manage or wrangle. All we need is a couple of images that an online tool will stack and blend for us. Seems like a pretty reasonable solution!

The post Two Images and an API: Everything We Need for Recoloring Products appeared first on CSS-Tricks.

14:33

The Teletype Text Element Lives On… at Least on This Site

It was this: <tt>

I say "was" because it's deprecated. It may still "work" (like everybody's favorite <marquee> in some browsers), but it could stop working anytime, they say. The whole purpose of it was to display text in a monospace font, like the way Teletype machines used to.

Dave used it jokingly the other day.

Which got me thinking how much I used to use that element!

Right here on CSS-Tricks. See, in my early days, I learned about that element and how its job is to set text as monospace. I thought, oh! like code! and then for years that's how I marked up code on this site. I had never heard of the <code> element! When I did, I switched over to that. But I still haven't updated every single article from <code>

I bring this up just because it's a funny little example of not knowing what you don't know. It's worth having a little sympathy for people early in their journey and just doing things that get the job done because that's all they know. We've all been there... and are always still there to some degree.

The post The Teletype Text Element Lives On… at Least on This Site appeared first on CSS-Tricks.

13:00

20+ Best Wedding Photoshop Actions

Adding stylish effects to wedding photos (such as retro, rustic, and moody filters) is a popular trend these days. One of the easiest ways to add this type of effect to your photos is with these—our picks of the best wedding Photoshop actions!

Whether you’re trying to improve your own wedding photos before uploading them to social media and your wedding website or you’re a freelance designer/photographer working on a whole bunch of wedding photo albums, these Photoshop actions will definitely come in handy.

In this post, we’re featuring a collection of the best wedding Photoshop actions you can use to instantly optimize your photos to make them look extra special (and a summary of the most popular wedding photo effect styles).

Top Pick

Rustic Wedding – Camera Raw Presets for Photoshop

Rustic Wedding - Camera Raw Presets for Photoshop

Rusting Wedding is a massive collection of wedding photo effects that comes as Photoshop Camera Raw presets and Lightroom presets. The bundle features 50 different effects.

Camera Raw in Photoshop works similarly to Lightroom and lets you easily customize the effects using multiple adjustments. Even though these aren’t Actions, Camera Raw presets also lets you apply effects to photos with just a few clicks. You’ll need Photoshop CS6 or higher to use the presets.

Why This Is A Top Pick

Camera Raw presets are ideal for wedding photos since they work with RAW image file formats. These presets also offer more advanced options for customizing the effects as well.

Wedday Matte Wedding Photoshop Action

Wedday is a Photoshop action made specifically for optimizing wedding photos. Featuring non-destructive effects, the action allows you to easily enhance your wedding photos with beautiful matte pastel toning. It works with Photoshop CS4 and higher.

25 Bridal Wedding Photoshop Actions

This is a bundle of wedding Photoshop actions that work well for optimizing bridal photos. However, they should work well for enhancing couple and groom photos as well. It includes 25 different Photoshop actions with various effects.

Royal Wedding Pro Photoshop Actions

Royal wedding pro is a collection of Photoshop actions made for professional wedding photographers. It aims to help you optimize your workflow by allowing you to enhance photos related to engagement, outdoor pre-shoots, and all other types of wedding photos.

Peony Wedding Photoshop Action

This is a special Photoshop action that’s been designed to bring out the true colors of those low-light and dull outdoor photos. It’s a must-have PS action for not just improving wedding photos but for enhancing all kinds of photos.

Caramel Wedding Photoshop Action

Caramel is a professionally crafted Photoshop action you can use to optimize your wedding photos taken outdoors and natural light conditions. The action creates a non-destructive effect with adjustment layers for easier editing as well.

Free Royal Wedding Pro Photoshop Actions

The free Photoshop actions in this set are designed for adding various professional touches to your wedding photos. These actions will help you create various styles of wedding effects for free.

Free Bridal Photoshop Actions

A set of 5 effective Photoshop actions for improving wedding photography, especially bridal photos. This pack features actions that are compatible with Photoshop CS3 and higher.

12 Beautiful Wedding Photshop Actions

This collection also includes a series of beautiful effects you can use to add more special effects and filters to your outdoor wedding photos. It comes with 12 different actions with subtle faded film effects.

Suburbia Wedding Photoshop Actions

Suburbia is a collection of multipurpose Photoshop actions you can use to optimize photos from weddings to newborns and family photos. The pack includes 6 different Photoshop actions featuring rustic, soft, and many other effects.

Black & White Wedding Photoshop Actions

Adding a black and white effect is a great way to add more authenticity for wedding photos. With this pack of Photoshop actions, you’ll be able to create a truly professional B&W effect and customize it however you like.

HDR Stock Wedding Photoshop Actions

This collection of Photoshop actions will help you create a realistic High Dynamic Range without having to take multiple photos and mess around with different exposures. It includes 18 actions that are compatible with Photoshop CS4 or higher.

20 Free Wedding Photoshop Actions v1

This bundle includes 20 professional and free Photoshop actions you can use to improve your wedding photos with various filters and effects. The actions are compatible with Photoshop CS3 and higher.

20 Free Wedding Photoshop Actions v2

This is the second version of the previous bundle featuring 20 more amazing Photoshop actions for enhancing wedding photos. The effects of these actions are easily editable as well.

Dark Photography Wedding Photoshop Actions

Dark photography is a collection of Photoshop actions that allows you to give a stylish dark effect to your wedding photos to make them look unique and authentic. The bundle includes 10 different PS actions.

Carbonium – Black & White Wedding Photshop Actions

The Photoshop actions in this bundle allow you to add a unique chromatic effect to your wedding photos and make them travel through time. It includes 16 different actions with various effects and optimizations.

MicroPro Fantasy Pink Wedding Photoshop Action

This gorgeous Photoshop action creates a beautiful and colorful effect that will completely transform the look and feel of your wedding photos. It’s ideal for adding a special effect to outdoor photos.

Redwood Fairytale Wedding Photoshop Actions

Redwood is a creative Photoshop action that creates a special toning effect to make your photos look like they were taken out of a fantasy movie. It includes 3 different actions with unique effects to make your wedding photos look more magical.

50 Film Noire Wedding Photoshop Actions Bundle

This bundle of Photoshop actions will give you plenty of choices for optimizing your wedding photos, portraits, outdoor photos, and much more. It includes 30 cinematic color effects and 20 black and white effects.

6 Free Wedding Photoshop Actions

This is a collection of 6 creative wedding Photoshop actions that include various effects and enhancements, including matte effects and black and white effects. It’s free to use with your wedding photos.

Free Modern Wedding Photoshop Action

A free Photoshop action featuring an attractive effect you can use to optimize and enhance wedding photos. It lets you add a subtle tone to your photos.

Wedding Photo Filters Photoshop Actions

This is a bundle of Photoshop actions featuring 50 different color effects. You can use this collection to add creative color filters to your wedding photos, including matte, vintage, and retro effects.

7 Wedding Photo Effect Photoshop Action

This pack comes with 7 unique Photoshop actions for enhancing and optimizing wedding photos for perfect tone and add stylish effects. The actions create non-destructive and customizable effects.

Wedding – Photoshop Actions

A bundle of 15 Photoshop actions for improving wedding photography. It includes effects that work well with portraits, outdoor photos, and group photos.

Wedding Pack – Vintage Photoshop Actions

If you’re working on a vintage-themed wedding photo album, this collection of Photoshop actions will come in handy. It includes 18 Photoshop actions featuring various vintage-inspired effects and styles.

Modern Wedding Photoshop Actions

This bundle includes 25 Photoshop actions to help you enhance and optimize your wedding photos. It features 5 basic actions, 15 wedding day actions, and 5 finishing and retouching actions.

Summer Love – Romantic Wedding Photoshop Actions

This unique Photoshop action allows you to enhance your outdoor wedding photos by giving them a creative summer-like look and feel. The action creates a non-destructive effect.

WEDDLIGHT – Lighting Effect Wedding Photoshop Actions

This Photoshop action is perfect for optimizing wedding portraits and it creates an easily customizable non-destructive effect with adjustment layers.

BLACK LEAVE – Special Effects Wedding Photoshop Action

Another creative Photoshop action that creates a stylish effect with dark design to highlight specific colors in your wedding photos. The action is easily customizable as well.

5 Popular Wedding Photo Effect Styles

If you’re planning on editing wedding photo-shoots using a trendy theme, these effect styles will come in handy.

1. Vintage Style

If you want to make your wedding photos stand out, the vintage style is best for you. This style uses vintage colors and effects to give an old-school look to your photos.

2. Light and Airy Style

Light and airy style is perfect if you’re looking to create a natural and elegant look in your wedding photos. This style of photos tends to look more professional as well.

3. Moody Style

Moody style photos feature a slightly darker tone that creates a special look in different types of wedding photos. This style, however, is most suitable for outdoor photography.

4. Black and White Style

Nothing beats the classic look of black and white photography. If you want to create a timeless look in your wedding photos, this is the style you should choose for your album.

5. Matte Style

Matte style wedding photos feature soft colors with a bit of extra brightness to add a sort of mist-like effect highlighting the whites. This style is perfect for modern wedding photography, especially for digital photos.

Check out our collection of the best portrait photoshop actions for more inspiration.

12:00
Entrepreneurs Can Plan for a Profitable Future Through 5 Smart Ways
10:30

The W3C At Twenty-Five

The W3C At Twenty-Five

The W3C At Twenty-Five

Rachel Andrew
2019-10-11T12:30:00+02:002019-10-11T12:07:24+00:00

Last week, the World Wide Web Consortium (W3C) celebrated its 25th anniversary and invited folks to share why the open web platform matters to them via the hashtag #WebStories. As I’m both a member of the CSS Working Group at W3C and the representative for Fronteers, I think it’s a good time to explain a bit more about the role of the W3C in the work that we all do.

What Exactly Is The W3C?

On the W3C website, the About page describes the W3C as:

"... an international community where Member organizations, a full-time staff, and the public work together to develop Web standards. Led by Web inventor and Director Tim Berners-Lee and CEO Jeffrey Jaffe, W3C’s mission is to lead the Web to its full potential."

There are links on that page to details of the mission and vision of the W3C, however, the key motivation of the organization is to ensure that the web is for everybody — and on everything.

Access to the web should not be limited by who you are, where you are, or the device you are using.

Who Are The Member Organizations?

A W3C Member is an organization who pays a membership fee to be part of the W3C. At the time of writing, there are 449 members, and you can see the full list here. If you read through this list, you will find that the majority of members are very large companies. Some are names that we as web developers readily recognize: browser vendors such as Google and Mozilla, large internet companies such as Airbnb and Facebook. However, there are members from many different industries. The web touches pretty much every area of life and business, and there are companies doing interesting things in the space that we might not think of as web companies. For example, people working in traditional publishing (a lot of books are formatted using web technologies) and the automotive industry.

What all the members have in common is that the web impacts the work that they do, and they are keen to have a say in the direction things move, and even to play a part in creating and specifying web technologies.

I represent Fronteers (the Dutch organization of web developers) in the W3C. This year, Fronteers took the unusual* step of becoming a W3C Member Organization.

* “Unusual” because they are a voluntary organization representing web developers, rather than a big company representing the interests of a big company.

The Advisory Committee (AC)

Member organizations take part in the business of the W3C by having a vote on various matters. This is organized by the organization’s AC representative whose job it is to ferry information from the W3C to the organization, and also bring the point of view of the organization to relevant topics being discussed at the W3C.

I’m the rep for Fronteers and so I attend two AC meetings a year — and get a lot of emails! On voting matters, I have to find out from Fronteers how they want to vote and then cast the Fronteers vote. In the last year, one important voting matter was the election of Advisory Board (AB) members; Fronteers held an internal vote, and I took the results back to make the official vote at the W3C.

W3C Groups

Most web developers are probably more aware of the W3C working groups than the rest of the organization, as it is through these groups that most of the work we care about goes on. Any member organization can opt people from their organization onto a working group. In addition, the groups may invite certain people (known as Invited Experts) to participate in that group. I was an Invited Expert on the CSS Working Group, and now am part of the group as the representative for Fronteers. In practical terms, my interaction with the CSS Working Group remains the same, however, I now have a role to play in the W3C as a whole as the W3C rep for Fronteers.

There are a large number of working groups, covering a whole range of technologies. These groups typically work on some kind of deliverable, such as the specifications produced by the CSS Working Group. There are also a number of Interest Groups, which allow for the exchange of ideas around particular topics which may also fall partly into the remit of some of the working groups.

The above groups require a significant time commitment and either a W3C membership or Invited Expert status, however, there are a number of Community and Business Groups that are open to any interested person and do not impose a particular time commitment. The Web Platform Incubator Community Group is one such group and has a Discourse forum for the discussion of new web features, and also various proposals on GitHub. Many of these features ultimately become CSS or other language specifications and therefore part of the platform.

Getting Involved And Following Along

In addition to joining a community group, it is worth noting that anyone can become involved in the work of the W3C, i.e. you don’t need to be an Invited Expert, part of a member organization, or have any special qualifications. For example, if you want to know what is happening at the CSS Working Group, you can take a look at our Issues on GitHub. Anyone can comment on these issues to offer new use cases for a feature and can even raise an issue for a feature they feel should be part of a CSS specification.

As with most W3C groups, the CSS WG uses IRC to minute meetings; any discussion on an issue will be posted back to the issue afterward so anyone who is interested can follow along.

A GitHub message auto-generated to link IRC minutes to the issue An example of a message that was auto-generated regarding an issue that had been discussed in a meeting.

If you are keen to know what the wider W3C is doing, then the strategic highlights document is a good place to look. The latest document was produced in September, and exposes some of the key work recently achieved by W3C groups. Scrolling through that document demonstrates the wide range of activities that the W3C is involved with. It is so important for the web community to engage with standards, as we’ve already seen examples in the past of what happens when vendors control the direction of the web.

This history is explained beautifully by Amy Dickens in her post, “Web Standards: The What, The Why, And The How”:

"Without the Web Standards community, browser makers would be the ones making decisions on what should and shouldn’t be features of the world wide web. This could lead to the web becoming a monopolized commodity, where only the largest players would have a say in what the future holds."

My #WebStory

Why does all of this matter to me? One of the reasons I care so much about the web platform remaining open and accessible to new people who want to publish on and build things for the web is because of the route I took to get here.

As mentioned earlier, the W3C is celebrating their anniversary by inviting people to share stories of how they became involved in the web.* In that spirit (and perhaps to encourage Smashing readers to share their stories), here is mine.

* So many folks have already shared their journey on the W3C Blog of how they were first amazed by the web and continue to be in awe of its potential. Join in and share your story!

I had never intended to work with computers. I intended to become a dancer and singer, and I left school at 16 to go to dance college. My father is a programmer, however, so we were fairly unusual at the time as we had a computer in the house by 1985 when I was 10.

As a child, I liked typing in the code of “choose your own adventure” games, which appeared in books and magazines. I liked spotting the strings of text which would then show up in the game I would later play (usually, once my dad had fixed it up) on our Amstrad CPC464. I liked to visit the computer lab at Newcastle University, see the huge computers, and talk to the women who worked on them. Perhaps most importantly (and despite my arty interests), I never grew up thinking I couldn’t use computers. I just wasn’t especially interested.

A book with lines of code intending to be typed out to make a text game The books I copied games out of as a child.

At school, I learned to type on an electronic typewriter, and the only computer in evidence was in the art room that was used for basic drawing applications. As we did have computers at home, I had used them for schoolwork, despite some teachers not being happy about printed essays.

I ultimately left dance and went backstage, working in the West-End of London. Moving lights, automated sets, and show control systems were about to make huge changes to an industry that had seen little change in years. We were seeing the beginnings of that change when I was in the West End; I remember laughing with the crew as we heard news about some show with a “fancy computer system” which had lots of problems that our traditional production didn’t have. None of us could have imagined the changes that were coming.

Then I became pregnant with my daughter and had to leave the theatre. I was good at crewing and loved the theatre, but it was heavy and sometimes dangerous work with unsociable hours — not really a job for someone with a baby. I didn’t know what I would do, but I could type so I thought that perhaps I could type up essays for people. I was upsold to a computer — having gone into PC World looking for a wordprocessor. It was a Packard Bell 486 with a built-in 640×480 screen — a terrible machine that would allow me to either get the sound card working or the modem, but not both at once. I chose the modem and this is where my web story really begins. Even getting this modem working and getting the computer onto the Internet was something of a challenge and, once I did, I went looking for information about… babies.

I didn’t know anything about babies. All my friends were men who worked backstage in theatre. I had no support network, no family around me to help, and so I logged onto ParentsPlace and found people who didn’t mind my questions and were happy to help. At the time, there obviously was no Facebook. This meant that if you wanted to share photos and stories, you built a website. So among the forums about childbirth and toddler tantrums, there were people teaching each other HTML and sharing sets of graphics along with the code to place them. It was like typing out those “choose your own adventure” books again. I was amazed that I didn’t need anyone to fix my code — it just worked!

A screenshot of the 1997 ParentsPlace website Pulled out from the Internet Archive, this was a website named ‘ParentsPlace’ that existed around the time I was pregnant with my daughter. archive.org link

Before long, people would pay me to build them a website, and I felt that I should repay at least in some way for all of the questions I had asked. So, I started to answer questions in the forums. That was how it seemed to work. People would learn and move one step up the ladder, the new people would come in with the same questions and the people a step ahead would answer — all the while asking their own questions of those further along. I loved this. I could never have afforded lessons, but I had time. I could help others, and in return, people helped me. I discovered through this that I was quite good at explaining technical things in a straightforward way — an ability I have always accredited to the fact that I struggled to learn these new things myself. It was never easy. I was willing to spend the time, however, and found it interesting.

With my daughter on my knee, I started to teach myself Perl because I didn’t like any of the off-the-shelf guestbooks and wanted to write my own. I installed Linux on a second-hand Compaq, and learned the basics of systems administration, how to compile Apache, wrapped my head round file permissions, and so by the time my daughter was three years old, I got a job heading up a technical team in a property “dot com” company.

I became interested in web standards essentially because it made no sense to me that we would have to build the same website twice — in order that it would work in both browsers. At the time, Dreamweaver was the tool of choice for many web developers, as it made dealing with the mess of nested tables we had to battle with much easier. So, influenced by the work of The Web Standards Project, I (along with my then-boyfriend, now-husband Drew McLellan) began sharing tips and Dreamweaver extensions with the Dreamweaver Usenet group, while all along explaining why web standards were important and showing how to make Dreamweaver support standards.

A screenshot of my bio on the WaSP site retrieved from the Internet Archive My bio on the WaSP site in 2002 — there wasn’t much to say! (archive.org link)

Ultimately, we both ended up on the Macromedia Beta, helping to make Dreamweaver itself more standards-compliant. We were also invited to join the Web Standards Project — specifically to be part of the Dreamweaver Task Force. I couldn’t believe that Jeffrey Zeldman emailed me, asking me to join WaSP! These were the people I looked up to and had learned so much from. The fact that they wanted me to be part of the organization was amazing and gave me so much confidence to continue with the work I was already doing.

That involvement became the bedrock of my career; I realized that my ability to explain technical things could help other web developers learn these new technologies and understand the need for standards. I also discovered that being able to explain things clearly was useful in raising bug reports, and writing up use cases for new software features (in browsers or tools such as Dreamweaver). Two decades after discovering web standards, I am still doing this work. It continues to interest me, and I think it is more important than ever.

The open nature of the web, the relative simplicity of the technologies, and the helpful, sharing attitude of the community is why I am here at all. One of the biggest reasons why I have stayed after all these years is because of Web standards and the continued fight for the open web. That’s why I think that the W3C and the standards process is vitally important, and why I think it so important that web developers get involved in the process, too.

I want to help ensure that the voice of the web developer working on small projects is heard, and that the direction of the web isn’t dictated by a few giant companies. The web is where we have made our careers, and often even our social lives; it is the way that we communicate with each other. I want it to stay a place where I want to be. I want it to remain open enough that the next person without a technical background can pitch up and start publishing and creating, and find it a place they want to establish a career, too.

What’s Your Web Story?

Whether you have been working on the web for over 20 years or only one, please share your stories on the W3C blog, on your own site, or perhaps write up something in the comments section here below. I’d love to hear your journey!

Smashing Editorial(il)
06:31
How to Build Your Brand through Website Design

October 10 2019

17:32

Weekly Platform News: Impact of Third-Party Code, Passive Mixed Content, Countries with the Slowest Connections

In this week's roundup, Lighthouse sheds light on third-party scripts, insecure resources will get blocked on secure sites, and many country connection speeds are still trying to catch up to others... literally.


Measure the impact of third-party code during page load

Lighthouse, Chrome’s built-in auditing tool, now shows a warning when the impact of third-party code on page load performance is too high. The pre-existing “Third-party usage” diagnostic audit will now fail if the total main-thread blocking time caused by third-parties is larger than 250ms during page load.

Note: This feature was added in Lighthouse version 5.3.0, which is currently available in Chrome Canary.

(via Patrick Hulce)

Passive mixed content is coming to an end

Currently, browsers still allow web pages loaded over a secure connection (HTTPS) to load images, videos, and audio over an insecure connection. Such insecurely-loaded resources on securely-loaded pages are known as “passive mixed content,” and they represent a security and privacy risk.

An insecurely-loaded image can allow an attacker to communicate incorrect information to the user (e.g., a fabricated stock chart), mutate client-side state (e.g., set a cookie), or induce the user to take an unintended action (e.g., changing the label on a button).

Starting next February, Chrome will auto-upgrade all passive mixed content to https:, and resources that fail to load over https: will be blocked. According to data from Chrome Beta, auto-upgrade currently fails for about 30% of image loads.

(via Emily Stark)

Fast connections are still not common in many countries

Data from Chrome UX Report shows that there are still many countries and territories in the world where most people access the Internet over a 3G or slower connection. (This includes a number of small island nations that are not visible on this map.)

(via Paul Calvano)

More news...

Read even more news in my weekly Sunday issue that can be delivered to you via email every Monday morning.

More News →

The post Weekly Platform News: Impact of Third-Party Code, Passive Mixed Content, Countries with the Slowest Connections appeared first on CSS-Tricks.

14:42
How Psychology Will Shape the Future of Social Media Marketing
14:24

Recipes for Performance Testing Single Page Applications in WebPageTest

WebPageTest is an online tool and an Open Source project to help developers audit the performance of their websites. As a Web Performance Evangelist at Theodo, I use it every single day. I am constantly amazed at what it offers to the web development community at large and the web performance folks particularly — for free.

But things can get difficult pretty quickly when dealing with Single Page Applications — usually written with React, Vue, Svelte or any other front-end framework. How can you get through a log in page? How can you test the performance of your users’ flow, when most of it happens client-side and does not have a specific URL to point to?

Throughout this article, we are going to find out how to solve these problems (and many more), and you’ll be ready to test the performance of your Single Page Application with WebPageTest!

Note: This articles requires an intermediate understanding about some of WebPageTest advanced features.

If you are curious about web performance and want a good introduction to WebPageTest, I would highly recommend the following resources:

The problem with testing Single Page Applications

Single Page Applications (SPAs) radically changed the way websites work. Instead of letting the back end (e.g. Django, Rails and Laravel) do most of the grunt work and delivering "ready-to-use" HTML to the browser, SPAs rely heavily on JavaScript to have the browser compute HTML. Such front-end frameworks include React, Vue, Angular or Svelte.

The simplicity of WebPageTest is what makes part of its appeal to developers: head to http://webpagetest.org/easy, enter your URL, wait a little, and voilà! Your performance audit is ready.

If you are building an SPA and want to measure its performance, you could rely on end-to-end testing tools like Selenium, Cypress or Puppeteer. However, I have found that none of these has the amount of performance-related information and easy-to-use tooling that WebPageTest offers.

But testing SPAs with WebPageTest can be complex.

In many SPAs, most of the site is protected behind a log in form. I often use Netlify for hosting my sites (including my personal blog), and most of the time I spend in the application is on authenticated pages, like the dashboard listing all my websites. As the information on my dashboard is specific to me, any other user trying to access https://app.netlify.com/teams/phacks/sites is not going to see my dashboard, but will instead be redirected to either a login or 404 page.

The same goes for WebPageTest. If I enter my dashboard URL into http://webpagetest.org/easy, the audit will be performed against the login page.

Moreover, testing and monitoring the performance of dynamic interactions in SPAs cannot be achieved with simple WebPageTest audits.

Here’s an example. Nuage is a domain name registrar with fancy animations and a beautiful, dynamic interface. When you search for domain names to buy, an asynchronous call fetches the results of the request and the results are displayed as they are retrieved.

As you might have noticed in the video above, the URL of the page does not change as I type my search terms. As a consequence, it is not possible to test the performance of the search experience using a simple WebPageTest audit as we do not have a proper URL to point to the action of searching something — only to an empty search page.

Some other problems can arise from the SPA paradigm shift when using WebPageTest:

  • Clicking around to navigate a webpage is usually harder than merely heading to a new URL, but it is sometimes the only option in SPAs.
  • Authentication in SPAs is usually implemented using JSON Web Tokens instead of good ol’ cookies, which rules out the option of setting authentication cookies directly in WebPageTest (as described here).
  • Using React and Redux (or other application state management libraries) for your SPA can mean that forms are harder to fill out programmatically, since using .innerText() or .value() to set a field’s value may not forward it to the application store.
  • As API calls are often asynchronous and various loaders can be used to indicate a loading state, those can "trick" WebPageTest into believing the page has actually finished loading when it has, in fact, not. I have seen it happen with longer-than-usual API calls (5+ seconds).

As I have faced these problems on several projects, I have come up with a range of tips and techniques to counter them.

The many ways of selecting an element

Selecting DOM elements is a key part of doing all sorts of automated testing, be it for end-to-end testing with Selenium or Cypress or for performance testing with WebPageTest. Selecting DOM elements allows us to click on links and buttons, fill in forms and more generally interact with the application.

There are several ways of selecting a particular DOM elements using native browser APIs, that range from the straightforward document.getElementsByClassName to the thorny but really powerful XPath selectors. In this section, we will see three different possibilities, ordered by increasing complexity.

Get an element by id, className or tagName

If the element you want to select (say, an "Empty Cart" button) has a specific and unique id (e.g. #empty-cart), class name, or is the only button on the page, you can click on it using the getElementsBy methods:

const emptyCartButton = document.getElementsById("empty-cart")[0];
// or document.getElementsByClassName(".empty-cart-button")[0]
// or document.getElementsByTagName("button")[0]
emptyCartButton.click();

If you have several buttons on the same page, you can filter the resulting list before interacting with the element:

const buttons = document.getElementsByTagName("button");
const emptyCartButton = buttons.filter(button =>
  button.innerText.includes("Empty Cart")
)[0];
emptyCartButton.click();

Use complex CSS selectors

Sometimes, the particular element you want to interact with does not present an interesting unicity property in either its ID, class or tag.

One way to circumvent this issue is to add this unicity manually, for testing purposes only. Adding #perf-test-empty-cart-button to a specific button is innocuous for your website markup and can dramatically simplify your testing setup.

However, this solution can sometimes be out of reach: you may not have access to the source code of the application, or may not be able to deploy new versions quickly. In those situations, it is useful to know about document.querySelector (and its variant document.querySelectorAll) and using complex CSS selectors.

Here are a few examples of what can be achieved with document.querySelector:

// Select the first input with the `name="username"` property
document.querySelector("input[name='username']");
// Select all number inputs
document.querySelectorAll("input[type='number']");

// Select the first h1 inside the <section>
document.querySelector("section h1");

// Select the first direct descendent of a <nav> which is of type <img>
document.querySelector("nav > img");

What’s interesting here is you have the full power of CSS selectors at hand. I encourage you to have a look at the always-useful MDN’s reference table of selectors!

Going nuclear: XPath selectors

XML Path Language (XPath), albeit really powerful, is harder to grasp and maintain than the CSS solutions above. I rarely have to use it, but it is definitively useful to know that it exists.

One such instance is when you want to select a node by its text value, and can’t resort to CSS selectors. Here’s a handy snippet to use in those cases:

// Returns the  that has the exact content 'Sep 16, 2015'
document.evaluate(
  "//span[text()='Sep 16, 2015']",
  document,
  null,
  XPathResult.FIRST_ORDERED_NODE_TYPE,
  null
).singleNodeValue;

I will not go into details on how to use it as it would have me wander away from the goal of this article. To be fair, I don’t even know what many of the parameters above even mean. However, I can definitely recommend the MDN documentation should you want to read on the topic.

Recipes for common use cases

In the following section, we will see how to test the performance in common use cases of Single Page Applications. I call these my testing recipes.

In order to illustrate those recipes, I will use the React Admin demo website as an example. React Admin is an open source project aimed at building admin applications and back offices.

It is a typical example of a SPA because it uses React (as the name suggests), calls remote APIs, has a login interface, many forms and relies on client-side routing. I encourage you to go take a quick look at the website (the demo account is demo/demo ) in order to have an idea of what we will be trying to achieve.

Authentication and forms

The authentication page of React Admin requires the user to input a username and a password:

The authentication screen of React Admin

Intuitively, one could take the following approach to filling in the form and submit:

const [usernameInput, passwordInput] = document.getElementsByTagName("input");
usernameInput.value = "demo"; // innerText could also be used here
passwordInput.value = "demo";
document.getElementsByTagName("button")[0].click();

If you run these commands sequentially in a DevTools console on the login page, you will see that all fields are reset and the login request fails upon submitting by clicking the button. The problem comes from the fact that the new values we set with .value() (or .innerText()) are not kicked back to the Redux store, and thus not "processed" by the application.

What we need to do then is explicitly tell React that the value has changed so that it will update internal bookkeeping accordingly. This can be achieved using the Event interface.

const updateInputValue = (input, newValue) => {
  let lastValue = input.value;
  input.value = newValue;
  let event = new Event("input", { bubbles: true });
  let tracker = input._valueTracker;
  if (tracker) {
    tracker.setValue(lastValue);
  }
  input.dispatchEvent(event);
};

Note: this solution is pretty hacky (even according to its own author), however it works well for our purposes here.

Our updated script becomes:

const updateInputValue = (input, newValue) => {
  let lastValue = input.value;
  input.value = newValue;
  let event = new Event("input", { bubbles: true });
  let tracker = input._valueTracker;
  if (tracker) {
    tracker.setValue(lastValue);
  }
  input.dispatchEvent(event);
};

const [usernameInput, passwordInput] = document.getElementsByTagName("input");

updateInputValue(usernameInput, "demo");
updateInputValue(passwordInput, "demo");

document.getElementsByTagName("button")[0].click();

Hurrah! You can try it in your browser’s console—It works like a charm.

Translating this to an actual WebPageTest script (with scripting keywords, single line commands and tab-separated parameters) would look like this:

setEventName    Go to Login

navigate    https://marmelab.com/react-admin-demo/

setEventName    Login
    
exec    const updateInputValue = (input, newValue) => {  let lastValue = input.value;  input.value = newValue;  let event = new Event("input", { bubbles: true });  let tracker = input._valueTracker;  if (tracker) {  tracker.setValue(lastValue);  }  input.dispatchEvent(event);};

exec    const [usernameInput, passwordInput] = document.getElementsByTagName("input")

exec    updateInputValue(usernameInput, "demo")
exec    updateInputValue(passwordInput, "demo")

execAndWait document.getElementsByTagName("button")[0].click()

Note that clicking on the submit button leads us to a new page and triggers API calls, which means we need to use the execAndWait command.

You can see the full results of the test at this address. (Note: the results may have been archived by WebPageTest — you can, however, run the test again yourself!)

Here is a short video (captured by WebPageTest) in which you can see that we indeed passed the authentication step:

Navigating between pages

For traditional Server Rendered pages, navigating from one URL to the next in WebPageTest scripting is done via the navigate <url> command.

However, for SPAs, this does not reflect the experience of the user, as client-side routing means that the server has no role in navigation. Thus, hitting a URL directly would significantly slow down the measured performance (because of the time it takes for the JavaScript framework to be compiled, parsed and executed), a slowdown that the user does not experience when changing pages. As it is crucial to simulate the user flow the best we can, we need to handle the navigation on the client as well.

Hopefully, this is a lot simpler to do than filling up forms. We only need to select the link (or button) that will take us to the new page, and .click() on it! Let’s follow through our previous example, although now we want to test the performance of the Reviews list, and of a single Review page.

A user would typically click on the Reviews item on the left-hand navigation menu, then on any item in the list. Inspecting the elements in DevTools may lead us to a selection strategy as follows:

document.querySelector("a[href='#reviews']"); // select the Reviews link in the menu
document.querySelector("table tr"); // select the first item in the Reviews list

As both clicks lead to page transition and API calls (to fetch the reviews), we need to use the execAndWait keyword for the script:

setEventName    Go to Login

navigate    https://marmelab.com/react-admin-demo/

setEventName    Login

exec    const updateInputValue = (input, newValue) => {  let lastValue = input.value;  input.value = newValue;  let event = new Event("input", { bubbles: true });  let tracker = input._valueTracker;  if (tracker) {    tracker.setValue(lastValue);  }  input.dispatchEvent(event);};

exec    const [usernameInput, passwordInput] = document.getElementsByTagName("input")

exec    updateInputValue(usernameInput, "demo")
exec    updateInputValue(passwordInput, "demo")

execAndWait document.getElementsByTagName("button")[0].click()

setEventName    Go to Reviews

execAndWait document.querySelector("a[href='#/reviews']").click()

setEventName    Open a single Review

execAndWait document.querySelector("table tbody tr").click()

Here’s the video of the complete script running on WebPageTest:

The audit result from WebPageTest shows the performance metrics and waterfall graphs for each step of the script, allowing us to monitor the performance of each API call and interaction:

What about Internet Explorer 11 compatibility?

WebPageTest allows us to select which location, browser and network conditions the test will use. Internet Explorer 11 (IE11) is among the available browser options, and if you try the previous scripts on IE11, they will fail.

This is due to two reasons:

The ES6 syntax problem can be overcome by translating our scripts to ES5 syntax (no arrow functions, no let and const, no array destructuring), which might look like this:

setEventName    Go to Login

navigate    https://marmelab.com/react-admin-demo/

setEventName    Login

exec    var updateInputValue = function(input, newValue) {  var lastValue = input.value;  input.value = newValue;  var event = new Event("input", { bubbles: true });  var tracker = input._valueTracker;  if (tracker) {    tracker.setValue(lastValue);  }  input.dispatchEvent(event);};

exec    var usernameInput = document.getElementsByTagName("input")[0]
exec    var passwordInput = document.getElementsByTagName("input")[1]

exec    updateInputValue(usernameInput, "demo")
exec    updateInputValue(passwordInput, "demo")

execAndWait document.getElementsByTagName("button")[0].click()

setEventName    Go to Reviews

execAndWait document.querySelector("a[href='#/reviews']").click()

setEventName    Open a single Review

execAndWait document.querySelector("table tbody tr").click()

In order to bypass the absence of CustomEvent support, we can turn to polyfills and add one manually at the top of the script. This polyfill is available on MDN:

(function() {
  if (typeof window.CustomEvent === "function") return false;
  function CustomEvent(event, params) {
    params = params || { bubbles: false, cancelable: false, detail: undefined };
    var evt = document.createEvent("CustomEvent");
    evt.initCustomEvent(
      event,
      params.bubbles,
      params.cancelable,
      params.detail
    );
    return evt;
  }
  CustomEvent.prototype = window.Event.prototype;
  window.CustomEvent = CustomEvent;
})();

We can then replace all mentions of Event by CustomEvent, set the polyfill to fit on a single line and we are good to go!

setEventName    Go to Login

navigate    https://marmelab.com/react-admin-demo/

exec    (function(){if(typeof window.CustomEvent==="function")return false;function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:undefined};var evt=document.createEvent("CustomEvent");evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt}CustomEvent.prototype=window.Event.prototype;window.CustomEvent=CustomEvent})();

setEventName    Login

exec    var updateInputValue = function(input, newValue) {  var lastValue = input.value;  input.value = newValue;  var event = new CustomEvent("input", { bubbles: true });  var tracker = input._valueTracker;  if (tracker) {    tracker.setValue(lastValue);  }  input.dispatchEvent(event);};

exec    var usernameInput = document.getElementsByTagName("input")[0]
exec    var passwordInput = document.getElementsByTagName("input")[1]

exec    updateInputValue(usernameInput, "demo")
exec    updateInputValue(passwordInput, "demo")

execAndWait document.getElementsByTagName("button")[0].click()

setEventName    Go to Reviews

execAndWait document.querySelector("a[href='#/reviews']").click()

setEventName    Open a single Review

execAndWait document.querySelector("table tbody tr").click()

Et voilà!

General tips and tricks for WebPageTest scripting

One last thing I want to do is provide a few tips and tricks that make writing WebPageTest scripts easier. Feel free to DM me on Twitter if you have any suggestions!

Security first!

Remember to tick both privacy checkboxes if your script includes senstitive data, like credentials!

WebPageTest security controls

Browse the docs

The WebPageTest Scripting docs are full of features that I didn’t cover in this article, ranging from DNS Overriding to iPhone Spoofing and even if/else conditionals.

When you plan on writing a new script, I recommend to have a look at the available parameters first and see if any can help make your scripting easier or more robust.

Long loading states

Sometimes, a remote API call (say, for fetching the reviews) will take a long time. A loading indicator, such as a spinner, can be used to tell the user to wait a bit as something is happening.

WebPageTest tries to detect when a page has finished loading by figuring out if things are changing on the screen. If your loading indicator lasts a long time, WebPageTest might mistake it for an integral part of your page design and cut the audit before the API call returns — thus truncating your measures.

A way to circumvent this issue is to tell WebPageTest to wait at least a certain duration before stopping the test. This is a parameter available under the Advanced tab:

WebPageTest minimum test duration

Keeping your script (and results) human-readable

  • Use blank lines and comments (//) generously because single-line JavaScript commands can sometimes be hard to grasp.
  • Keep a multi-line version somewhere as your reference, and single-line everything as you are about to test. This helps readability. Like, a lot.
  • Use setEventName to name your different "steps." This makes for more readable tests as it explicits the sequence of pages the audit goes through, and also appears in the WebPageTest results.

Iterating on your scripts

  • First, make sure that your script works in the browser. To do so, strip the WebPageTest keywords (the first word of every line of your script), then copy and paste each line in the browser console to verify that everything is working as expected at every step of the way.
  • Once you are ready to submit your test to WebPageTest, do it first with very light settings: only one run, a fast browser (cough — not IE11 — cough), no network throttling, no repeat view, a well-dimensioned instance (Dulles, VA, usually has good response times). This will help you detect and correct errors way faster.

Automating your scripts

Your test script is running smoothly, and you start getting performance reports of your Single Page App. As you ship new features, it is important that you monitor its performance regularly to catch regressions at the earliest.

To address this problem, I am currently working on Falco, a soon-to-be-open-sourced WebPageTest test runner. Falco takes care of automating your audits, then presents the results in an easy-to-read interface while letting you read the full reports when you need it. You can follow me on Twitter to know when it goes open source, and learn more about web performance and WebPageTest!

The post Recipes for Performance Testing Single Page Applications in WebPageTest appeared first on CSS-Tricks.

14:24

Images Are Not Static Content

We constantly hear about the importance of keeping websites lean and fast. A fast-loading website makes users more satisfied, and satisfied users spend more time and money on your website. However, website optimization is a complex task, as there is not one silver bullet to fix all of the issues causing poor performance.

We also hear that addressing the performance of images is a low hanging fruit if you want to improve your site’s user experience However, anyone who has gotten their hands dirty trying to optimize images and cover major use cases and scenarios with responsive images knows that the complexity of this task escalates quickly. For most medium to large sites, image optimization is not a task suited to humans. This is why image content delivery networks (CDN) exist.

An image CDN is indeed a content delivery network built especially for images. Just like the name suggests. So, why would we need a special CDN to serve images? Why not use a regular CDN to serve static files? Short answer is that images are not static files...

Most image CDNs treat an image as dynamic content by optimizing the image in different ways based on context where the image is consumed.

Explained a bit differently; if you’re using responsive images on your website, an image cdn will automatically generate the derivatives of the image according to the sizes specified in the markup, usually based on some URL parameters. For example, the below code selects from 3 derivatives specified in the srcset attribute based on 3 breakpoints:

<img src="//i.foo.com/image.jpg" alt="cat"

  srcset="//i.foo.com/image.jpg?width=320 320w, //i.foo.com/image.jpg?width=640 640w, //i.foo.com/image.jpg?width=1280 1280w"

  sizes="(max-width: 480px) 100vw, (max-width: 900px) 33vw, 254px">

This way, the developer or designer doesn’t have to worry about creating all the image versions beforehand. Which is very good news, because the number of derivative images may quickly grow exponentially based on many break points, image formats, and screen resolutions. And that is before we’ve started talking about art direction.

Dynamic Image Optimization on Autopilot

Now that we’ve seen how an image CDN can create different sizes of an image on the fly, let's examine how this improves web performance.

Before we go further to choose an image CDN for the examples later, it is important to point out the difference between an image CDN and a digital asset management tool (DAM). A DAM, such as Cloudinary, is mostly focused for file management aspect and often allows you to edit images and apply art direction like filters. Usually these DAMs need a general purpose CDN in front and there is little support for automation of image optimization tasks.

On the opposite end of the scale is ImageEngine. ImageEngine is the most effective image CDN on the market thanks to its built in device detection that enables superior image optimization for mobile traffic. Since mobile devices account for more than 50% of the traffic in many countries, ImageEngine truly has an advantage over other CDNs. While most other image CDNs only offer little or no automatic optimization, ImageEngine has more advanced approach thanks to its focus on mobile traffic. Hence, ImageEngine will be able to produce the best results with less implementation effort and maintenance.

How ImageEngine Improves Web Performance

With ImageEngine handling all image traffic, images are no longer static content. Images are now adapted and served exactly in the size, format, compression rate and resolution needed. Fine. But how do we measure the improvement?

These days, the “go to tool” for identifying performance issues and measuring performance is Google Lighthouse. Lighthouse is available as a standalone app and in your Chrome developer tools.

We’ll run a performance audit on an e-commerce demo page listing product images.

The page has a typical responsive grid layout with product images. The layout has a few breakpoints where the display size of the images change because number of items per row changes. Moreover, there is a mouse over feature displaying a different image of the product. The mouseover effect is handled by JavaScript and even the hidden image is always loaded in our example. So all in all, quite a few images and potential sizes.

Step One: Assess Current State

Running the Lighthouse audit on the demo-page we see a number of issues, summarized in a performance score of 98. The best score is 100, so 98 might not seem that bad. Which is true, but pay more attention to the metrics below the score. The performance score is calculated based on a few metrics with varied weighting. The images on our page have direct and indirect impact on these metrics.

In the details of the report, we see a few opportunities related to images listed:

  • Properly size images. The images does not have the right pixel size. This is quite common on pages with a responsive or fluid layout.
  • Serve images in next-gen formats. For Chrome this basically mean to convert images to webp. Usually webp is a more efficient format than most others when it comes to byte size and decode speed.
  • Efficiently encode images. There is more compression that can be applied to the images before impacting perceived visual quality.

The estimated savings (to the right in the report) are huge. This demonstrates why addressing images is considered a low hanging fruit for performance.

If you haven't signed up already, create a free ImageEngine trial account. Once you’ve completed signup you can define the image origin (usually your website) and a domain from which you want to serve images from. The image may be something like images.mydomain.com. You point this domain name to ImageEngine with a CNAME record in your DNS, and you’re good to go.

The next step is changing the markup to make the most out of ImageEngine’s automatic features.

If our previous image tag looked like this:

<img class="pic-1" src="images/demo9/img-1.jpg">

Our new image tag will look like this when the ImageEngine domain name is serving the images:

<img class="pic-1" src="https://images.mydomain.com/images/demo9/img-1.jpg">

Because our grid layout is fluid with 4 breakpoints, we might also consider to use responsive images syntax:

<img
  class="pic-1" 
  src="https://images.mydomain.com/images/demo9/img-1.jpg" 
  sizes="(max-width: 576px) 93vw, 
         (max-width: 768px) 238px, (max-width: 768px) 238px, 
         (max-width: 992px) 148px, 253px"
>

Thanks to ImageEngine's support for Client hints, ImageEngine will now generate the exact pixel size needed. Client hints are additional HTTP headers the browser can send to enable more accurate image resizing. Client hints are currently only supported by Chrome browsers

Step Three: Measure the Improvement

Running the Lighthouse audit again, we see that the score is now 100. But more importantly, look at the improvements in timings. “Time to interactive” for example. 0.7 seconds less waiting for the user in order to interact with the page. All because images are optimized properly.

What does really “optimized” mean in this case? Why is the page faster and user experience better with ImageEngine? Most of the positive impact is due to reduction in byte size of the images. The less bytes, the faster are the images transferred from the host (or ImageEngine’s edge servers) to the browser. Moreover, lighter images are usually faster to decode and render onto the users screen. This is very simplified, but let’s see how much ImageEngine reduces the image payload using WebPageTest.org to compare our demo site with-, and without ImageEngine:

ImageEngine reduces the image payload to only 25% of the original size.

Bonus: Fix Caching

In the continuous hunt for improved performance, you may have seen this alert from Lighthouse.

Lighthouse thinks the images have a too short Time To Live (TTL) -measured in seconds- in the browser cache. By default, ImageEngine passes on the cache directives given by the origin but luckily this can be changed in ImageEngine's management interface.

Next Step: Automate Image Optimization

We’ve seen how images should no longer can be treated as static content if we want a high performing web site. Because images have such a high impact on website performance, images must be tailored according to the capabilities and context of the browser and user.

A purpose-built image CDN will relieve humans of the responsibility of trying to accommodate all possible combinations of image formats, sizes and compression levels. Managing image derivatives, is not a task for humans as it will quickly grow to become unmanageable.

Using tools like Lighthouse and WebPageTest.org document the positive impact image CDNs like ImageEngine has on important performance metrics.

The post Images Are Not Static Content appeared first on CSS-Tricks.

13:00

25+ Best InDesign Brochure Templates

Creating the perfect brochure design can be a challenging task, even for a professional designer. Especially when you’re using it to showcase an entire business or product with just a few pages. These InDesign brochure templates can help save the day.

With our handpicked collection of the best InDesign brochure templates, you’ll be able to find inspiration to design all kinds of brochures from leaflets, tri-fold designs, corporate company profiles, business documentation, and much more.

We’ve included template designs of all kinds to suit different types of businesses and brands so that you can find a brochure design for all your needs. We’re also featuring tips for creating a brochure in InDesign to help get you started!

Top Pick

Exeelo – Multipurpose Brochure Template

Exeelo - Multipurpose Brochure Template

Exeelo is a multipurpose brochure template featuring a multipurpose design, allowing you to design all kinds of multi-page brochures for businesses and corporate brands.

The template itself comes with 24 professionally designed pages with fully formatted content layout. All of the items in the template are in separate layers as well.

Why This Is A Top Pick

The minimalist multipurpose design is what makes this template stand out from the rest. It also allows you to customize the design quite easily as it comes with organized layers.

Square Company Profile Brochure Template

This creative and minimalist InDesign brochure template comes with an elegant square-shaped 8 x 8 inch design. The template includes 32 pages which can be easily customized to your preference using InDesign CS4 or higher.

Modern Business Brochure Template

This is a modern brochure template featuring 28 unique page designs. It includes creative page designs featuring unique shapes, editable paragraph styles, image placeholders, and much more. The template is available in both A4 and US Letter sizes.

Company Profile – Modern Brochure Template

This is a professional brochure template that can be used to design company profiles for modern businesses. It includes 22 unique page layouts with easily editable designs. As an added bonus, it also comes with matching flyers and business card templates as well.

Staffing Agency Bi-Fold Brochure

This professional brochure template features a bi-fold design and it’s ideal for making brochures for agencies. It also comes with multiple formats including InDesign, Photoshop, and Illustrator file formats and more.

Medical Clinic Bi-Fold Brochure

Another modern bi-fold brochure template most suitable for making medical and health-related brochures. The template comes with a double-sided design and in multiple file formats featuring Word, InDesign, Pages, and many others.

Minimal Project Proposal Free Brochure Template

A professional brochure template you can use for free to make project proposals for agencies and small businesses. The template comes with 10 unique page designs with easily editable layouts.

Free Green Project Proposal Brochure Template

This free brochure template is most suitable for making non-profit and nature-themed brochure designs. It comes with 10 page layouts with vector graphics and changeable colors.

X Pro – InDesign Brochure Template

A stylish InDesign brochure template that’s most suitable for crafting a business brochure for a startup or design agency. This template features 20 unique pages with images, text, and backgrounds on separate layers to make it easier to edit and customize the design.

Pochinky – 16-Page Brochure Template

Pochinky is a beautiful brochure template featuring a minimal design. This template comes with 16 pages featuring a highly visual layout with lots of space for showcasing images. It’s perfect for a design agency, a fashion brand, or interior design.

Business Brochure InDesign Template

Another modern brochure template with a professional design. This template is ideal for businesses and corporate companies. It comes with 24 stylish page designs featuring image placeholders and editable paragraph styles. It’s also available in A4 and US Letter sizes.

Clean & Modern Multipurpose Brochure Template

If you’re looking for a minimalist brochure template to showcase your company in a professional way, this template will come in handy. It’s available in both light and dark color themes in A4 size, allowing you to customize the design and layout however you like.

Tri-fold InDesign Brochure Template

This is a simple tri-fold brochure template you can use to craft a simple leaflet to showcase and promote your business. The template is available in A4 size and featuring image placeholders. It’s also compatible with InDesign CS4 and higher.

Free Bi-Fold Brochure Template

A free brochure template with a multipurpose design. It comes with organized layers to let you easily edit the template design to change colors, text, and formatting however you like.

Free Financial Planning Brochure Template

This free brochure template comes with a minimalist design featuring a set of elegant page designs. It’s ideal for crafting project proposals and financial plan brochures.

Styling Fashioned – Brochure Template

A brochure template that’s most suitable for fashion, beauty, and creative brands. This template features a clean design that gives more focus to its images. You can easily place the images in the design using its image placeholders as well. It comes with 16 unique page designs.

Modern Corporate Business Brochure Template

A professionally designed brochure template made for corporate companies and businesses. This template can be easily customized to showcase your business, create company profiles, and more. It includes 16 page designs and comes in A4 size.

Modern Architecture Brochure Template

Working on a brochure for a architecture agency? Then use this template to craft a modern and professional brochure to showcase your business. The template comes with 12 unique page designs in A5 size with lots of space for including images.

The Creative InDesign Brochure Template

This is an InDesign brochure template designed specifically for creatives and creative agencies. The template is perfect for making a portfolio to showcase your work and services. It comes with 16 page designs in A4 size.

James Austin Square Brochure Template

James Austin is another brochure template made for creatives. This template comes with a stylish square-shaped design and includes 24 different page designs. You can also easily customize it to change colors and paragraph styles.

Free Business Project Proposal Brochure Template

A free brochure template that’s most suitable for making business and corporate brochure designs. The template comes with 10 unique page designs you can customize to fit your brand.

Free Red Accent Bi-Fold Brochure Template

This free brochure template features a bi-fold design and it’s ideal for making professional and business brochures. The template is easily customizable and includes resizable vector elements.

Product 4 Page Brochure Template

This is a 4-page InDesign brochure template you can use to create a stylish product catalog to showcase your products in a professional way. The template is avaialble in 4 InDesign files and in both US Letter and A4 size.

Creative Agency Portfolio Brochure Template

This beautifully minimalist brochure template is the perfect choice for crafting a brochure or document for an agency or a startup. The template comes with a clean and simple design featuring 24 different editable pages.

Classic Corporate Brochure Template

A brochure template made for corporate companies, agencies, and businesses. This template comes with a classic design with lots of space for showcasing your business. It includes 26 unique page designs in A4 and US Letter sizes.

Photography InDesign Brochure Template

A highly visual InDesign brochure template you can use to craft a professional portfolio brochure for photographers and studios. The template features 24 pages with editable designs and with image placeholders.

Exeelo Trifold Brochure Template

This is an elegant and simple brochure template you can use to craft a leaflet to promote your business during events and special occasions. The template features a tri-fold design and comes in US Letter and A4 sizes.

16 Page Business Brochure Template

Another modern brochure template featuring a creative design. This brochure template is most suitable for showcasing modern businesses, startups, and small businesses. It includes a 16 page design and works with InDesign CS4 and higher.

Kingsley Square Portfolio Brochure Template

This minimalist and creative brochure template is designed for showcasing your portfolios. It’s ideal for creative agencies and professionals. The template features 24 easily customizable page designs.

Personal Loan Brochure Template

A modern brochure template designed for showcasing products and services. Even though the title says personal loan, you can easily customize the template to describe other products as well. It includes 8 pages.

Stylish Corporate InDesign Brochure Template

This creative and stylish brochure template comes with 16 page designs. It’s ideal for making a brochure for showcasing corporate companies and agencies.

Square Trifold Brochure Template

This is an elegant trifold brochure template featuring a beautiful visual design which allows you to showcase lots of images throughout the leaflet. The template comes with an 8 x 8 inch design.

Millenial – InDesign Brochure Template

A minimalist brochure template most suitable for creative agencies and startups. This template comes with 16 different page designs featuring easily customizable layouts and image placeholders.

Company Profile Creative Brochure Template

Another stylish brochure template you can use to design a professional company profile. This template is available in A4 and US Letter sizes and includes 36 different page designs.

Elegant Company Brochure Template

This elegant brochure template features 20 unique page designs in 2 sizes. The template can be easily customized to create a company brochure for corporate agencies and small businesses.

Global Company Profile Brochure Template

A clean and minimalist company profile brochure template. It comes in A4 and US Letter sizes featuring 24 editable page designs with paragraph styles, image placeholders, and auto page numbering options.

5 Tips for Creating a Brochure in InDesign

If you’re new to brochure design, make sure to follow these basic tips.

1. Plan the Content Layout

When you start designing a brochure, your first step should be to plan the content layout. Get a pen and paper or use an online wireframing tool to create a basic sketch of how you want your brochure to look like.

Plan the cover layout, where you place titles, text, and create image placeholders. This initial planning process will allow you to craft a design that’s more thoughtful and effective.

2. Use Great Fonts

Fonts play a key role in brochure design. All eyes are going to be on the textual content of the brochure. So they need to look perfect. Consider using a pair of custom fonts for the titles and paragraph text. Overall, aim to improve readability with easy to read sans-serif fonts.

3. Create a Flowing Design

There are many different types of brochures like bi-fold, tri-fold, and multi-page brochures. No matter what type of design you use, add a flow to each page to create an improved user experience through the brochure. This will allow users to read and understand the content better.

4. Consider the Paper Quality

How your brochure is printed and where it’s presented is also an important factor that you need to consider in the design process. For example, there are many different types of paper materials used to print brochures ranging from glossy paper to textured papers and more. Depending on the type of paper used, using the wrong colors and fonts can completely ruin the design of your brochure.

5. Use a Template

To avoid most of the common brochure design problems and save a lot of your time you simply use a pre-made brochure template. These templates designed by professionals come with optimized designs made to perfection. You can easily download and customize the template to your preference to save hours of your precious time.

For more inspiration, check out our best tri-fold brochure templates collection.

12:30

A Guide To New And Experimental CSS DevTools In Firefox

A Guide To New And Experimental CSS DevTools In Firefox

A Guide To New And Experimental CSS DevTools In Firefox

Victoria Wang
2019-10-10T14:30:59+02:002019-10-10T15:07:24+00:00

Over the last few years, our team at Firefox has been working on new CSS tools that address both cutting-edge techniques and age-old frustrations. We’re the Layout Tools team, a subset of Firefox Developer Tools, and our quest is to improve the modern web design workflow.

The web has seen an incredible evolution in the last decade: new HTML/CSS features, browser improvements, and design techniques. Our team is devoted to building tools that match that innovation so that designers and developers can harness more of the efficiency and creativity that’s now possible.

In this guide, we’ll share an overview of our seven new tools, with stories from the design process and practical steps for trying out each tool.

Editorial Design Patterns

By naming lines when setting up our CSS Grid layouts, we can tap into some interesting and useful features of Grid — features that become even more powerful when we introduce subgrids. Read related article →

1. Grid Inspector

It all started three years ago when our CSS layout expert and dev advocate, Jen Simmons, worked with members of Firefox DevTools to build a tool that would aid users in examining CSS Grid layouts.

As one of the most powerful new features of the modern web, CSS Grid had quickly gained decent browser adoption, but it still had low website adoption. There’s a steep learning curve, and you still need fallbacks for certain browsers. Thus, part of our goal was to help popularize Grid by giving developers a more hands-on way to learn it.

An example of the Grid Inspector displaying an outline of the grid layout Grid Inspector (Large preview)

The core of the tool is a grid outline, overlaid on the page, which helps devs visualize how the grid is positioning their elements, and how the layout changes when they tweak their styles. We added numbered labels to identify each grid line, the ability to view up to three grids at once, and color customization for the overlays. Recently, we also added support for subgrid, a brand new CSS specification implemented in Firefox and hopefully in more browsers soon.

Grid Inspector was an inspiration for all the tools that followed. It was even an inspiration for a new team: Layout Tools! Formed in late 2017, we’re spread across four time zones and collaborate with many others in Mozilla, like our rendering engine developers and the good folks at MDN.

Try Out The Grid Inspector

  1. In Firefox, visit our Grid example site.
  2. Open the Inspector with Cmd + Shift + C.
  3. Turn on Grid overlay via one of three ways:
  • Layout Panel:
    In the Grid section, check the checkbox next to .content.grid-content;
  • Markup View:
    Toggle the “grid” badge next to <div class="content grid-content">;
  • Rules View:
    Click the button next to display:grid; inside #page-intro .grid-content;
  • Experiment with the Grid Inspector:
    • Change the purple overlay color to red;
    • Toggle “Line numbers” or “Extend lines infinitely”;
    • Turn on more grid overlays;
    • See what happens when you disable grid-gap: 15px in Rules.

    Since Grid, we’ve been seeking to expand on the possibilities of what a browser CSS tool can be.

    2. Shape Path Editor

    The next project we worked on was the Shape Path Editor: our first visual editing tool.

    CSS Shapes allows you to define shapes for text to flow around: a circle, a triangle, or a many-sided polygon. It can be used with the clip-path property which allows you to trim elements to any of those same shapes. These two techniques together open the possibility for some very unique graphic design-inspired layouts.

    However, creating these sometimes complex shapes can be difficult. Typing all of the coordinates manually and using the right CSS units is error-prone and far removed from the creative mindset that Shapes allows. Therefore, we made a tool that allows you to edit your code by directly clicking and dragging shapes on the page.

    This type of feature—visual editing—was new for us and browser tools in general. It’s an example of how we can go beyond inspecting and debugging and into the realm of design.

    Try Out The Shape Path Editor

    1. In Firefox, visit this page on the An Event Apart website.
    2. Open the Inspector with Cmd + Shift + C and select the first circular image.
    3. In Rules, click on the icon next to the shape-outside property.
    4. On the page, click on the points of the shape and see what happens when you drag to make the shape huge or tiny. Change it to a size that looks good to you.

    Visual editing is an example of how we can go beyond inspecting and debugging and into the realm of design.

    3. Fonts Editor

    For years, we’ve had a Fonts panel in Firefox that shows an informative list of all the fonts used in a website. In continuing our theme of designing in the browser, we decided to turn this into a Font Editor for fine-tuning a font’s properties.

    An example of the Fonts Editor index of fonts and variable fonts editing Fonts Editor (Large preview)

    A driving force behind this project was our goal to support Variable Fonts at the same time that the Firefox rendering engine team was adding support for it. Variable Fonts gives font designers a way to offer fine-grained variations along axes, like weight, within one font file. It also supports custom axes, which give both font creators and web designers an amazing amount of flexibility. Our tool automatically detects these custom axes and gives you a way to adjust and visualize them. This would otherwise require specialized websites like Axis-Praxis.

    Additionally, we added a feature that provides the ability to hover over a font name to highlight where that particular font is being used on the page. This is helpful because the way browsers select the font used to render a piece of text can be complex and depend on one’s computer. Some characters may be unexpectedly swapped out for a different font due to font subsetting.

    Try Out The Fonts Editor

    1. In Firefox, visit this variable fonts demo site.
    2. Open the Inspector with Cmd + Shift + C and select the word “variable” in the title (the element’s selector is .title__variable-web__variable).
    3. In the third pane of the Inspector, navigate to the Fonts panel:
    • Hover over the font name Output Sans Regular to see what gets highlighted;
    • Try out the weight and slant sliders;
    • Take a look at the preset font variations in the Instances dropdown menu.

    4. Flexbox Inspector

    Our Grid, Shapes, and Variable Fonts tools can together power some very advanced graphic design on the web, but they’re still somewhat cutting-edge based on browser support. (They’re almost there, but still require fallbacks.) We didn’t want to work only on new features—we were drawn to the problems that most web developers face on a daily basis.

    So we started work on the Flexbox Inspector. Design-wise, this has been our most ambitious project, and it sprouted some new user research strategies for our team.

    Like Grid, CSS Flexbox has a fairly steep learning curve when you first get started. It takes time to really understand it, and many of us resort to trial and error to achieve the layouts we want. At the beginning of the project, our team wasn’t even sure if we understood Flexbox ourselves, and we didn’t know what the main challenges were. So we leveled up our understanding, and we ran a survey to discover what people needed the most when it came to Flexbox.

    The results had a big effect on our plans, making the case for complicated visualizations like grow/shrink and min/max. We continued working with the community throughout the project by incorporating feedback into evolving visual prototypes and Nightly builds.

    The tool includes two major parts: a highlighter that works much like the Grid Inspector’s, and a detailed Flexbox tool inside the Inspector. The core of the tool is a flex item diagram with sizing info.

    An example of the flex item diagram and sizing table Flex item diagram and sizing (Large preview)

    With help from Gecko layout engineers, we were able to show the step-by-step size decisions of the rendering engine to give users a full picture of why and how a flex item ended up with a certain size.

    Note: Learn the full story of our design process in “Designing the Flexbox Inspector”.

    Try Out The Flexbox Inspector

    1. In Firefox, visit Mozilla’s Bugzilla.
    2. Open the Inspector with Cmd + Shift + C and select the element div.inner (just inside the header bar).
    3. Turn on the Flexbox overlay via one of three ways:
    • Layout Panel:
      In the Flex Container section, turn on the switch;
    • Markup View:
      Toggle the “flex” badge next to <div class="inner">;
    • Rules View:
      Click the button next to display:flex.
  • Use the Flex Container panel to navigate to a Flex Item called nav#header-nav.
    • Note the sizes shown in the diagram and size chart;
    • Increase and decrease your browser’s width and see how the diagram changes.

    Interlude: Doubling Down on Research

    As a small team with no formal user research support, we’ve often resorted to design-by-dogfooding: basing our opinions on our own experiences in using the tools. But after our success with the Flexbox survey, we knew we wanted to be better at collecting data to guide us. We ran a new survey to help inform our next steps.

    We crowdsourced a list of the 20 biggest challenges faced by web devs and asked our community to rank them using a max-diff format.

    When we found that the big winner of the challenges was CSS Layout Debugging, we ran a follow-up survey on specific CSS bugs to discover the biggest pain points. We supplemented these surveys with user interviews and user testing.

    We also asked folks to rank their frustrations with browser developer tools. The clear top issue was moving CSS changes back to the editor. This became our next project.

    5. Changes Panel

    The difficulty in transferring one’s work from a browser developer tool to the editor is one of those age-old issues that we all just got used to. We were excited to make a simple and immediately usable solution.

    An example of the diff view provided by the Changes Panel Changes Panel (Large preview)

    Edge and Chrome DevTools came out with variants of this tool first. Ours is focused on assisting a wide range of CSS workflows: Launch DevTools, change any styles you want, and then export your changes by either copying the full set of changes (for collaboration) or just one changed rule (for pasting into code).

    This improves the robustness of the entire workflow, including our other layout tools. And this is just a start: We know accidental refreshing and navigation from the page is a big source of data loss, so a way to bring persistence to the tool will be an important next step.

    Try Out The Changes Panel

    1. In Firefox, navigate to any website.
    2. Open the Inspector with Cmd + Shift + C and select an element.
    3. Make some changes to the CSS:
    • Modify styles in the Rules pane;
    • Adjust fonts in the Fonts pane.
  • In the right pane of the Inspector, navigate to the Changes tab and do the following:
    • Click Copy All Changes, then paste it in a text editor to view the output;
    • Hover over the selector name and click Copy Rule, then paste it to view the output.

    6. Inactive CSS

    Our Inactive CSS feature solves one of the top issues from our layout debugging survey on specific CSS bugs:

    “Why is this CSS property not doing anything?”

    Design-wise, this feature is very simple—it grays out CSS that doesn’t affect the page, and shows a tooltip to explain why the property doesn’t have an effect. But we know this can boost efficiency and cut down on frustration. We were bolstered by research from Sarah Lim and her colleagues who built a similar tool. In their studies, they found that novice developers were 50% faster at building with CSS when they used a tool that allowed them to ignore irrelevant code.

    An example of an inactive CSS tooltip warning Inactive CSS tooltip (Large preview)

    In a way, this is our favorite kind of feature: A low-hanging UX fruit that barely registers as a feature, but improves the whole workflow without really needing to be discovered or learned.

    Inactive CSS launches in Firefox 70 but can be used now in prerelease versions of Firefox, including Developer Edition, Beta, and Nightly.

    Try Out Inactive CSS

    1. Download Firefox Developer Edition;
    2. Open Firefox and navigate to wikipedia.org;
    3. Open the Inspector with Cmd + Shift + C and select the center content area, called central-featured;
    4. Note the grayed out vertical-align declaration;
    5. Hover over the info icon, and click “Learn more” if you’re interested.

    7. Accessibility Panel

    Along the way we’ve had accessibility features developed by a separate team that’s mostly one person — Yura Zenevich, this year with his intern Maliha Islam.

    Together they’ve turned the new Accessibility panel in Firefox into a powerful inspection and auditing tool. Besides displaying the accessibility tree and properties, you can now run different types of checks on a page. So far the checks include color contrast, text labels, and keyboard focus styling.

    An example of the Accessibility Panel’s auditing feature Auditing in the Accessibility Panel (Large preview)

    Now in Nightly, you can try the new color blindness simulator which harnesses our upcoming WebRender tech.

    Try Out The Accessibility Panel

    1. Download Firefox Developer Edition;
    2. Navigate to meetup.com;
    3. In the developer tools, navigate to the Accessibility tab, and click the “Turn on Accessibility Features” button;
    4. Click the drop-down menu next to “Check for issues” and select “All Issues”;
    5. Take a look at the various contrast, keyboard, and text label issues, and click the “Learn more” links if you’re interested.

    Next Up

    We’re currently hard at work on a browser compatibility tool that uses information from MDN to show browser-specific issues for a selected element. You can follow along on GitHub to learn more.

    The Future

    We’re committed to supporting the modern web, and that means continuously changing and growing.

    New specifications get implemented by browser vendors all the time. Guidelines and best practices around progressive enhancement, responsiveness, and accessibility evolve constantly. Us tool makers need to keep evolving too.

    And what of the long-lived, ever-present problems in creating the web? What everyday user interfaces need to be rethought? These are some of the questions that keep us going!

    What about a better way to navigate the DOM tree of a page? That part of DevTools has gone essentially unchanged since the Firebug days.

    We’ve been experimenting with features like back and forward buttons that would ease navigation between recently visited elements.

    A more dramatic change we’re discussing is adding a compact DOM view that uses a syntax similar to HTML templating engines. The focus would be on the most common use case—navigating to CSS—rather than viewing/editing the source.

    A mockup of the simplified HTML Outline View HTML Outline View (Large preview)

    We’ve also been thinking about a better element selector. We know how it can be more productive to work inside the page, with less jumping back and forth into DevTools. We could make the element selector more powerful and more persistent. Perhaps it could select whitespace on a page and tell you what causes that space, or it could shed light on the relationships between different elements.

    A mockup of element overlay with collapsed margin Visual Element Selector (Large preview)

    These are just two of the many ideas we hope to explore further with the help of the community.

    We Need Your Input!

    We want to keep making awesome tools that make your life easier as a developer or designer.

    Here’s an easy way to help: Download Firefox Developer Edition and try using it for some of your work next week.

    Then, tell us what you think by taking our 1-page survey.

    We’re always interested in hearing ideas for improvements, particularly any low-hanging fruit that could save us all from some regular frustration. We do our work in the open, so you can follow along and chime in. We’ll keep you updated at @FirefoxDevTools.

    Thanks to Patrick Brosset for his contributions to this article.

    Smashing Editorial(dm, il)
    09:00

    22+ Best Educational PPT (PowerPoint) Templates for Teachers

    PowerPoint presentations are an important part of education. Any lecture can be made more entertaining and easily understandable by using an effective educational PowerPoint slideshow.

    Having a set of brilliantly designed slides also helps deliver your key points more effectively. This is where we want to help. In this post, we’re sharing a collection of the best educational PowerPoint templates teachers can use to create attractive presentations for educational purposes.

    Whether you’re making a slideshow for a group of children or preparing a lecture for a college course, you’ll find many different templates to choose from on our list. Let’s have a look.

    Edumode – Education PowerPoint Template

    Edumode is a professional PowerPoint template featuring a set of slides made for creating educational presentations for schools, colleges, and academies. The template comes with more than 40 unique slide designs along with editable vector graphics, maps, icon packs, and more.

    Academia Education PowerPoint Template

    Academia is a PowerPoint template designed for universities and colleges, especially for promoting special programs and showcasing the establishment. The template features 30 unique slide designs that come filled with animations, editable vectors, master slide layouts, and more.

    Tutho – Education & Courses PowerPoint Template

    Another modern educational PowerPoint template featuring a beautiful color scheme and attractive slides. The template includes 30 unique slide layouts you can easily edit to change colors, shapes, and text. It also has specific slide designs for creating portfolios, team management, and showcasing products as well.

    Ceremony – Education PowerPointPresentation

    Ceremony is a multipurpose PowerPoint template designed for making all kinds of education-related presentations. It’s most suitable for colleges, schools, and universities for showcasing their especial programs. The template comes with 90 unique slide layouts in 10 different color schemes.

    Education – Modern PowerPoint Template

    This is another multipurpose PowerPoint presentation template that comes with a total of 150 slide designs featuring slides in 5 different color schemes. It also includes creative illustrations, editable graphics, image placeholders, and much more.

    E-Learning Presentation – Free Powerpoint Template

    This is a free PowerPoint template designed for making presentations related to online learning and programs. The template includes 17 unique slide designs with editable designs and 1000 icons.

    Back to School – Free Powerpoint Template

    This beautiful free PowerPoint template comes with lots of colorful illustrations and graphics that attract children and younger audiences. The template includes 23 unique slide designs you can easily edit to make personalized presentations.

    Education – Minimal PowerPoint Template

    A professional PowerPoint template featuring slide designs for educational presentations. The template comes with 50 unique slide layouts and master slide layouts. It also includes image placeholders for easier editing as well.

    Escola – Education PowerPoint Presentation

    Escola is a minimalist PowerPoint template featuring multiple slide designs you can use to create professional education-related presentations. The template comes with 50 unique slide layouts that can be easily customized to change colors and text.

    Rapid – Education & School PowerPoint Template

    Rapid is another educational PowerPoint template that comes with modern slide designs featuring lots of space for showcasing images and infographics. The template includes 36 unique slide layouts with master slides and image placeholders.

    Education – Simple PowerPoint template

    This is a professional PowerPoint template that includes 30 unique slide designs. Each slide is also available in 5 different color schemes. It also features editable vector graphics, image placeholders, and icons for crafting entertaining presentations more easily.

    University and Education PowerPoint Template

    This PowerPoint template is designed specifically for making presentations for universities and higher education purposes. It also includes attractive designs, vector graphics, device mockups, image placeholders, and much more. The template includes 90 unique slides in over 100 color schemes.

    Math Lesson – Free Powerpoint Template

    This free PowerPoint template will help you make maths look fun for all ages. The template is designed for teaching math but you can customize it to make other presentations as well. It includes 17 unique slides.

    Galaxy Gradient – Free Powerpoint Template

    A colorful free PowerPoint template featuring minimal slide designs. This template is perfect for making simple educational presentations. It includes 30 unique slide designs.

    Need Education – Modern PowerPoint Template

    This PowerPoint template is designed for professional educational establishments such as colleges and academies. The template includes multiple slides with modern designs as well as master slide layouts for making your own unique slides.

    Schoolar – Education PowerPoint Presentation

    Schoolar features a set of very attractive and visual slide designs. The template is perfect for making school and other educational presentations. It includes 50 unique slide layouts with easily editable designs.

    Educi – Children Education PowerPoint Template

    Educi is a creative PowerPoint template that’s ideal for making slideshows for children’s education presentations. It includes 30 unique slide designs featuring vector icons, image placeholders, editable shapes, and much more.

    Solar System Education Presentation

    There’s no better way to teach kids about the solar system than using an attractive PowerPoint slideshow. This PowerPointe template will allow you to create an entertaining presentation to teach kids about the solar system. It includes 34 unique and creative slide designs.

    Kids Education – Colorful PowerPoint Presentation

    A colorful and fun PowerPoint template that comes with a set of beautiful slides. This template is ideal for making all kinds of kids and children’s presentations. It includes fully animated slides with editable graphics and a massive icon pack.

    EDUCATION – PowerPoint Infographics Slides

    This creative PowerPoint template also includes a set of colorful slides featuring charts and infographics. All of the slides in this template come with transition animations and editable graphics as well. It includes 33 unique slide designs.

    Education – Free PowerPoint Presentation Template

    This template features a modern slide layout you can customize to create presentations for colleges and schools. It includes 10 unique slides with editable designs and image placeholders.

    GMTRY – Free Geometric Presentation Template

    This is a creative free PowerPoint template that comes with a set of slides featuring geometric-based designs. You can easily customize this template to create an effective presentation for educational purposes.

    Phantom Education PowerPoint Presentation

    Featuring more than 50 unique slide designs with colorful and attractive content layouts, this modern PowerPoint presentation template lets you create more attractive presentations to attract young audiences. It also includes master slide layouts and vector icons.

    Nilo – LMS Education PowerPoint Template

    Nilo is a minimalist PowerPoint template designed for making presentations related to online courses and learning management systems. The template comes with 25 unique slide designs you can easily customize to your preference.

    For more inspiration, have a look in our best animated PowerPoint templates collection.

    October 09 2019

    23:31

    How to Create a Form With the Quform WordPress Plugin

    Forms are essential for any website as they provide an efficient way for your customers to communicate with you. Whether you are looking to receive feedback, complete an order, or receive an application from your website visitors, forms allow you to effectively collect all of this information.

    Many of the WordPress forms on the market today are quite complex and can be difficult for the user to integrate into their site. Not only are they too complex, but they often require expensive upgrades to unlock all the necessary features. Luckily there is a WordPress form builder that tackles all of these issues. 

    The simple and easy to use form builder, Quform, is an incredibly powerful form creation tool for your WordPress website that features nineteen form elements and an unlimited number of forms for each website. 

    Quform can quickly create whatever forms your mind can conceive and style these forms with easy to adapt themes. In this article, I am going to show you just how easy it is to create a feature-rich form with Quform. 

    What We Will Be Building

    The form that we will be building in this tutorial will be for a blog website. The purpose of the form will be to collect blog submissions from website visitors so we can go through all of the submissions in an organized manner. The form will contain a variety of fields for the user to fill out to give including name, age, email address, an explanation of why their blog post should be on our website, and an area to upload their blog post. 

    Quform Form

    Decide What Type of Form to Create

    Before you can begin to create a form for your website, you will need to know the specific form you are creating and what needs to be included in the form. The form you are looking to create will depend on your specific needs. 

    First, analyze what type of information you want to gather from your audience and then write down each specific piece of information that you are looking to collect. This will be your road map for the form. 

    In this example, I am going to create a form that collects articles to be posted on my blog from my audience. In this article collecting form, I would like to obtain important details about the person who sent in the article, to have them explain why they think the article would be a good fit for my blog, and to have a section where the person can upload the actual article.

    Creating a Form and Adding Elements 

    To create a form, head on over to the Quform dashboard by clicking dashboard under Q Forms in the left-hand sidebar of your WordPress Dashboard. Then under the section Forms, click Add New. Give your new form a name and click Add Form. You will be then directed to the Quform editor where you can create the actual form. 

    As mentioned, we would like to collect three pieces of information from the user who submitted the article. The first piece of information is who they are and how we can contact them. We would like to include fields to collect their name, email address, and age. 

    To add in a field for the user to insert their name, we are going to click the person icon. This will add in a field for the user to input their first and last name. On the left-hand side of the editor, you will see that a new block titled "Name" has been added. On the right-hand side of the editor, you can view what the actual form looks like. To add in the email address field, click on the mail icon and the email address field will be added to your form below the first and last name fields. 

    Adding Email Field

    Next, we are going to add in a text field for the user to input their age. Click on the text icon at the top of the editor and a text field labeled "Untitled" will appear. To change this title, click Untitled in the block editor and type in "age." 

    The next piece of information that we would like to collect is an explanation of why the person thinks the article would be a good fit for the blog. I would like to have this section on a separate page from the name, email address, and age fields. To do this, we can click the + sign at the top of the editor and a new page on the form will be created. 

    To collect an explanation from the user, we will add a text area by clicking the left align icon at the top of the editor. Then click on Untitled in the text area in the block editor and type, "Please explain why you think your article would be a good fit for this blog." This will place the instructions for what the user should type in the text area on the form. 

    Finally, we need a section where the user can upload their article. Again, I would like this section to be on a separate page, so click the + sign again at the top of the editor. To add an upload option, click the download icon at the top of the editor and type in the text, "Upload Your Article Here" in the upload block editor. 

    You will have also noticed that a submit block was added to the block editor when you created your new pages as well as to the form preview. This allows the user to submit the form and go back to the previous pages of the form. This is exactly how we want the form to function, so we are not going to make any changes. 

    By following the above steps, you will have successfully created your first form on Quform. To watch the form creation process in action, please view the video below:

     

    Adding Quform To Your Website

    Quform makes use of WordPress's shortcodes to add forms to your site. Before you can add your form to any page or post on your website, you will need to copy the shortcode to your clipboard. The Quform shortcode is located at the very top center of the Quform editor. 

    Once you have finished editing your form, copy the shortcode and head on over to your post or page. In the text area of your new post or page, enter in this shortcode, click Save Draft, and then click Preview. You can now see your form has been added to your website and are ready to publish this page and start collecting articles for your blog! View the video below to see how the form can be added to your pages and posts.

     

    Getting the Most Out of Quform

    The amount of features you have to display on your form makes the Quform incredibly versatile. This article only goes over how to construct a submission form for your blog, but there are many other types of forms that you can create. Here are a few popular form types that you can create:

    Contact Form

    Every website should have a contact form, so any website visitor can get in contact with you. Quform allows you to create this contact form by simply building a form that contains text inputs and a submit button. 

    Survey

    Surveys are a very helpful way to gauge how certain aspects of your business or overall business are doing. You can create a survey with as many text fields or multiple-choice questions that you require and add this survey to one of your web pages. From there, you can send out an email to your email list and post a link to the survey on social media to get your audience to take the survey. It is recommended to offer some sort of free download or incentive for completing the survey to encourage your audience to take the survey. 

    Job Application Form

    If your business is hiring, then you need to have a way to collect job applications on your website. All the various input fields and upload feature allow you to create a complete job application form for your business. You can ask your potential employees any questions you would like as well as have them upload their resume. 

    Feedback Form

    While this is similar to a survey, it is interpreted differently by your audience. A basic feedback form will ask one or two open-ended questions about a product or service that you provide and allow them to expand on what they think. This allows your customers to give their opinion on one specific product or service in their own words. This form would be great to email out to any customer a week or two after they have made a purchase. 

    Conclusion

    Forms are a necessary tool for you to collect information from your audience on your WordPress website. Many of today's forms on the market can be quite costly and over-complex. 

    With Quform, you can quickly create any type of form that you will require as shown in this article for an affordable price. To download this form plugin, you can head on over to CodeCanyon and purchase the Quform plugin as well as take a look at its live preview. 


    • WordPress
      Quform vs. FormCraft: Top WordPress Form Builder Plugins Compared
      Nona Blackman
    • WordPress
      Use a Drag-and-Drop Form Builder for WordPress
      Ashraff Hathibelagal
    • WordPress
      20 Best WordPress Login Forms on CodeCanyon
      Eric Dye
    • WordPress Plugins
      Best WordPress Form Builder Plugins for 2019
      Lorca Lokassa Sa
    • WordPress
      Creating WordPress Forms That Get Filled In
      Rachel McCollin

    20:51

    Blocking Third-Party Hands from the Cookie Jar

    Third-party cookies are set on your computer from domains other than the one that you're actually on right now. For example, if I log into css-tricks.com, I'll get a cookie from css-tricks.com that handles my authentication. But css-tricks.com might also load an image from some other site. A common tactic in online advertising is to render a "tracking pixel" image (well named, right?) that is used to track advertising impressions. That request to another site for the image (say, ad.doubleclick.com) also can set a cookie.

    Eric Lawrence explains the issue:

    The tracking pixel’s cookie is called a third party cookie because it was set by a domain unrelated to the page itself.

    If you later visit B.textslashplain.com, which also contains a tracking pixel from ad.doubleclick.net, the tracking pixel’s cookie set on your visit to A.example.com is sent to ad.doubleclick.net, and now that tracker knows that you’ve visited both sites. As you browse more and more sites that contain a tracking pixel from the same provider, that provider can build up a very complete profile of the sites you like to visit, and use that information to target ads to you, sell the data to a data aggregation company, etc.

    But times are a changin'. Eric goes on to explain the browser landscape:

    The default stuff is the big deal, because all browsers offer some way to block third-party cookies. But of course, nobody actually does it. Jeremy:

    It’s hard to believe that we ever allowed third-party cookies and scripts in the first place. Between them, they’re responsible for the worst ills of the World Wide Web.

    2019 is the year we apparently reached the breaking point.

    The post Blocking Third-Party Hands from the Cookie Jar appeared first on CSS-Tricks.

    15:16

    15 Awesome Event Organizer Website Templates & WordPress Themes

    Event Organizers/Managers do project management to create and develop large-scale events such as conferences, festivals, weddings, ceremonies, concerts, formal parties, or conventions. They have to study the brand, understand its target audience, plan the concept, and coordinate the technicalities before the actual launch of the event. Many large organizations and individuals often rely on such special services for their grand occasions. There are many event organizing companies in the market, which makes it necessary to stand our from the crowd, to create an impression and image that helps attract new clients as well as retain previous ones. For such a purpose, it is advisable for Event Organizers to have a spectacular website showcasing all their work and portfolio, and also proving their credibility with previously organized events.

    In this roundup, we will help you identify such 15 awesome event organizer website templates and WordPress themes; you can select or draw inspiration from them to create your event organizer website:

    1. Event Organizer:

    Event Organizer is a popular choice for event organizing and management templates. It comes with five best variations for the homepage, each of which is clean and crisp. It is an ideal template for any event/conference related website as it encompasses all relevant sections needed by such sites.

    The program section is beautifully laid out and well thought of, as it provides details of all necessary information like date, time, and lecture room. The speaker section talks about everything about the speaker, along with their social media buttons which provides ease of connecting and reading more about the speakers for people who are interested. The website is well structured, and it is ensured that relevant information is available to visitors. The user interface and hierarchy are rich.

    2. Grenda:

    Grenda is a beautifully designed, creative and elegant theme that is specifically designed for catering services and is suitable for events manager, event planners, Event Company at restaurants, bars, banquet halls, bakeries, professional bloggers in the food niche

    This fantastic WordPress theme has two compelling homepage demos and has multiple options for each webpage. Services have variations of service and service single. The menu has options between menus, menu singles, and menus tab and so forth and so on. The gallery is designed well, and an excellent gallery is a must for the catering industry. The contact page has Google map integration, and the overall design of the template is aesthetic and visually pleasing.

    3. We Music:

    As the name suggests, this website template can be used by music bands, music event organizers, nightclubs, DJs, music festival websites, and more. This theme acts as a perfect solution for music-related events as it also has an eCommerce support for selling event tickets online. This helps the client provide a one-stop solution to their visitors.

    Apart from the accessibility, this theme comes with several nifty features that enhance the user experience further. There are five homepage layouts, to choose from, and each of them has a countdown widget, sliders, parallax, and video backgrounds, and a transparent menu as well that adds on to the user experience.

    4. Happy Events:

    A happy event is a website template that is best suited for an event agency, who has worked as event planners in managing holidays, special celebrations, and important events. There’s excellent emphasize on the design language of this template. The hero image has a gradient overcast that looks visually appealing, and there is a slideshow of images with zoom in and other transitional features.

    The CTAs are placed strategically.  There are nifty features like eCommerce support that allows users to sell holiday costumes for special holidays and also a cost calculator to allow every visitor to calculate the event expense as they browse the event agency’s website which is an excellent way of transparency and ease of access.

    5. EventME:

    EventMe is one of the best website templates when it comes to suitability and adaptability of managing all sorts of events. The template is well equipped with powerful tools and features needed for an events site. It’s great for multitasking as there is support for sending push notifications, making promotions, scheduling an event, and much more. There’s flexibility of customization as well.

    The best part about the template is its responsiveness which is a must when designing an event website. There are dedicated sections for testimonials, and many other features that help it stand out, like crisp and clear pricing table that gives clarity and transparency to the visitors, highlight sections from previous events which is a unique feature, not every event template has, a dedicated blog section for keeping an engaging blog culture to improve community engagement and thereby drive more traffic to your site, and timelines to ensure you don’t miss out on any events.

    6. Ticket Box:

    The design of the WordPress theme is elegant. It is suitable for multi-purposes, like creating a website for concerts, events, meetups, conferences, exhibitions, and even sports. This template enables the client to sell conference tickets online through Events Tickets plus or WooCommerce alike. With nifty features, you can add schedules which makes it easier to comprehend and visually easy to navigate, promote your speakers, and organize and create amazing events for people to find and buy event tickets from organizers and more.

    7. Event Champ:

    Event Champ is one of the most useful and popular choices for event website templates. It has a one-stop solution to the requirements of the event listing, event, congresses, activity, convention, exhibition, meetup, organization, seminar, workshop, and conference, and ticket sites. There are multiple templates for multiple purposes. The entire template comes with features like event listing, search system, venue management schedule management, speaker management, and many more.

    The ease of eCommerce is reflected upon its broad acceptance of 90+ payment methods compatibility. There are various layouts and elements across all the available demos.  There is secure customization options, drag and drop option, options of changing colors, layout, and fonts. There’s also a plugin for Google street view which makes your store very accessible.

    8.     Love Story:

    Love Story is a beautiful WordPress template designed with elegance and style. It is the perfect template for wedding planning agencies, an individual wedding planner, and it can also be used for other event planning companies, like birthday, business meetings, training, and more. Furthermore, it can also be used for catering, restaurants, decorations, a florist store, ceremony planners, and gift shop and beauty blogs.

    The template comes packed with useful features such as price tables, a dedicated page for portfolio, a blog, a gallery, and team modules each. There is support for eCommerce as well. There is also ease of customizations with options of wide and boxed layouts.

    9. The Event:

    The Event is a responsive and elegant web template that caters to a wide variety of event-related fields such as Conferences, Meetings, Exhibitions, Congresses, Event Management, Events, and Conference websites. The overall visual appeal of the template is pleasing and uniform with necessary but minimal changes in the layout to cater to all different kinds of options.

    There’s a great use of illustrations and symbolism to make the content easy on the eye, and also appealing. The individual speaker post type, speaker list, and schedule features make the template very powerful and useful for the visitors to get all their information. It comes with the support of eCommerce as well, which allows the client to not only provide information regarding events but also sell tickets for the same.

    10. Meet ON:

    MeetOn is an excellent WordPress theme for meetings, conferences, and events websites. Their approach to design is purpose-oriented, which makes it very responsive and easy to use.  The colour schematic is pleasing to the eye, and the separate blog page is an added benefit.

    It comes with compelling tools such as appointment forms that allow quick registration from visitors, event planner that gives a clear and easy to plan all the upcoming events in a structured manner, event schedules which help clarify and give a clear image of what even is when. There are transparent pricing plans as well.

    11. Spkr:

    This WordPress website template has an outstanding design and performance. There are four demos available in this premium template, all of which modern, creative is and attention-grabbing. The layouts are readily adaptive and ready to use on the go, but it also offers element or page builder, that allows you to customize as per your taste with much flexibility.

    There are packed featured to add on like schedule layouts, map for easy navigation to the event by the potential attendees, strategically placed CTAs for conversions, pricing plans that provide transparency, official sponsor section, and also speaker profiles that familiarize audience with the speakers and know what they can expect when they attend the event. With this, there’s also an option to update your blog with a separate page for blog writing as well.

    12. Eventium:

    Eventium addresses and caters to the need for formal conventions, and it’s reflected in its design language.  It has a very modern, neat, and clean look and is suitable for various purposes like conferences, exhibitions, gigs, seminars, and webinars.  It provides various layout options to choose from, divided into multiple sections.

    It is a flexible and responsive template, and the best part is it is retina ready, which makes it mobile friendly and enhances its user experience and user interface by high standards, compared to some other templates available in the market.

    13. Blazen:

    Blazen is a great website template for exhibitions. There are many features and an even broader spectrum of options available. There are different homepages built with different animations and features and tons of such options to suit your purpose. Tons of customization options are available, and a well-designed template that helps give you a starting point.

    It is retina ready which makes it mobile friendly and very attractive to look at that can lead to more engagement. There are separate pages for gallery, blogs, speakers, FAQs and more.

    14. Maxbeat:

    This WordPress template gives you the ease and access of personalization of layouts, add amazing features. You can integrate media forms, build spectacular pages, and do much more. It understands the importance of a website to market your events, forums, meetups, and conferences.

    With such powerful and helpful features, maxbeat is also smooth and fast to learn. You can use features such as contact forms, blogs, pricing plans, and sliders. It comes with prebuilt index page demos and ten additional layouts from which you can choose. It enables visitors to find you easily and spread a word about your event quickly and efficiently.

    15. Eventex:

    Eventex is a fresh, fun, and nifty website template.  This template is filled with great features that can help you create a lasting impression on your visitors. The captivating design could lead to more visitors turning to attendees. It has a simple and minimalistic design, yet it doesn’t compromise on the content layout as it segments the content correctly into different categories in a well-structured way.

    There is also the availability of social media buttons, and a newsletter subscription form to collect data from visitors which can be useful for future email promotions.

    This concludes our roundup of 15 awesome event organizer website templates and WordPress themes. It is essential to have a website in the service sector as it acts like an online persona of your brand, giving it a substantial image, and also an easy contact point between you and your potential customers. Refer to the templates above and plan your next website.

    The post 15 Awesome Event Organizer Website Templates & WordPress Themes appeared first on Line25.

    13:56

    Patterns for Practical CSS Custom Properties Use

    I've been playing around with CSS Custom Properties to discover their power since browser support is finally at a place where we can use them in our production code. I’ve been using them in a number different ways and I’d love for you to get as excited about them as I am. They are so useful and powerful!

    I find that CSS variables usage tends to fall into categories. Of course, you’re free to use CSS variables however you like, but thinking of them in these different categories might help you understand the different ways in which they can be used.

    • Variables. The basics, such as setting, a brand color to use wherever needed.
    • Default Values. For example, a default border-radius that can be overridden later.
    • Cascading Values. Using clues based on specificity, such as user preferences.
    • Scoped Rulesets. Intentional variations on individual elements, like links and buttons.
    • Mixins. Rulesets intended to bring their values to a new context.
    • Inline Properties. Values passed in from inline styles in our HTML.

    The examples we’ll look at are simplified and condensed patterns from a CSS framework I created and maintain called Cutestrap.

    A quick note on browser support

    There are two common lines of questions I hear when Custom Properties come up. The first is about browser support. What browsers support them? Are there fallbacks we need to use where they aren’t supported?

    The global market share that support the things we’re covering in this post is 85%. Still, it’s worth cross-referencing caniuse) with your user base to determine how much and where progressive enhancement makes sense for your project.

    The second question is always about how to use Custom Properties. So let’s dive into usage!

    Pattern 1: Variables

    The first thing we’ll tackle is setting a variable for a brand color as a Custom Property and using it on an SVG element. We'll also use a fallback to cover users on trailing browsers.

    html {
      --brand-color: hsl(230, 80%, 60%);
    }
    
    .logo {
      fill: pink; /* fallback */
      fill: var(--brand-color);
    }
    

    Here, we've declared a variable called --brand-color in our html ruleset. The variable is defined on an element that’s always present, so it will cascade to every element where it’s used. Long story short, we can use that variable in our .logo ruleset.

    We declared a pink fallback value for trailing browsers. In the second fill declaration, we pass --brand-color into the var() function, which will return the value we set for that Custom Property.

    That’s pretty much how the pattern goes: define the variable (--variable-name) and then use it on an element (var(--variable-name)).

    See the Pen
    Patterns for Practical Custom Properties: Example 1.0
    by Tyler Childs (@tylerchilds)
    on CodePen.

    Pattern 2: Default values

    The var() function we used in the first example can also provide default values in case the Custom Property it is trying to access is not set.

    For example, say we give buttons a rounded border. We can create a variable — we’ll call it --roundness — but we won't define it like we did before. Instead, we’ll assign a default value when putting the variable to use.

    .button {
      /* --roundness: 2px; */
      border-radius: var(--roundness, 10px);
    }
    

    A use case for default values without defining the Custom Property is when your project is still in design but your feature is due today. This make it a lot easier to update the value later if the design changes.

    So, you give your button a nice default, meet your deadline and when --roundness is finally set as a global Custom Property, your button will get that update for free without needing to come back to it.

    See the Pen
    Patterns for Practical Custom Properties: Example 2.0
    by Tyler Childs (@tylerchilds)
    on CodePen.

    You can edit on CodePen and uncomment the code above to see what the button will look like when --roundness is set!

    Pattern 3: Cascading values

    Now that we've got the basics under our belt, let's start building the future we owe ourselves. I really miss the personality that AIM and MySpace had by letting users express themselves with custom text and background colors on profiles.

    Let’s bring that back and build a school message board where each student can set their own font, background color and text color for the messages they post.

    User-based themes

    What we’re basically doing is letting students create a custom theme. We'll set the theme configurations inside data-attribute rulesets so that any descendants — a .message element in this case — that consume the themes will have access to those Custom Properties.

    .message {
      background-color: var(--student-background, #fff);
      color: var(--student-color, #000);
      font-family: var(--student-font, "Times New Roman", serif);
      margin-bottom: 10px;
      padding: 10px;
    }
    
    [data-student-theme="rachel"] {
      --student-background: rgb(43, 25, 61);
      --student-color: rgb(252, 249, 249);
      --student-font: Arial, sans-serif;
    }
    
    [data-student-theme="jen"] {
      --student-background: #d55349;
      --student-color: #000;
      --student-font: Avenir, Helvetica, sans-serif;
    }
    
    [data-student-theme="tyler"] {
      --student-background: blue;
      --student-color: yellow;
      --student-font: "Comic Sans MS", "Comic Sans", cursive;
    }
    

    Here’s the markup:

    <section>
      <div data-student-theme="chris">
        <p class="message">Chris: I've spoken at events and given workshops all over the world at conferences.</p>
      </div>
      <div data-student-theme="rachel">
        <p class="message">Rachel: I prefer email over other forms of communication.</p>
      </div>
      <div data-student-theme="jen">
        <p class="message">Jen: This is why I immediately set up my new team with Slack for real-time chat.</p>
      </div>
      <div data-student-theme="tyler">
        <p class="message">Tyler: I miss AIM and MySpace, but this message board is okay.</p>
      </div>
    </section>
    

    We have set all of our student themes using [data-student-theme] selectors for our student theme rulesets. The Custom Properties for background, color, and font will apply to our .message ruleset if they are set for that student because .message is a descendant of the div containing the data-attribute that, in turn, contains the Custom Property values to consume. Otherwise, the default values we provided will be used instead.

    See the Pen
    Patterns for Practical Custom Properties: Example 3.0
    by Tyler Childs (@tylerchilds)
    on CodePen.

    Readable theme override

    As fun and cool as it is for users to control custom styles, what users pick won't always be accessible with considerations for contrast, color vision deficiency, or anyone that prefers their eyes to not bleed when reading. Remember the GeoCities days?

    Let's add a class that provides a cleaner look and feel and set it on the parent element (<section>) so it overrides any student theme when it’s present.

    .readable-theme [data-student-theme] {
      --student-background: hsl(50, 50%, 90%);
      --student-color: hsl(200, 50%, 10%);
      --student-font: Verdana, Geneva, sans-serif;
    }
    
    <section class="readable-theme">
      ...
    </section>
    

    We’re utilizing the cascade to override the student themes by setting a higher specificity such that the background, color, and font will be in scope and will apply to every .message ruleset.

    See the Pen
    Patterns for Practical Custom Properties: Example 3.1
    by Tyler Childs (@tylerchilds)
    on CodePen.

    Pattern 4: Scoped rulesets

    Speaking of scope, we can scope Custom Properties and use them to streamline what is otherwise boilerplate CSS. For example, we can define variables for different link states.

    a {
      --link: hsl(230, 60%, 50%);
      --link-visited: hsl(290, 60%, 50%);
      --link-hover: hsl(230, 80%, 60%);
      --link-active: hsl(350, 60%, 50%);
    }
    
    a:link {
      color: var(--link);
    }
    
    a:visited {
      color: var(--link-visited);
    }
    
    a:hover {
      color: var(--link-hover);
    }
    
    a:active {
      color: var(--link-active);
    }
    
    <a href="#">Link Example</a>
    

    Now that we've written out the Custom Properties globally on the <a> element and used them on our link states, we don't need to write them again. These are scoped to our <a> element’s ruleset so they are only set on anchor tags and their children. This allows us to not pollute the global namespace.

    Example: Grayscale link

    Going forward, we can control the links we just created by changing the Custom Properties for our different use cases. For example, let’s create a gray-colored link.

    .grayscale {
      --link: LightSlateGrey;
      --link-visited: Silver;
      --link-hover: DimGray;
      --link-active: LightSteelBlue;
    }
    
    <a href="#" class="grayscale">Link Example</a>
    

    We’ve declared a .grayscale ruleset that contains the colors for our different link states. Since the selector for this ruleset has a greater specificity then the default, these variable values are used and then applied to the pseudo-class rulesets for our link states instead of what was defined on the <a> element.

    See the Pen
    Patterns for Practical Custom Properties: Example 4.0
    by Tyler Childs (@tylerchilds)
    on CodePen.

    Example: Custom links

    If setting four Custom Properties feels like too much work, what if we set a single hue instead? That could make things a lot easier to manage.

    .custom-link {
      --hue: 30;
      --link: hsl(var(--hue), 60%, 50%);
      --link-visited: hsl(calc(var(--hue) + 60), 60%, 50%);
      --link-hover: hsl(var(--hue), 80%, 60%);
      --link-active: hsl(calc(var(--hue) + 120), 60%, 50%);
    }
    
    .danger {
      --hue: 350;
    }
    
    <a href="#" class="custom-link">Link Example</a>
    <a href="#" class="custom-link danger">Link Example</a>
    

    See the Pen
    Patterns for Practical Custom Properties: Example 4.1
    by Tyler Childs (@tylerchilds)
    on CodePen.

    By introducing a variable for a hue value and applying it to our HSL color values in the other variables, we merely have to change that one value to update all four link states.

    Calculations are powerful in combination with Custom Properties since they let
    your styles be more expressive with less effort. Check out this technique by Josh Bader where he uses a similar approach to enforce accessible color contrasts on buttons.

    Pattern 5: Mixins

    A mixin, in regards to Custom Properties, is a function declared as a Custom Property value. The arguments for the mixin are other Custom Properties that will recalculate the mixin when they’re changed which, in turn, will update styles.

    The custom link example we just looked at is actually a mixin. We can set the value for --hue and then each of the four link states will recalculate accordingly.

    Example: Baseline grid foundation

    Let's learn more about mixins by creating a baseline grid to help with vertical rhythm. This way, our content has a pleasant cadence by utilizing consistent spacing.

    .baseline,
    .baseline * {
      --rhythm: 2rem;
      --line-height: var(--sub-rhythm, var(--rhythm));
      --line-height-ratio: 1.4;
      --font-size: calc(var(--line-height) / var(--line-height-ratio));
    }
    
    .baseline {
      font-size: var(--font-size);
      line-height: var(--line-height);
    }
    

    We've applied the ruleset for our baseline grid to a .baseline class and any of its descendants.

    • --rhythm: This is the foundation of our baseline. Updating it will impact all the other properties.
    • --line-height: This is set to --rhythm by default, since --sub-rhythm is not set here.
    • --sub-rhythm: This allows us to override the --line-height — and subsequently, the --font-size — while maintaining the overall baseline grid.
    • --line-height-ratio: This helps enforce a nice amount of spacing between lines of text.
    • --font-size: This is calculated by dividing our --line-height by our --line-height-ratio.

    We also set our font-size and line-height in our .baseline ruleset to use the --font-size and --line-height from our baseline grid. In short, whenever the rhythm changes, the line height and font size change accordingly while maintaining a legible experience.

    OK, let’s put the baseline to use.

    Let's create a tiny webpage. We'll use our --rhythm Custom Property for all of the spacing between elements.

    .baseline h2,
    .baseline p,
    .baseline ul {
      padding: 0 var(--rhythm);
      margin: 0 0 var(--rhythm);
    }
    
    .baseline p {
      --line-height-ratio: 1.2;
    }
    
    .baseline h2 {
      --sub-rhythm: calc(3 * var(--rhythm));
      --line-height-ratio: 1;
    }
    
    .baseline p,
    .baseline h2 {
      font-size: var(--font-size);
      line-height: var(--line-height);
    }
    
    .baseline ul {
      margin-left: var(--rhythm);
    }
    
    <section class="baseline">
      <h2>A Tiny Webpage</h2>
      <p>This is the tiniest webpage. It has three noteworthy features:</p>
      <ul>
        <li>Tiny</li>
        <li>Exemplary</li>
        <li>Identifies as Hufflepuff</li>
      </ul>
    </section>
    

    We're essentially using two mixins here: --line-height and --font-size. We need to set the properties font-size and line-height to their Custom Property counterparts in order to set the heading and paragraph. The mixins have been recalculated in those rulesets, but they need to be set before the updated styling will be applied to them.

    See the Pen
    Patterns for Practical Custom Properties: Example 5.0
    by Tyler Childs (@tylerchilds)
    on CodePen.

    Something to keep in mind: You probably do not want to use the Custom Property values in the ruleset itself when applying mixins using a wildcard selector. It gives those styles a higher specificity than any other inheritance that comes along with the cascade, making them hard to override without using !important.

    Pattern 6: Inline properties

    We can also declare Custom Properties inline. Let's build a lightweight grid system demonstrate.

    .grid {
      --columns: auto-fit;
    
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    }
    
    <div class="grid">
      <img src="https://www.fillmurray.com/900/600" alt="Bill Murray" />
      <img src="https://www.placecage.com/900/600" alt="Nic Cage" />
      <img src="https://www.placecage.com/g/900/600" alt="Nic Cage gray" />
      <img src="https://www.fillmurray.com/g/900/600" alt="Bill Murray gray" />
      <img src="https://www.placecage.com/c/900/600" alt="Nic Cage crazy" />
      <img src="https://www.placecage.com/gif/900/600" alt="Nic Cage gif" />
    </div>
    

    By default, the grid has equally sized columns that will automatically lay themselves into a single row.

    See the Pen
    Patterns for Practical Custom Properties: Example 6.0
    by Tyler Childs (@tylerchilds)
    on CodePen.

    To control the number of columns we can set our --columns Custom Property
    inline on our grid element.

    <div class="grid" style="--columns: 3;">
      ...
    </div>
    

    See the Pen
    Patterns for Practical Custom Properties: Example 6.1
    by Tyler Childs (@tylerchilds)
    on CodePen.


    We just looked at six different use cases for Custom Properties — at least ones that I commonly use. Even if you were already aware of and have been using Custom Properties, hopefully seeing them used these ways gives you a better idea of when and where to use them effectively.

    Are there different types of patterns you use with Custom Properties? Share them in the comments and link up some demos — I’d love to see them!

    If you’re new to Custom Properties are are looking to level up, try playing around with the examples we covered here, but add media queries to the mix. You’ll see how adaptive these can be and how many interesting opportunities open up when you have the power to change values on the fly.

    Plus, there are a ton of other great resources right here on CSS-Tricks to up your Custom Properties game in the Custom Properties Guide.

    See the Pen
    Thank you for Reading!
    by Tyler Childs (@tylerchilds)
    on CodePen.

    The post Patterns for Practical CSS Custom Properties Use appeared first on CSS-Tricks.

    13:56

    Let’s Not Forget About Container Queries

    Container queries are always on the top of the list of requested improvements to CSS. The general sentiment is that if we had container queries, we wouldn't write as many global media queries based on page size. That's because we're actually trying to control a more scoped container, and the only reason we use media queries for that now is because it's the best tool we have in CSS. I absolutely believe that.

    There is another sentiment that goes around once in a while that goes something like: "you developers think you need container queries but you really don't." I am not a fan of that. It seems terribly obvious that we would do good things with them if they were available, not the least of which is writing cleaner, portable, understandable code. Everyone seems to agree that building UIs from components is the way to go these days which makes the need for container queries all the more obvious.

    It's wonderful that there are modern JavaScript ideas that help us do use them today — but that doesn't mean the technology needs to stay there. It makes way more sense in CSS.

    Here's my late 2019 thought dump on the subject:

    • Philip Walton's "Responsive Components: a Solution to the Container Queries Problem" is a great look at using JavaScript's ResizeObserver as one way to solve the issue today. It performs great and works anywhere. The demo site is the best one out there because it highlights the need for responsive components (although there are other documented use cases as well). Philip even says a pure CSS solution would be more ideal.
    • CSS nesting got a little round of enthusiasm about a year ago. The conversation makes it seem like nesting is plausible. I'm in favor of this as a long-time fan of sensible Sass nesting. It makes me wonder if the syntax for container queries could leverage the same sort of thing. Maybe nested queries are scoped to the parent selector? Or you prefix the media statement with an ampersand as the current spec does with descendant selectors?
    • Other proposed syntaxes generally involve some use of the colon, like .container:media(max-width: 400px) { }. I like that, too. Single-colon selectors (pseduo selectors) are philosophically "select the element under these conditions" — like :hover, :nth-child, etc. — so a media scope makes sense.
    • I don't think syntax is the biggest enemy of this feature; it's the performance of how it is implemented. Last I understood, it's not even performance as much as it mucks with the entire rendering flow of how browsers work. That seems like a massive hurdle. I still don't wanna forget about it. There is lots of innovation happening on the web and, just because it's not clear how to implement it today, that doesn't mean someone won't figure out a practical path forward tomorrow.

    The post Let’s Not Forget About Container Queries appeared first on CSS-Tricks.

    Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
    Could not load more posts
    Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
    Just a second, loading more posts...
    You've reached the end.

    Don't be the product, buy the product!

    Schweinderl