How to Setup a Free Support Ticketing System With WordPress

Can a Free WordPress support ticket system work as well as a paid WordPress support ticket plugin? It definitely can! Just follow this simple tutorial…

A good helpdesk ticketing system should allow your business to handle and prioritize multiple customer support inquiries and manage these so your customers get replied to quickly, by the right support person or team.

Many paid WordPress support plugins can help you do this. But, what about a free one?

Free help desk ticketing systems that can only handle basic customer inquiries are no more useful than just using a plain old contact form.

Unless, of course, you add a pinch of ‘zing’ that will automagically transform a contact form into a full-on WordPress helpdesk and support ticket system… for free!

This is exactly what we are going to do, so watch my hands. (Nothing up this sleeve…)

From Free Contact Form To Free Support Ticket System

Can you say prestidigitation?

It doesn’t matter if you can’t because you don’t need magic tricks to change a plain contact form into a free support ticket system that will allow your business to:

  • Handle multiple customer inquiries.
  • Create separate support tickets for each submission.
  • Assign support tickets created by users to different staff members or areas of your business.
  • Group customer emails and chats with each ticket.
  • And so much more.

Alakazam… but this defies logic! How does one perform this great feat?

Magicians never reveal their tricks, but I’m no magician, so here are the three simple steps we’ll take to make this all happen:

Step 1: First, we’ll create a support ticket form using WPMU DEV’s Forminator plugin.

Step 2: Next, we’ll integrate our form with a complete customer support ticket system from HubSpot.

Step 3: Pffftt! (magic cloud of smoke). There is no ‘Step 3’. Only Step ‘Free’ … Your free WordPress ticket system is done (mwah hah hah)!

Let’s go through this step-by-step and make some customer support magic appear before your very eyes.

Step 1: Create A Customer Support Ticket Form

If you’ve just landed on this page looking for a free WordPress helpdesk plugin or support plugin, download Forminator, our free drag and drop form building plugin for WordPress from the WordPress.org plugin repository.

And if you’re a WPMU DEV member, then you already have access to the powerful Pro version of our expandable form builder plugin along with all the other exclusive goodies our members have access to, so make sure you install The Hub on your WordPress site then go to WPMU DEV > Plugins.

WPMU DEV WordPress menu - add plugins.
You can install all our powerful plugins from your WordPress dashboard.

Download and install the Forminator plugin from your WordPress dashboard.

WPMU DEV plugin list - Forminator
Install Forminator from your WordPress dashboard.

Once Forminator has been installed, activate the plugin and head on over to ‘Forms’ in the Forminator menu.

Forminator menu
Select ‘Forms’ in the Forminator menu to create a form.

Forminator lets you easily create and import forms. For this tutorial, we’ll create a simple contact form, so click on the ‘Create’ button.

Forminator create form screen.
Forminator lets you create and import all kinds of forms, including support ticket forms.

Select a template for your form (e.g. a Contact Form template). You can start with a blank form if you want to create your support ticket from scratch.

Forminator form templates.
Choose a pre-made form template or start with a blank form and customize your own.

Add all the fields your users or customers will need to complete in your support ticket to your form, including options for different products, services, or departments, then save and preview.

An example of fields you can add to your support ticket to direct user submissions to different products.

For detailed tutorials on how to create forms using Forminator, including what kind of fields and options are available, see the Forminator documentation section.

Creating your support ticket submission form is the first step to making the magic happen. It’s just like pulling a rabbit out of a hat. First, you need a hat, which Forminator provides (look, nothing in here…yet!)

Now let’s add the rabbit.

Step 2: Integrate Forminator With HubSpot

HubSpot is an inbound marketing, sales, and service CRM software. You can use this tool for managing all your customer relationships, including tracking interactions with leads and customers, automating sales and marketing activities, sending out newsletter emails, and, more importantly for this tutorial, as a help desk and support ticket system.

Since we’ll be integrating our form with HubSpot in this step, you will need to have an account.

HubSpot home page screen.
HubSpot – Inbound Marketing, Sales, and Service Software.

