Skip to main content

DCUS Style & Pattern Guide

Logo files

Logos are stored on GitHub in the resources repository.

Typography

The default font stack is defined in tailwind.config.js. Long form text uses prose, and all other sizing is done with utility classes, specific to its use case. There are a few key sizing helper classes.

Typography is based on Poppins.

Page heading, used in heroes

Sub heading, used on page sections

Lead, used in support of page headings or sub heading

`.font-heading` sets type properties for a generic heading

<div class="space-y-8">
  <h1 class="pageheading">Page heading, used in heroes</h1>
  <h2 class="subheading">Sub heading, used on page sections</h2>
  <p class="lead">Lead, used in support of page headings or sub heading</p>

  <h3 class="font-heading">`.font-heading` sets type properties for a generic heading</h3>
</div>

Links

Occasionally developers may need to specify a link or change a link's behavior.

<ul class="space-y-6">
  <li><a href="#">Link</a>
  <li><button class="link">Button link, using <code>.link</code></button></li>
  <li><a href="#" class="reverse-link">Reverse-link, using <code>.reverse-link</code></a></li>
</ul>

Prose styles

Prose is a utility class that sets type properties for long form text.

It is used for body copy, blog posts, and other long form text.

It can also be used if you need a generic set of good type styles, or are planning the "unknown copy".

Heading 1, shouldn't be used in prose

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
  • List item 1
  • List item 2
  • List item 3
  1. Numbered item 1
  2. Numbered item 2
  3. Numbered item 3

Link

Image
Figure caption
<div class="prose prose-lg">
<p>Prose is a utility class that sets type properties for long form text.</p>
<p>It is used for body copy, blog posts, and other long form text.</p>
<p>It can also be used if you need a generic set of good type styles, or are planning the "unknown copy".</p>

<h1>Heading 1, shouldn't be used in prose</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>

<ol>
<li>Numbered item 1</li>
<li>Numbered item 2</li>
<li>Numbered item 3</li>
</ol>

<p><a href="#">Link</a></p>

<p><button>Button</button></p>

<figure>
  <img src="https://picsum.photos/800/600" alt="Image">
  <figcaption>Figure caption</figcaption>
</figure>
</div>

Colors

The full color palette is configured in tailwind.config.js. The following is a full list of all defined colors and their shades. Note that Tailwind does not provide all of these classes unless used in source files (not compiled output).

red

Shade Color Class
50 #fef3f2 .bg-red-50
100 #fde4e3 .bg-red-100
200 #fdcdcb .bg-red-200
300 #faaba7 .bg-red-300
400 #f57a74 .bg-red-400
500 #eb5048 .bg-red-500
700 #b52720 .bg-red-700
800 #96241e .bg-red-800
900 #7d241f .bg-red-900
950 #440e0b .bg-red-950
DEFAULT #db433b .bg-red

orange

Shade Color Class
50 #fef7ee .bg-orange-50
100 #fdeed7 .bg-orange-100
200 #fad9ae .bg-orange-200
300 #f7bd7a .bg-orange-300
500 #ef7920 .bg-orange-500
600 #e15f15 .bg-orange-600
700 #ba4714 .bg-orange-700
800 #943a18 .bg-orange-800
900 #783116 .bg-orange-900
950 #40160a .bg-orange-950
DEFAULT #f39745 .bg-orange

blue

Shade Color Class
50 #eff8ff .bg-blue-50
100 #daeeff .bg-blue-100
200 #bde3ff .bg-blue-200
300 #90d2ff .bg-blue-300
400 #5cb8fe .bg-blue-400
600 #207af0 .bg-blue-600
700 #1864dd .bg-blue-700
800 #1a50b3 .bg-blue-800
900 #1b478d .bg-blue-900
950 #152c56 .bg-blue-950
DEFAULT #3d9cfb .bg-blue

light-blue

