Articles

REM vs EM – The Great Debate

Published on:

One of the best practices to typography on the web is to use relative units like rem and em.

The question is, which should you use? There's been a longstanding debate between rem supporters and em supporters, believing that you should use one over the other.

In this article, you're going to find my take on rem vs em. You're also going to learn exactly what rem and em are, and how to use them to build modular components.

Star Rating Re-imagined with Flexbox

Published on:

The rating element is one UI pattern that you'll find everywhere on the web. I found myself building another rating element for the second time in my life a few weeks ago.

Since it's my second time working on the same element, I wanted to challenge myself to come up with a way that uses as little code as possible. Consequently, I managed to come up with a way to build the rating element with only 50 lines of code (HTML, CSS and JavaScript combined), which is incredibly sweet! This article shows how I did it.

Everything I know about Responsive Web Typography

Published on:

Responsive typography is a tough nut to crack. This was the best method I could come up with when I first started creating responsive websites:

p {
  font-size: 16px;
}

@media (min-width: 800px) {
  p {
    font-size: 18px;
  }
}

/* Repeat for h1 - h6 and other type groups */

I've learned a lot more about typography since then and picked up best practices like using relative units, vertical rhythms and meaningful typography scales.

These new practices were wonderful. They made my websites look more pleasing to the eye. Implementing them, however, was a horrible experience.

I had to write complex code and I found myself struggling to create responsive websites under tremendous time pressure.

Now, after months of hacking, I've finally created a solution that I'm happy to share with you. It's called Typi.

Typi is great because it allows me to use the practices I've learned, and at the same time solves most of the problems I've encountered in 3 simple steps. Let me explain these three steps by walking you through the practices I use when working with responsive typography.

Year End Review – 2015

Published on:

2015 has gone by in just a blink of an eye. I realized that I haven't been taking stock of my life for the past 27 years. So, I decided to do a year-end review for the first time to end 2015 completely, and the begin 2016 anew.

Animating SVGs (CSSConf.Asia talk)

Published on:

I gave a talk about animating SVGs in CSSConf.Asia 2015. The video is finally ready and I'm super stoked to share it with you! Have a look and let me know what you think! :)

<Youtube id='6fdIva47wZE' title='Animating SVGs' />

Trolls & Expert Opinions – Lessons Learned From Publishing on a Popular Website

Published on:

I recently published an article on Smashing Magazine. For those who don't know, Smashing Magazine is a well respected website in the design and development world. It's kind of like Lifehacker or Tiny Buddha, but for web designers and developers.

I was incredibly proud of the article I published. It took weeks of effort and I was elated that I made a contribution to the world. I went to sleep feeling awesome about it.

Unfortunately, I woke up feeling horrified when I looked at my twitter notifications the next day. Many people (mostly whom I don't know) commented on my article, saying how "the author doesn't know what he's talking about", that "it was a bad article".

Even people whom I know and respect said that they felt "confused and bizzare" that an article like mine appeared on a well-curated website like Smashing Magazine, and they were "getting worried" about the contents of the article.

The same happened under the comments section on Smashing Magazine as well.

What a great start to the day. What would you have felt, or did?

Website Layout Tools Compared—Flexbox Vs. Susy

Published on:

Flexbox has become one of the most popular tools for creating website layouts. Susy is another layout tool that has gained popularity with the Sass community over the last few years.

Many developers I’ve spoken with are unsure which tool is best for creating layouts for their websites. Some feel that flexbox is powerful enough to handle all of their layout problems. However, they are unsure whether to learn it because of its confusing syntax. Others feel that Susy is much simpler and prefer its simplicity to flexbox.

Overcoming Your Fears

Published on:

"Thanks for helping to organize Devfest.Asia!" Someone said to me as the largest community-organized web developer festival in South-east Asia draws to a close. "I really enjoyed it!".

I should be happy when I hear things like this. Right? Well, I thought so too. But I didn't feel it.

Deep down inside, instead of happiness, I feel a stab of pain whenever someone thanked me for organizing Devfest.Asia.

Strange, isn't it? I couldn't explain this feeling for a long time.

Now, I finally understood what has happened, and how it affects my life. I'd like to share this story since it might affect yours positively too.

Note: This would be an interesting read if you are someone who constantly feels you're not good enough, or you haven't done enough. For the rest, you can stop reading here now.

Migrating From Bootstrap to Susy

Published on:

One of the most asked questions I get about migrating from Bootstrap to Susy is this: "How do I build a Bootstrap-like grid with Susy?"

I feel that if I answer this question, I'll be leading you down a path that I don't agree with. That's why I hesitated with answering this question previously.

In this article, I want to tell show you why this is a wrong question to ask, and what to do instead.

What to add to your Gitignore File

Published on:

What files should you push up into a Git repository? What files should you ignore? These are two questions that plague most beginners when they're learning about Git.

We're going to explore these two questions in this article so you'll never have doubts on whether you should ignore a file in the future.

How to Modularize HTML Using Template Engines and Gulp

Published on:

Template Engines are tools that help us break HTML code into smaller pieces that we can reuse across multiple HTML files. They also give you the power to feed data into variables that help you simplify your code.

You can only use template engines if you had a way to compile them into HTML. This means that you can only use them if you're working with a backend language, or if you're using client-side JavaScript.

However, with Node.js, we can now harness the power of template engines easily through the use of tools like Gulp.

That's what we're going to cover today in this chapter. We're going to find out what template engines are, why we should use them, and how to set one up with Gulp.

Gulp for Beginners

Published on:

Gulp is a tool that helps you out with several tasks when it comes to web development. It's often used to do front end tasks like:

  • Spinning up a web server
  • Reloading the browser automatically whenever a file is saved
  • Using preprocessors like Sass or LESS
  • Optimizing assets like CSS, JavaScript, and images

This is not a comprehensive list of things Gulp can do. If you're crazy enough, you can even build a static site generator with Gulp (I've done it!). So yes, Gulp is extremely powerful, but you'll have to learn how to use Gulp if you want to create your own customized build processes.