The good news is that HubSpot’s Service Hub provides all of the functionality we will need to start our WordPress support ticket system for free.

HubSpot Service Hub get started info page.
HubSpot Service Hub is free!

You can upgrade later if you want additional features like customer service automation, knowledgebase, customer feedback, multiple ticket pipelines, and more.

Log into HubSpot if you already have an account. Otherwise, go through their setup process and make sure you confirm your email address and activate your account.

HubSpot account setup forms.
Create a HubSpot account and log in.

Set up your lists, forms, etc. in your HubSpot account.

HubSpot create list screen.
Create a list in HubSpot.

Follow the tutorials in the HubSpot Academy to learn how to use the software, create lists, forms, use support tickets, etc.

HubSpot Academy
Learn how to use HubSpot and create support tickets with HubSpot Academy.

After setting up an account with HubSpot, come back to your WordPress site and go to Forminator > Integrations.

Click on the ‘+’ symbol to integrate HubSpot with Forminator.

Integrate HubSpot with Forminator easily with just a few clicks.

You can also confirm the integration with Forminator inside your HubSpot account.

HubSpot integrations screen.
HubSpot and Forminator Integration.

Once you’ve integrated the app, go back to the Forminator dashboard, click on the gear icon next to the name of your form, and select Edit from the drop-down menu.

Click on the gear icon to edit your form.

Depending on whether your web browser has been resized or not (or if you’re working on your site using a mobile device), you will either see the editing options listed next to your form or displayed in a drop-down menu format in the ‘Navigate’ section.

Forminator edit form screen.
Let’s transform this simple form using integration magic.

Select the ‘Integrations’ option in the Edit Form screen and click on ‘Activate App’ to add the integration with HubSpot to your form.

If you have followed the previous steps in this tutorial, you should already have your lists and forms set up in HubSpot, so the next step is to map the HubSpot and Forminator fields. This ensures that data will be sent through correctly from your form to your ticketing system.

HubSpot and Forminator field mapping.
Map your HubSpot and Forminator fields.

Click ‘Continue’ to create your HubSpot tickets and complete the integration and setup process.

Create your HubSpot tickets.

As per the instructions on the form, in addition to adding new contacts, you can create a new ticket for each form submission just by flicking a switch.

Support ticket demo.
Support ticket demo.

Once your support ticket form has been created, you can add it to any page or post using a form shortcut.

WordPress support ticket system demo.
Voilà!

Hey Presto! Your free support ticket system is now live!

You Can Even Charge Users For Providing Support

Want a free WordPress ticketing system that lets you charge users for support? Forminator lets you add payment fields to your form.

Add a Stripe or PayPal payment field to your form, click the ‘Publish’ or ‘Update’ button (saying “abracadabra” is optional) and your setup will transform like magic into a premium WordPress ticketing support system.

Premium support ticketing system.
Easily create a premium WordPress ticketing support system with payment fields.

The Magic Of Integration

As you can see, integration is the key to transforming a free contact form into a free WordPress support ticket system.

Forminator provides you not only with a way to create a support ticket form for free, but if you integrate Forminator with a third-party application like HubSpot, you will instantly get a complete free ticketing support system added via the backend with the capability to extend support functionality with more advanced features later if required.

In addition to all the automation you can already integrate into your forms, our formidable Forminator team is currently working on new plugin features like:

  • Email routing that will let you send email notifications to specific departments or areas of your business dynamically depending on the options that users select on your forms.
  • Email conditions where you can add as many email notifications as you need and send those emails out conditionally based on what customers input on your form.
  • Dynamic forms that let you pre-fill forms with query parameters, making it easier for customers to lodge support tickets and many other types of forms.

Before You Disappear…

Special thanks to WPMU DEV member @Levent for requesting the HubSpot integration with Forminator and Mukul from our Forminator team for his valuable assistance answering questions about the plugin’s capabilities.

If you haven’t experienced the magic of being a WPMU DEV member yet, then we invite you to step right in and try our 100% risk-free, 30-day trial and get full access to all of our WordPress plugins with no hidden mind tricks or illusions.

