Challenge: Heading Keyline

Front-End Challenges Club - Challenge #007

Keylines are a great traditional graphic design trick to frame a heading. Historically, they’ve been a bit fiddly on the web, so for this challenge, we’re going to try to change that.

What you’re building permalink

A heading with keyline that reads "keylines look dope"

The brief permalink

Take the design assets and build a flexible, keyline component that frames text. This would probably be mostly for headlines, but it could work for short summaries too.

You should aim for the following:

  • Your solution is progressively enhanced
  • It works well if there is a small amount of text or a larger amount of text
  • Make sure your keyline never interferes with the text content

Assets permalink

I’ve used Sketch to design this challenge. You can view everything you need in the browser, here.

Here’s some assets to get you going:

Here are some CSS Custom Properties for your colours:

Code language
:root {
  --color-dark: #1c2334;
  --color-light: #fcf3e1;
  --color-primary: #e9b44c;

Wrapping up permalink

When you’ve tried building this one for yourself, head over to the solution to see how I built it!

See you at the next one 👋


If you liked this post, you might like these ones, too

  1. Solution: Tabs

    Front-End Challenges Club - Solution #005

  2. Solution: Progress Button

    Front-End Challenges Club - Solution #004

  3. Solution: Toggle switch

    Front-End Challenges Club - Solution #002


Become a supporter by joining the Piccalilli Membership

For $5 per month, you get access to a private, friendly Discord community, a regular newsletter, huge discounts on courses and free access to all premium tutorials.

Most importantly, by becoming a supporter, you help make as much content, free-to-everyone as possible on this site, which benefits everyone. As a member, you also get an ad-free experience around the site.

Support Piccalilli by becoming a member

Sign up for updates

Stay up to date with updates from Piccalilli. You’ll get alerted as soon as any new content gets published. You’ll also get updates on upcoming courses and membership features! You can unsubscribe at any time, too.