So that's what this article is for. It helps you get so good with the basics of Gulp that you can begin exploring everything else for yourself.

A Gulp.js Tutorial (Part 2)

Published on:

Last week, we set up a simple gulp task to convert Sass into CSS. We also touched on how to watch the styles.scss file for changes and how to reload the browser automatically with Browser Sync.

In this article, we're going to dive further into the sass task to find out how to watch more than one file for changes, and how to customize options for the plugins that we have used.

Let's get started.

A Gulp.js Tutorial

Published on:

Gulp is a build tool that helps you automate your development workflow. In this article, we will dive deep into Gulp to show you how to use it effectively to create a simple workflow.

Let's get started.

Choosing a Build Tool

Published on:

Choosing to use one tool over another is one of the largest challenges developers face. Regardless of what you're choosing, be it a code editor, a framework, or even a build tool. It's never an easy decision.

When it comes to build tools, the two most popular options right now are Grunt and Gulp. But are these the only two you should choose from? If not, what other choices do you have?

Let's answer this question.

Overcoming your Fear of the Command Line

Published on:

Most tools that help you automate your workflow require the use of the command line. Hence, the first obstacle you have to overcome is getting comfortable with the command line.

But the command line is scary.

Playing with it feels like you're dismantling a bomb that could go off any moment. One wrong move and that'll mean the end of your life, and your computer.

I didn't dare to touch it when I first began to code. I felt that the command line was a tool that only experts could use.

However, as I got to know more about it, I began to realize that the command line isn't scary at all! It's incredibly safe, even for beginners, and anyone can use it to help improve their workflow.

In this article I'll show you why the command line isn't that scary, and how to start to get comfortable with it.

Ready to go? Let's begin!

Manage your Frontend Dependencies with Bower

Published on:

Bower is a great dependency manager that's specially created to help you manage different frontend libraries.

It reduces the time and energy you need to spend hunting around the web for libraries like Susy and jQuery by helping you install, update or delete them with a single command.

To top it off, it can help you download all the libraries you need whenever you scaffold a new project with a single command.

In this article we'll talk about how to install Bower and how to use it.

An Overview of a Development Workflow

Published on:

A good workflow is crucial for development because it saves time. We know this, and yet we constantly procrastinate this important task.

We can't blame ourselves really. New technologies pop up and we have no idea how to use them. The web industry moves too fast and sometimes causes us to be completely overwhelmed.

So for the first post in the workflow series, I wanna show you what a development workflow is, and how to automate different parts of the workflow.

Common Problems With Susy Gallery And How To Solve Them

Published on:

Susy has a gallery() mixin that helps us create galleries easily. It abstracts away a lot of complexity. Because of this abstraction, it sometimes leaves people puzzled about why something isn't working. This often boils down to two problems.

This post reveals the two problems and shows you how to solve them.

Why I stopped blogging, and what do you want to read about next?

Published on:

I have only written about Susy since the release of Learning Susy a few months ago. I've been working on the update since then and now that it's finally complete, I wanna move on to a new topic.

There are 3 themes that I'm interested to explore and I'll need your help in choosing which one to work on.

But first, let me be completely honest to you about my feelings for the past few months.