Calcite Web: Deep Dive

An overview of the design and implementation of Calcite Web

Design Characteristics of Calcite Web

Flat (Mostly)

No embossing, no crazy drop shadows, no skeuomorphism

Tooltip

Table Header 1 Table Header 2 Table Header 3
a b c
x y z

Neutral Colors

Most UI elements are accomplished in grayscale

Tab 1 section

Tab 2 section

Tab 3 section

Meaningful Color

Color must be used with purpose.

How can color be used?

  1. Show state
  2. Encourage Action
  3. Explain success and failure

1. Show State

Pagination
Focus States

2. Encourage Action

Buttons and Links
ButtonClear ButtonAlso Links

Card with Colored Bar

Blue is used to call attention to the card itself (with a colored bar), and also to encourage action with the button below.

Card Action

3. Explain Success and Failure

Red and green are generally used to indicate error and success, respectively

Inputs

Alerts

Successful message
Error message

Labels

standard labelerror labelsuccess label

Simple, "With the Grain"

Try to keep it simple and go "with the grain" of the web.

Email Preferences (optional)
How did you hear about us? (optional)

Straight Lines, Square Corners

Generally UI elements don't have a border radius

Open

Use ample white space to make designs welcoming.

Bad

This is a paragraph that has the margin intentionally set to 0 in order to demonstrate how un-Calcified it looks.

Text in button with no padding

Good

This is the standard paragraph styles. As you can see, it has quite a bit of margin built in so that content has room to breath.

Normal Button

Type Scale

A double-stranded modular scale allows for flexibility without craziness

Size Example
-2Hamburgefontsiv
-1Hamburgefontsiv
0Hamburgefontsiv
1Hamburgefontsiv
2Hamburgefontsiv
3Hamburgefontsiv
4Hamburgefontsiv
5Hamburgefontsiv
6Hamburgefontsiv
7Hamburgefontsiv
8Hamburgefontsiv

Rational Grid

Flexible, responsive grid based on viewport widths

Phone

Tablet

Desktop

24
12
12
8
8
8
6
6
6
6
4
4
4
4
4
4
2
2
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

Subtle Animation

Used sparingly, to help users understand moments of transition

Modal

Loader

Loading...

</design>

Questions?

Basic CSS Rules

1. Use low-specificity selectors

.sidebar {}               /* less specific */
#page .sidebar div > a {} /* waaay more specific */

2. Only Use Classes

#banner {
  background-color: blue;
}

#banner h1 {
  color: white;
}
.banner {
  background-color: blue;
}

.banner-title {
  color: white;
}

3. Namespace Classes

.btn {
  padding: .25em;
  background-color: blue;
  color: white;
}

.btn.red {
  background-color: red;
}
.btn {
  padding: .25em;
  background-color: blue;
  color: white;
}

.btn-red {
  background-color: red;
}

4. JavaScript hooks should use the js- prefix

<a href="#" class="btn">Click Me!</a>
<a href="#" class="btn js-btn">Click Me!</a>

Basic Sass Rules

1. Everything can be turned off

2. Everything can be called as a mixin

3. Only use colors from the brand palette

Basic Accessibility Rules

1. Ensure Sufficient Contrast

2. Use Semantic Markup

<a href="#" class="btn js-btn">Click Me!</a>
<button class="btn js-btn">Click Me!</button>

3. Make sure focus states work

NEVER DO THIS

.my-cool-element:focus {
  outline: none;
}

3. Use Correct Aria Roles (when needed)

Localization

1. Right to Left

2. Character Support for Most Languages

Done!

Questions?