ARTA Launches API to Bolster Shipping Logistics Platform

With the holiday season around the corner, ARTA, the contemporary logistics platform for shipping specialized items, is announcing the launch of the ARTA API, which will allow businesses to harness the power of ARTA's eCommerce tools that streamline complex logistics and bridge fragmented supply chains.

Program an Arduino With State Machines in 5 Minutes

Did you ever program an Arduino? Have you ever been worried about complex control flows written in pure C? Maybe you have already heard of statecharts and state machines? In this blog post, I will show you how to program an Arduino in just 5 minutes in a model-driven way with the help of YAKINDU Statechart Tools (SCT).

There have been several attempts to program an Arduino with YAKINDU SCT as described by Marco Scholtyssek or René Beckmann. However, when I tried to teach how to program an Arduino with YAKINDU SCT within the Automotive Software Engineering Summer School 2016 at the University of Applied Sciences and Arts in Dortmund I found out that it’s hard to understand and implement without appropriate tooling. So I sat down and implemented Arduino support for YAKINDU SCT to generate lots of the glue code that is needed to run state machines on the Arduino.

Curated List of Featured Themes Coming to the Theme Directory

Themes are the face of WordPress.

Like it or not, the average user is more interested in what their site looks like when they first begin using the platform than what the thousands upon thousands of plugins can do for them. Perhaps that’s unfair to plugin developers — there are more exciting things happening in the plugin world right now — but it is what it is. Themes are visual, and they are what sell the platform to people who just want a site that looks good.

While WordPress is massive, I can’t help but think that it is losing out on more users because such users are not always presented with solid options for their site’s design out of the gate.

Most of the default Twenty* themes are good introduction themes for first-time users, but they are not to everyone’s tastes.

I’ve worked with numerous users who were setting up their first WordPress site over the years. Today, many similar people use a pre-installed script to launch WordPress from their web host. Much of the initial work is done for them. Often, they are unfamiliar with the WordPress community and what is available out there. They don’t know how to find, buy, and install a theme from a reputable commercial theme business.

What they do is head over to the add-new theme page in their WordPress admin, and they are presented with the “Featured” themes list.

Screenshot of the featured themes list in the WordPress admin.
Featured themes list in the WordPress admin.

Sometimes a user gets lucky. Other times it is a crapshoot.

For several years now, the official WordPress theme directory has shown a random list of themes from the 7,000 or so themes available.

While themes in the directory undergo a strict code review, there is no quality control on design. That is a good thing because it allows designers at any level to contribute to the platform. Open source communities should always have an open contribution process, and themes are one area that many developers get started with WordPress.

However, the term “featured” implies that there is something particularly special about those themes. They should be distinctive in some way. They should be a cut above the rest. That’s not what we have today, and it’s not what has been presented to users for the last half decade.

This is a huge missed opportunity.

Today, web hosts have started taking over this role. Whether it is GoDaddy’s onboarding process with their custom Go theme or WP Engine with the Genesis framework, hosts are doing the job that WordPress.org couldn’t manage to get together.

How Featured Themes Became Random

In the 2013-2014 era, the WordPress theme review team (TRT) was trying to find a way to get more people to contribute to the review process. By that time, themes had become big business and more theme authors were submitting themes to the directory. The team implemented a program that allowed the top reviewers each month an opportunity to pick the featured themes.

The program’s original intention was for reviewers to select a theme they liked during reviews. The best-laid plans…

The problem was that nearly all of the top reviewers were theme authors. Their incentive for doing reviews was to get their themes featured. Big theme businesses stood the most to gain. They could put multiple reviewers to work who would knock out review after review.

It wasn’t a level playing field. Even if it had been, the featured themes list was being taken over by business interests via a pay-to-play system. Those with the most resources would always come out on top.

Theme companies featured on WordPress.org were already raking in cash at that point. Zerif Lite, a theme in the popular list just two years later in 2016, reported north of $100 thousand per month from upsells. Even at one-tenth of that number, it is enough incentive for any businesses to play the system to their advantage.

