Style Guide

This is the style guide to let you get familiar with our theme design.

#
01. Typography





#
Fonts

The font famliy follows the Tailwind default settings.



Aa
Sans Serif
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
Aa
Serif
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
Aa
Monospace
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789






#
Headings

The headings ranges from

<h1>
to
<h6>
. The headings have a relative margin bottom according to their font size.



h1 Heading 4xl


h2 Heading 3xl


H3 Heading 2xl


H4 Heading xl


H5 Heading lg

H6 Heading base








#
Paragraphs

The common

<p>
tag. There’s a
margin-bottom
(mb-4) for the gap between different paragraphs



Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.








#
Quotes

The font under

<quotes>
is set to serif and italic to distinguish with the normal article content.



Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma – which is living with the results of other people’s thinking.


- Hello








#
Address

Similar to the blockquote, the

<address>
tag is also set to serif and italic


Hello World!, Inc.
1-2-3 Alpha, Beta, Somewhere
+00-11-2222-3333 (Main)
first.last@example.com







#
Semantic Elements

It’s clear that semantic elements are more friendly to users and developers, isn’t it?



i18nabbr
Boldstrongb
Citationcite
Hello World!code
Deleteddel
Emphasisem
Italici
Insertedins
Ctrl + Skbd
Highlightedmark
kanjiruby
Strikethroughs
Samplesamp

Text Subscriptedsub

Text Superscriptedsup

time
Underlineu

x = y + 2var








#
Code

The code highlight is enabled by the community plugin:

gatsby-remark-vscode


Hight lines

<div>  <div>    <p>gatsby-theme-pitayan is a theme for building blogs</p>  </div>
</div>

JSX

const App = () => {
  return <div>Hello World!</div>
}

Diff changes

const add = (x: number, y: number) => {
-   return x + x;
+   return x + y;
}

Inline code highlight

This is an inline code

Array.prototype.concat.apply([], array)








#
Lists

  • List Item 1
  • List Item 2

    • List Sub-Item 1
    • List Sub-Item 2
  • List Item 3
  • List Item 4
  • List Item 5
  1. List Item 1
  2. List Item 2

    1. List Sub-Item 1
      1. List Sub-Item 1
  3. List Item 3
  4. List Item 4
  5. List Item 5
Item 1
Description for Item 1
Item 2
Description for Item 2
Item 3
Description for Item 3







#
02. Colors





#
Primary

The theme uses Tailwind indigo as its primary color.



bg-primary
500







#
Palletes

The default Tailwind colors



bg-gray
500
bg-red
500
bg-yellow
500
bg-green
500

bg-blue
500
bg-indigo
500
bg-purple
500
bg-pink
500









#
03. Elements





#
Button

3 built-in button types:

Default
Fill
Ghost



Default

<button>




“Fill” button

<button className="fill-button">




“Ghost” button

<button className="ghost-button">




Disabled styles

<button disabled>disabled button</button>











#
Divider

A horizontal line

<hr>
is customized into 3 dots with margins to both ends (my-16).



Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.








This is what a link looks like among the text.



When a link is focused

When a link is hovered

When a link is disabled








#
Input

The

<input>
element has 2 types:
default
and
outline













#
04. Components





#
Pagination

Active item font size

2xl
& font weight
semibold










#
Subscription

Appears at the end of each article



Join our email list and get notified about new content

Be the first to receive our latest content with the ability to opt-out at anytime. We promise to not spam your inbox or share your email with any third parties.








#
Selection Popup

<div className="selection-popup">
to share the selected text to SNS or copy to clipboard.



Share:










#
Panel

Article list item

<div className="panel">



This is a title

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Sept 26th, 2021 • 8 min read

This is a title

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Sept 25th, 2021 • 8 min read
Share to TwitterShare to FacebookShare to LinkedinShare to PocketCopy URL address
Written by

Yanze Dai@daiyanze

Push at least one thing to its perfection even the entirety is yet incomplete

Related Posts

Subscribe to our email newsletters

Stay tuned to our latest content with the ability to opt-out at anytime. We will not spam your inbox or share your email with any third parties.
@