Shade Color Class
50 #f0f8ff .bg-light-blue-50
100 #e0f0fe .bg-light-blue-100
200 #bbe2fc .bg-light-blue-200
400 #3ab1f6 .bg-light-blue-400
500 #1098e7 .bg-light-blue-500
600 #0478c5 .bg-light-blue-600
700 #0460a0 .bg-light-blue-700
800 #085284 .bg-light-blue-800
900 #0d446d .bg-light-blue-900
950 #092b48 .bg-light-blue-950
DEFAULT #5fbffa .bg-light-blue

purple

Shade Color Class
50 #fbf8fc .bg-purple-50
100 #f5eff8 .bg-purple-100
200 #eee1f3 .bg-purple-200
300 #e0cae8 .bg-purple-300
400 #cca7d9 .bg-purple-400
600 #a269b4 .bg-purple-600
700 #8b559b .bg-purple-700
800 #744980 .bg-purple-800
900 #5e3c67 .bg-purple-900
950 #412249 .bg-purple-950
DEFAULT #b989c9 .bg-purple

green

Shade Color Class
50 #f2f9ec .bg-green-50
100 #e2f1d6 .bg-green-100
200 #c8e5b1 .bg-green-200
300 #a6d284 .bg-green-300
400 #84bf5c .bg-green-400
600 #4d822e .bg-green-600
700 #3d6427 .bg-green-700
800 #345024 .bg-green-800
900 #2e4522 .bg-green-900
950 #15250e .bg-green-950
DEFAULT #64a03d .bg-green

yellow

Shade Color Class
50 #fcf8ea .bg-yellow-50
100 #f8efc9 .bg-yellow-100
200 #f2dd96 .bg-yellow-200
400 #e2aa2d .bg-yellow-400
500 #d29420 .bg-yellow-500
600 #b57219 .bg-yellow-600
700 #915217 .bg-yellow-700
800 #79421a .bg-yellow-800
900 #67381c .bg-yellow-900
950 #3c1c0c .bg-yellow-950
DEFAULT #e7bb43 .bg-yellow

Icons

Icons are used to visually communicate an action or idea. The .icon class can be applied to give them a consistent width and height. Additional height and width classes can be applied to change their sizing, e.g. w-12 h-12.

Icon Path
/assets/img/theme/icons/Bag.svg
/assets/img/theme/icons/Bull.svg
/assets/img/theme/icons/Checklist.svg
/assets/img/theme/icons/Compass.svg
/assets/img/theme/icons/Document.svg
/assets/img/theme/icons/Globe.svg
/assets/img/theme/icons/Hands.svg
/assets/img/theme/icons/Hat.svg
/assets/img/theme/icons/Heart.svg
/assets/img/theme/icons/Megaphone.svg
/assets/img/theme/icons/Money.svg
/assets/img/theme/icons/People.svg
/assets/img/theme/icons/Prompt.svg
/assets/img/theme/icons/Star.svg
/assets/img/theme/icons/Triangle.svg

Buttons

Buttons are created by applying .button to an element. The button class is a utility class that applies padding, border, and background color.

The button class can be combined with other utility classes to create different button styles. Changing button colors requires changing the background color, e.g. bg-blue to create a blue button.

<div class="flex flex-wrap gap-4">
  <a href="#" class="button">Button Text</a>
  <a href="#" class="button bg-blue">Button Text</a>
  <a href="#" class="button bg-light-blue">Button Text</a>
  <a href="#" class="button bg-green">Button Text</a>
  <a href="#" class="button bg-purple">Button Text</a>
  <a href="#" class="button bg-orange">Button Text</a>
  <a href="#" class="bg-yellow-100 button">Button Text</a>
  <button class="bg-green-300 button">Button Text</button>
  <button class="text-white bg-blue-900 button">Button Text</button>
</div>

Badges

Badges are used to indicate status, denote a count, or to draw attention to an element. Badges are created by applying .badge to an element. Colors may be changed by applying a background color utility class, e.g. bg-blue to create a blue badge.

