CSS Grid Layout Terminology, Explained by Ire Aderinokun

Ire Aderinokun:

CSS Grid Layout introduces a lot of new concepts; there are 17 new properties to learn, and many more new terms to understand. This can make getting started with CSS Grid Layout difficult, as new terms reference other terms and you can get into a spiral of confusion. So, here are the basic concepts and terminology of CSS Grid Layout, explained.

Yep, the learning curve might be steep to learn this, but it’s important to do it. As Ire goes through the different properties, it’s easy to see how amazing CSS Grid is, and how much it will simplify our life. Don’t wait till “it’s more widely supported.” Learn it now, and the investment will be worth it. CSS Grid is coming.

This next part confused me, but after thinking about it more, it made sense.

.outlined {
  grid-area: outlined;
  border: 2px solid purple;
}

.grid-container {
  display: grid;
  grid-template-areas: "outlined outlined ."
                       "outlined outlined ." 
                       ". . ."; // The last one is empty because it's not part of the outlined grid area.
  grid-template-columns: 100px 100px 100px;
  grid-template-rows: 100px 100px 100px;
}

Each outlined corresponds to the first and second column, and the first and second row thereby creating a 200px×200px square. I’ve created a CodePen if you want to play around with it.

See the Pen ggBYzE by Tim Smith (@timothybsmith) on CodePen.

Version 5.1.0

Notes on the latest release

I’ve been doing some work on the site, and wanted to loop you in.