In April 2014, the program was shut down because reviewers were choosing their own themes and repeatedly featuring the same themes. The featured list then began showcasing a new set of random themes every day.

Randomly-chosen featured themes levels the playing field for every theme author. However, it doesn’t showcase the best that WordPress has to offer.

A Curated List of Themes Coming Soon

The TRT decided in their team meeting yesterday on a change in how featured themes are handled. Denis Žoljom wrote in the meeting notes that the team would try a curated list for a few months to see how the WordPress community responds.

The current plan is to hold a meeting every two or three weeks where people can recommend themes to be featured based on their design, code quality, and potentially other merits. The team reps would pick from the recommendations.

The reps are still deciding how to best handle any foreseeable issues before the new program begins. The team was divided over whether there should be a curated list and what the criteria might be for such a list. The biggest concern is over the potential for abuse and conflicts of interest. These and other problems will be something the reps will need to figure out.

The general consensus seems to be that featured themes would not have any upsells or other commercial aspects. That could limit the pool of potential themes considerably because many theme authors have some sort of commercial interest in having their themes hosted in the official directory.

I welcome the change from seeing random themes every day. I want to see the diamonds in the rough that get buried beneath big business and themes that dominate the landscape in the separate popular list. I want to see theme authors who are building unique themes front and center.

The big question is whether this change will help users find that perfect theme for their sites.

Why Are Accessible Websites so Hard to Build?

I was chatting with some front-end folks the other day about why so many companies struggle at making accessible websites. Why are accessible websites so hard to build? We learn about HTML, we make sure things are semantic and — voila! @— we have an accessible website. During the course of conversation, someone mentioned the Domino's pizza legal case, which is perhaps the most public example of a company being sued because of a lack of accessibility.

Here’s an interesting tidbit from that link:

According to CNBC, the number of lawsuits over inaccessible websites jumped 58 percent last year over 2017, to more than 2,200.

Inaccessible websites are not just a consideration for designers and engineers but a serious problem for a company’s legal team as well. Thankfully, it seems more of these cases will be brought to trial and (my personal hope is) this will get folks to care more about semantics and front-end development best practices. Although I'd like to think that companies would do what’s best for the web and make websites that meet the baseline requirements without a legal threat, we absolutely need to make inaccessible websites illegal for folks to really pay attention to this issue.

However! I also worry about attributing what might simply be a lack of knowledge to malice. I reckon a lot of websites have bad accessibility not because folks don’t care, but because they don’t know there's an issue in the first place. As my conversation with front-end engineers progressed, I realized that the reason accessibility isn’t tackled seriously probably doesn’t have anything to do with bandwidth, or experience, or money.

I reckon the problem is that the accessibility of a website can be invisibly and silently broken.

Here’s an example: when developing a site, JavaScript errors are probably going to be caught because everything breaks if something goes wrong. And CSS bugs are going to get caught because something will look off. But the accessibility or performance of a website can go from okay to terrible overnight and with no warning whatsoever. The only way to fix these invisibly broken things is to first make them visible.

So, here’s an idea: what if our text editors caught accessibility issues and showed them to us during development? It could look something like this:

An example of how performance and accessibility issues might be flagged in VS Code whilst you type.

I’m sure there are a ton of other ways we can make accessibility issues more public and visible. There are tools such as Lighthouse and browser extensions that are already out there, but making accessibility (and even performance, another silent fail) a part of our minute-to-minute workflow ensures that we can’t ignore it. Something like this would encourage us to learn about the problems, give us links to potential solutions, and encourage us all to care for a relatively misunderstood part of front-end development.

The post Why Are Accessible Websites so Hard to Build? appeared first on CSS-Tricks.

Google Makes Progress in Modernizing Android Development

Google today made a host of announcements that provide a good look at the future of Android development. The company is releasing three core sets of tools: a developer preview of Jetpack Compose; expanded APIs for Android Jetpack; and Android Studio 4 in Canary. Google believes these will provide developers with a more complete experience when writing apps for Android. 