๐Ÿ›œ Free Wi-Fi ๐Ÿง‘โ€๐Ÿ’ป Room for hallway hacking ๐Ÿ™๏ธ In the middle of downtown
<div class="flex flex-wrap gap-2">
  <span class="badge">๐Ÿ›œ Free Wi-Fi</span>
  <span class="badge">๐Ÿง‘โ€๐Ÿ’ป Room for hallway hacking</span>
  <span class="badge">๐Ÿ™๏ธ In the middle of downtown</span>
</div>

Alerts

Attention!

If you try to book and the website says the capacity is full, please call the hotel to try to book your room. You may need to mention that you're with the DjangoCon US group.

<section class="p-4 bg-orange-100 rounded">
  <h3 class="mb-4 text-lg font-bold font-heading lg:text-2xl">Attention!</h3>
  <div class="prose prose-lg">
    <p>If you try to book and the website says the capacity is full, please call the hotel to try to book your room. You may need to mention that you're with the DjangoCon US group.</p>
  </div>
</section>

Forms

  • T-shirt Size
  • Interests
<form class="max-w-2xl p-4 mx-auto bg-white rounded lg:p-12" method="POST">
  <ul class="space-y-6">
    <li>
      <label for="fullname">Full Name</label>
      <input type="text" name="fullname" id="fullname" placeholder="Your name" required>
    </li>
    <li>
      <label for="email">Email</label>
      <input type="email" name="email" id="email" placeholder="Your email" required>
    </li>
    <li>
      <label for="password">Password</label>
      <input type="password" name="password" id="password" placeholder="Your password" required>
    </li>
    <li>
      <fieldset>
        <legend>T-shirt Size</legend>
        <label for="size-small">
          <input type="radio" name="gender" id="size-small" value="small" required>
          Small
        </label>
        <label for="size-medium">
          <input type="radio" name="gender" id="size-medium" value="medium" required>
          Medium
        </label>
        <label for="size-large">
          <input type="radio" name="gender" id="size-large" value="large" required>
          Large
        </label>
      </fieldset>
    </li>
    <li>
      <fieldset>
        <legend>Interests</legend>
        <label for="interest-django">
          <input type="checkbox" name="interests" id="interest-django" value="django">
          Django
        </label>
        <label for="interest-python">
          <input type="checkbox" name="interests" id="interest-python" value="python">
          Python
        </label>
        <label for="interest-ml">
          <input type="checkbox" name="interests" id="interest-ml" value="ml">
          Machine Learning
        </label>
      </fieldset>
    </li>
    <li>
      <label for="country">Country</label>
      <select name="country" id="country" required>
        <option value="">Select your country</option>
        <option value="us">United States</option>
        <option value="ca">Canada</option>
        <option value="uk">United Kingdom</option>
        <option value="au">Australia</option>
      </select>
    </li>
    <li>
      <label for="message">Message</label>
      <textarea name="message" id="message" placeholder="Your message" required></textarea>
    </li>
  </ul>

  <div class="mt-8">
    <button id="submit" type="submit" class="button bg-light-blue">Submit</button>
  </div>
</form>

Blocks & Grids

Blocks and grids are the building blocks of the website. They help to organize content and create a visual hierarchy.

There are a few key classes to use when shaping blocks:

  • .block-container - The outermost container for a block. This class sets the padding for the block.

  • .wrapper - The inner container for a block. This class sets the maximum width and centers the content.

Background colors and effects may be applied to .block-container to differentiate them.

Use Tailwind's grid classes to create a grid layout inside .wrapper.

Content goes here.

Gray block with modified padding.

Column 1
Column 2
<div class="block-container">
  <div class="wrapper">
    <p>Content goes here.</p>
  </div>
</div>

<div class="py-8 bg-gray-100 block-container lg:py-10">
  <div class="wrapper">
    <p>Gray block with modified padding.</p>
  </div>
</div>

<div class="block-container bg-blue">
  <div class="wrapper">
    <div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
      <div class="p-4 bg-gray-100">Column 1</div>
      <div class="p-4 bg-gray-200">Column 2</div>
    </div>
  </div>
</div>