Bug Fixes

  • Update protocol on gravatar images (#168)
    Gravatar images were using http instead of https and that weakens the security of the site.
  • Update Bold Report avatar image in head (#171)
    There’s an image that the site passes to Twitter and Facebook when you share something, I’d completely forgotten to update this image with the new orange color.

Development Fixes

  • Switch to Google Analytics tracking code (#170)
    Previously, I was using a service called Segment to serve the analytics I wanted to use. I didn’t get much value from using what is essentially a middleman. I was using Google Analytics with Segment, and now I’m just using Google Analytics straight from Google.
  • Add jTag templates (#172) Since been removed.
    I was really excited to find Brett Terpstra’s jTag and thought it would be the ideal solution for me. I played around with it, and unfortunately I couldn’t get it to work. I’ve filled an issue, and hope Brett is able to look into it.

Site Enhancements

  • Redesign the Topics Page (#169)
    When I worked on version five, I didn’t really pay much attention to the topics page. I decided to revisit this page, and put it in the main navigation. I think topics will help you find more about topics you’re interested in. Working on this page reminded me how much content there is on here about a wide variety of topics.
  • Typogrify (#173)
    I found this great Jekyll plugin called jekyll-typogrify which gives you access to some great filters. One of them allows me to style all caps differently. For example, I can now write CSS, HTML, RSS, etc. without ruining the flow of the line. But that’s only one of the awesome filters it comes with. If you use Jekyll I highly recommend you check it out.

  • Add share buttons (#174)
    For a long time I’ve decided to refrain from having sharing buttons at the bottom of posts. I foolishly felt I was standing for some “moral highground.” I realized I didn’t understand what that so-called highground even meant. Plus, I was reading something on someone’s site the other day, and was frustrated without an easy way to share. So I’ve added sharing buttons. Share away!

If you normally, read via your RSS reader, I encourage you to visit the site today. Send me an email, and tell me what you think.

LG Has Redesigned Its 5K Mac Monitor So It Can Handle Being Placed Near a Router | Recode

Ina Fried reporting for Recode:

LG has found a fix for a problem that left its high-end Mac monitor unable to work properly when placed within a few feet of a router.

An LG spokesman told Recode that the company is adding additional shielding to newly manufactured models.

As it is, the options in the display space are pretty slim, but now this? How embarrassing. With the experience LG has making monitors, it feels downright stupid. I hope this ordeal gets Apple to rethink it’s departure from the display business.

Introducing Dropbox Smart Sync and New Collaboration Tools | Dropbox Business Blog

Rob Baesman on the Dropbox Business Blog:

As more people work together in teams, the need for storage space grows exponentially. This presents big challenges. But with our new Smart Sync feature, users can see all their files and folders right from their desktop, whether they’re stored in the cloud or synced locally.

Users working with just 128 GB of hard drive space can easily comb through terabytes of files to find exactly what they need—right from Windows File Explorer or macOS Finder. Now, they won’t need to take extra steps—like switching to a web browser—just to view files. And whenever they need to access files stored in the cloud, users can download them with a quick double click.

This is an unfortunate, bittersweet situation. While it’s great to see Smart Sync finally available (what Dropbox used to call Project Infinite), it’s a shame it’s only available for business users at the moment. I’d been thinking of upgrading to Dropbox for Business, but they make you pay for five licenses out of the gate. I’m not about to pay for three licenses I don’t need. I hope they make this feature available for their individual plan soon.

My Favorite TextExpander Snippets

Let’s begin exploring automation with these simple and helpful keyboard shortcuts

This post is part of a series on creating automation heaven.


One of the reasons I love technology is tinkering with it to make my life easier. I’m constantly automating tasks so I can either do them faster, or not have to worry about them at all. I felt writing a series on automation would be a lot of fun, not only because I love to geek out about stuff like this, but it might also be helpful to you.

For our first exploration into automation, we’ll start with TextExpander. For those of you who don’t know, TextExpander is an app that expands custom keyboard shortcuts into text or images. For example, you could type ;home, and it would expand into your full home address. A simple example, but I’m sure you can see how helpful it would be over time.

What’s greater, I can use TextExpander anywhere: on my Mac, iPad, and iPhone. Heck, TextExpander is on Windows too. With that in mind, I’d love to share some of my favorite TextExpander snippets.

Day One

Day One is an excellent journaling app. I love to keep a daily journal, as well as movie and restaurant reviews. In fact, together with IFTTT I automatically import Swarm check-ins and Instagram Photos, but that’s for another article.

By typing ;foodreview, I get a form that asks me if I’d go back, how pricey the restaurant was, who I went with, what I ordered, and a general summary.

Ever go back to a restaurant you really liked, but don’t remember what you ordered? No longer!

My movie review snippet is similar. By typing ;moviereview, I easily log movies I’ve watched. Some of those movies end up getting their own brief review here on The Bold Report, but for those that don’t, my thoughts are recorded somewhere. This one was originally made by David Sparks, but I modified it and formatted a few things in Markdown.

I watch a lot of movies, so giving these reviews some structure is very helpful.

My last Day One snippet is an end of the day summary. I downloaded this snippet from Chuck Grimmett and modified them for my use. I only do this once a day in the evening and it helps me remember key things that happened that day. A little reflection each day feels healthy to me, and reminds me there is so much to be grateful for.

This is so easy to fill out, and helps me reflect on the day

Download my Day One snippets.

Jekyll

For all the work that I do with Jekyll, you might be shocked to hear that I only have one snippet in this category. I probably need more, but I haven’t figured them out yet. The one I do have though, is ;jdate. This simple snippet expands into the date format needed in Jekyll posts, which looks like this:

# YEAR-MONTH-DAY HOUR:MINUTE (using the 24 hour clock)
date: 2017-02-03 12:39

This one snippet has saved me hours in the now 3 years I’ve been using it! I don’t have to remember the format, think about what the date is, or remember how you write four o’clock in the 24 hour clock.

Special Characters

TextExpander publishes Public Groups which you can subscribe to, and one of them is Accented Words. For example, I can type cafe' and it’ll expand into café. I write Spanish occasionally, so I’ve added some common used words with accents so I don’t have to worry about them.

Another use for this group is making it easier to type out modifier key symbols. Let’s say you wanted to write out ⌘⇧W. It’s a pain to remember how to type those characters, and I found myself having to Google search, then copy pasting them over and over. With TextExpander, I’ve matched each character with its own shortcut. ;command, ;shift, ;option, and ;control, all expand to the ⌘, ⇧, ⌥, and ⌃ symbols.

Code

When it comes to writing code, autocompletion has come a long way. I had to whiteboard a week ago, and realized I’m useless without my code editor. Atom autocompletes everything for me. Emmet is a huge help too. However, the one coding snippet I use is to create a comment block in SCSS. By typing ;bcomm, it expands into this:

// -------------------------------
// SECTION NAME HERE
// -------------------------------

It helps me keep my comment style consistent, and saves me time.

General

My general snippets group is usually where I put snippets that don’t belong in any of my other groups. Like :shrug: which expands into ¯\_(ツ)_/¯. For some reason, I seem to use this one a lot. Mostly to answer questions like “What should we do for dinner?” It drives Kelly nuts.

I also have one for 🖖🏼 (probably my most used emoji), which is just :spock:. Snippets for my email address and phone number are extremely useful too. You’d be shocked by how much you have to type those last two.

Conclusion

These are just some of my uses for TextExpander. The possibilities are endless, and I hope you see the ways you’d use it.

If you enjoyed this post and would like to talk more about TextExpander, have questions, or share all the cool ways you use it, send an email to tim@theboldreport.net.

Five Ways to Automate Your Day One Journal with TextExpander | Day One Blog

Josh Ginter on the Day One Blog:

With TextExpander’s potential in mind, the app becomes a natural fit for creating consistency, structure, and organization inside Day One. I have a plethora of quick Day One-specific snippets to help track fitness, time, reviews, and other personal bits of information I’ll want to draw on again in the future.

Here are five ways (and then some) to use TextExpander to make short work of journal templates in Day One.

There seems to be a bit of a theme here today, eh? If you use Day One like I do, using TextExpander to help you journal is a no brainer. I’ve found that I don’t do amazing things every day that make me want to write about them, but some of these snippets help me write things I’ll then be able to look back on fondly.

Automating Deeper With Keyboard Maestro | Six Colors

Jason Snell on Six Colors:

I write a lot about automating repetitive computer tasks, but most of my history with automation has involved using AppleScript (and later, Automator) to control applications. The fact is, many Mac apps—and more every day!—aren’t really accessible via scripting interfaces. It’s been a black hole of automation for me, a no-go zone, but a little while ago I decided I was wasting time with some of the tasks I perform every week and I was going to dive in and take control of the situation, scripting be damned.

My tool of choice was Keyboard Maestro, which I bought to remap a bunch of keystrokes for my weird clicky keyboard. It’s an impossibly powerful utility that, among other things, lets you automate user-interface actions.

I love posts like this. There are so many things you do over and over, which end up taking up a lot of time. Thankfully there are increasingly more ways to automate all those tasks.

A Simple Use of CSS Grid

You might’ve heard of CSS Grid, now let’s get our feet wet

You might’ve heard awesome people like Rachel Andrew and Jen Simmons advocating for the use of CSS Grid. If you haven’t, I recommend you follow Jen and Rachel on Twitter. You should watch this talk, and this one too.

But, you might also feel that you don’t know where to get started. How do you learn it? Well, Rachel has made this great series of screencasts on Grid. But once you know some of the basics, it may be difficult to decide where to use it. Well, I was playing around the other day, and came across a pretty simple and easy example.

Let’s say you want two columns. I was working on basic two column layout for my resume on my site. The layout for that is essentially this:

Pretty simple right? A main column and a sidebar.

Till now, we’ve used hacks using Float and even Flexbox to make this layout possible. Funnily enough, even Flexbox isn’t the ideal solution for this layout, it’s actually Grid. Using Flexbox, you’d have to code it up something like this:

<div class="wrapper">
  <section class="main-column">
    Your content here.
  </section>

  <aside class="sidebar">
    Your sidebar content here.
  </aside>
</div>

And the CSS would be something like this:

.wrapper {
  display: flex;
}

.main-column {
  width: 70%;
  /* Let's get around the box-model and use padding */
  padding-right: 2rem;
}

.sidebar {
  width: 30%;
}

This is the barebones stuff. This solution needs 10 lines of code for the basics of our layout. Now let’s do it with Grid with 3 lines.

.wrapper {
  display: grid;
  grid-template-columns: 70% 30%;
  grid-gap: 2rem;
}

That’s it. Grid looks intimidating, but it’s simplicity and versatility will become an amazing tool for us. Now, since Grid’s support is behind browser flags right now, let’s rewrite this with a fallback.

/* If the browser supports Grid, it'll use this */
@supports (display: grid) {
  .wrapper {
    display: grid;
    grid-template-columns: 70% 30%;
    grid-gap: 2rem;
  }
}

/* If the browser does not support Grid, it'll use this */
@supports not (display: grid) {
  .wrapper {
    display: flex;
  }

  .main-column {
    width: 70%;
    padding-right: 2rem;
  }

  .sidebar {
    width: 30%;
  }
}

Pretty cool huh? If you have any questions or would like to discuss it further, send me an email.