Vue.js Tutorial 1 — Hello Vue

Get started with Vue

With the age of SPAs (Single Page Applications) at its rise, JavaScript appears to be in it’s prime. A programming language that wouldn’t be considered a real programming language only a decade ago is now one of the most used on this planet. 

Naturally, it’s not just JavaScript in its pure form that is at the forefront of the revolution. We have a number of frameworks built on top of JavaScript that bring some order to the chaos. The most popular are, of course:  

Data Orchestration: What Is it, Why Is it Important?

I first heard the term "data orchestration" earlier this year at a technical meetup in the San Francisco Bay Area. The presenter was Bin Fan, founding engineer and PMC maintainer of the Alluxio open source project.

Bin explained that data orchestration is a relatively new term. A data orchestration platform, he said, "brings your data closer to compute across clusters, regions, clouds, and countries." 

How Are Your Pull Requests?

Pull requests shouldn't feel like pulling teeth

My college life started in the town of Boston, MA — about 950 miles from my hometown in the Midwest. Since I was living in a large city, paying for parking for my automobile was not an option. My sister and her friend drove me to Boston and helped get me unloaded before headed back to the Midwest. I was grateful.

This was the late 1980s.

One Challenge With 10 Solutions

Technologies we use for Data Analytics have evolved a lot, recently. Good old relational database systems become less popular every day. Now, we have to find our way through several new technologies, which can handle big (and streaming) data, preferably on distributed environments.

Python is all the rage now, but of course there are lots of alternatives as well. SQL will always shine, and some other oldies-but-goldies, which we can never under-estimate, are still out there.

How Secure Is 256-bit Encryption?

SSL security is all about encryption of data over two nodes. The safe transfer over an internet connection is attained due to encryption performed by the SSL system.

Why Is it Necessary?

Now, I can list n-numbers of examples that could prove its necessity for our daily transmission or transactions process.

The 5 Pitfalls of Legacy Database Environments

Find out the 5 pitfalls of legacy DB environments.

Microsoft SQL Server, Oracle, SAP HANA, PostgreSQL, MySQL. For many organizations, these databases, among others, are essential components of their success, but their potential is stunted. That’s because too many of these databases are still running on legacy IT infrastructure.

Riddled with silos and complexity in every corner, legacy IT is neither efficient nor scalable enough to continue running these databases. Beyond the poor performance and inefficiency of running relational databases on legacy infrastructure, your IT team is likely struggling with one, two, or all of the following pitfalls.

Designing Your First REST API – Part 2

This kitty knows how to REST.

This is the second part of my REST API guide, where I’ll be focusing on designing a simple API using SwaggerHub. I will explain the basic functionalities of the SwaggerHub editor and the Open API Specification. My previous article covered the basic concepts of REST APIs.

You might also like: 

Introduction

OpenAPI

OpenAPI is a format of writing an API definition to describe the structure of the API to humans as well as machines. An OpenAPI file allows you to describe your entire API, including:

Don’t Have Your Data Strategy? That’s a Mistake

Data Strategy

The Sins of AI Adopters

Artificial intelligence adoption may be tricky. This technology is different than any other you’ve implemented before. There are rules to follow and some of them incomprehensible to someone without extensive AI knowledge. There are certain challenges companies can face while implementing AI: data quality, model errors, lack of data science experts — many of them covered in the article 12 challenges of AI adoption. Some of these issues can be prevented, but others require preparation. However, many organizations are still dreamers when it comes to AI. There’s nothing wrong with having a vision to follow, but the way you follow it matters.

You may also like:  What You Need to Know About Adopting Big Data, AI, and Machine Learning

What I Like About Writing Styles with Svelte

There’s been a lot of well-deserved hype around Svelte recently, with the project accumulating over 24,000 GitHub stars. Arguably the simplest JavaScript framework out there, Svelte was written by Rich Harris, the developer behind Rollup. There’s a lot to like about Svelte (performance, built-in state management, writing proper markup rather than JSX), but the big draw for me has been its approach to CSS.

Single file components

​​

React does not have an opinion about how styles are defined
—React Documentation

​​​​

A UI framework that doesn't have a built-in way to add styles to your components is unfinished.
—Rich Harris, creator of Svelte

In Svelte, you can write CSS in a stylesheet like you normally would on a typical project. You can also use CSS-in-JS solutions, like styled-components and Emotion, if you'd like. It’s become increasingly common to divide code into components, rather than by file type. React, for example, allows for the collocation of a components markup and JavaScript. In Svelte, this is taken one logical step further: the Javascript, markup and styling for a component can all exist together in a single `.svelte`​ file. If you’ve ever used single file components in Vue, then Svelte will look familiar.

// button.svelte
<style>
  button {
    border-radius: 0;
    background-color: aqua;
  }
</style>

<button>
  <slot/>
</button>

Styles are scoped by default

By default, styles defined within a Svelte file are scoped. Like CSS-in-JS libraries or CSS Modules, Svelte generates unique class names when it compiles to make sure the styles for one element never conflict with styles from another.

That means you can use simple element selectors like div and button in a Svelte component file without needing to work with class names. If we go back to the button styles in our earlier example, we know that a ruleset for <button> will only be applied to our <Button> component — not to any other HTML button elements within the page. If you were to have multiple buttons within a component and wanted to style them differently, you'd still need classes. Classes will also be scoped by Svelte.

The classes that Svelte generates look like gibberish because they are based on a hash of the component styles (e.g. svelte-433xyz). This is far easier than a naming convention like BEM. Admittedly though, the experience of looking at styles in DevTools is slightly worse as the class names lack meaning.

The markup of a Svelte component in DevTools.

It’s not an either/or situation. You can use Svelte’s scoped styling along with a regular stylesheet. I personally write component specific styles within .svelte files, but make use of utility classes defined in a stylesheet. For global styles to be available across an entire app — CSS custom properties, reusable CSS animations, utility classes, any ‘reset’ styles, or a CSS framework like Bootstrap — I suggest putting them in a stylesheet linked in the head of your HTML document.

It lets us create global styles

As we've just seen, you can use a regular stylesheet to define global styles. Should you need to define any global styles from within a Svelte component, you can do that too by using :global. This is essentially a way to opt out of scoping when and where you need to.

For example, a modal component may want to toggle a class to style the body element:

<style>
:global(.noscroll) {
  overflow: hidden;
}
</style>

Unused styles are flagged

Another benefit of Svelte is that it will alert you about any unused styles during compilation. In other words, it searches for places where styles are defined but never used in the markup.

Conditional classes are terse and effortless

If the JavaScript variable name and the class name is the same, the syntax is incredibly terse. In this example, I’m creating modifier props for a full-width button and a ghost button.

<script>
  export let big = false;
  export let ghost = false;
</script>

<style>
  .big {
    font-size: 20px;
    display: block;
    width: 100%;
  }
  
  .ghost {
    background-color: transparent;
    border: solid currentColor 2px;
  }
</style>    
    
<button class:big class:ghost>
  <slot/>
</button>

A class of ghost will be applied to the element when a ghost prop is used, and a class of big is applied when a big prop is used.

<script>
  import Button from './Button.svelte';
</script>

<Button big ghost>Click Me</Button>

Svelte doesn’t require class names and prop names to be identical.

<script>
  export let primary = false;
  export let secondary = false;
</script>

<button
  class:c-btn--primary={primary}
  class:c-btn--secondary={secondary}
  class="c-btn">
  <slot></slot>
</button>

The above button component will always have a c-btn class but will include modifier classes only when the relevant prop is passed in, like this:

<Button primary>Click Me</Button>

That will generate this markup:

<button class="c-btn c-btn--primary">Click Me</button>

Any number of arbitrary classes can be passed to a component with a single prop:

<script>
let class_name = '';
export { class_name as class };
</script>

<button class="c-btn {class_name}">
  <slot />
</button>

Then, classes can be used much the same way you would with HTML markup:

<Button class="mt40">Click Me</Button>

From BEM to Svelte

Let's see how much easier Svelte makes writing styles compared to a standard CSS naming convention. Here's a simple component coded up using BEM.

.c-card {
  border-radius: 3px;
  border: solid 2px;
}

.c-card__title {
  text-transform: uppercase;
}

.c-card__text {
  color: gray;
}

.c-card--featured {
  border-color: gold;
}

Using BEM, classes get long and ugly. In Svelte, things are a lot simpler.

<style>
div {
  border-radius: 3px;
  border: solid 2px;
}

h2 {
  text-transform: uppercase;
}

p {
  color: gray;
}

.featured {
  border-color: gold;
}
</style>

<div class:featured>
  <h2>{title}</h2>
  <p>
    <slot />
  </p>
</div>

It plays well with preprocessors

CSS preprocessors feels a lot less necessary when working with Svelte, but they can work perfectly alongside one another by making use of a package called Svelte Preprocess. Support is available for Less, Stylus and PostCSS, but here we'll look at Sass. The first thing we need to do is to install some dependencies:

npm install -D svelte-preprocess node-sass

Then we need to import autoPreprocess in rollup.config.js at the top of the file.

import autoPreprocess from 'svelte-preprocess';

Next, let’s find the plugins array and add preprocess: autoPreprocess() to Svelte:

export default {
  plugins: [
    svelte({
      preprocess: autoPreprocess(),
      ...other stuff

Then all we need to do is specify that we’re using Sass when we’re working in a component file, using type="text/scss" or lang="scss" to the style tag.

<style type="text/scss">
  $pink: rgb(200, 0, 220);
  p {
    color: black;
    span {
      color: $pink;
    }
  }
</style>

Dynamic values without a runtime

We’ve seen that Svelte comes with most of the benefits of CSS-in-JS out-of-the-box — but without external dependencies! However, there’s one thing that third-party libraries can do that Svelte simply can’t: use JavaScript variables in CSS.

The following code is not valid and will not work:

<script>
  export let cols = 4;
</script>

<style>
  ul {
    display: grid;
    width: 100%;
    grid-column-gap: 16px;
    grid-row-gap: 16px;
    grid-template-columns: repeat({cols}, 1fr);
  }
</style>

<ul>
  <slot />
</ul>

We can, however, achieve similar functionality by using CSS variables.

<script>
  export let cols = 4;
</script>

<style>
  ul {
    display: grid;
    width: 100%;
    grid-column-gap: 16px;
    grid-row-gap: 16px;
    grid-template-columns: repeat(var(--columns), 1fr);
  }
</style>

<ul style="--columns:{cols}">
  <slot />
</ul>

I’ve written CSS in all kinds of different ways over the years: Sass, Shadow DOM, CSS-in-JS, BEM, atomic CSS and PostCSS. Svelte offers the most intuitive, approachable and user-friendly styling API. If you want to read more about this topic then check out the aptly titled The Zen of Just Writing CSS by Rich Harris.

The post What I Like About Writing Styles with Svelte appeared first on CSS-Tricks.

Seven VPN Strategies to Secure Your Data

Companies that have given access to their network to their employees as well as contractors through VPNs, or at least through their free VPN trial versions, may witness an immediate boost in their productivity levels but find it tricky to keep their network secure.

This is because their network becomes even more vulnerable and easily accessible to attackers and hackers. So, if you are worried about the security of your data, then take a look at these seven VPN strategies for securing your data. 

Graph Model of Facebook Post Reactions in Neo4j Part 1

I was watching Neo4j's Online conference, conveniently named NODES 2019, and stumbled into a great presentation titled, "Tuning Cypher" by Andrew Bowman. I highly recommend you to check it out.  It inspired me to write my own blog post about cypher query optimizations.

In this blog post, we will take a look at how to model Facebook posts and users’ reactions to them. As some of you might know, there are six different types of reactions available on Facebook today: