├── .gitignore
├── src
├── scss
│ ├── base
│ │ ├── layout.scss
│ │ ├── variables.scss
│ │ └── typography.scss
│ ├── pages
│ │ ├── cards.scss
│ │ ├── grid-system.scss
│ │ └── colors.scss
│ ├── style.scss
│ ├── components
│ │ ├── ProfilePicture.scss
│ │ ├── Tag.scss
│ │ ├── Card.scss
│ │ ├── DropDown.scss
│ │ ├── NavBar.scss
│ │ ├── GridSystem.scss
│ │ ├── ExternalPage.scss
│ │ └── Button.scss
│ └── guide.scss
└── js
│ ├── index.js
│ ├── guide.js
│ ├── components
│ └── Card.jsx
│ └── utils.js
├── .npmignore
├── public
├── img
│ └── block-title-text--hero@2x.png
├── css
│ ├── colors.css
│ ├── guide.css
│ └── style.css
├── cards.html
├── tags.html
├── profile-pictures.html
├── navbar.html
├── index.html
├── grid-system.html
├── typography.html
├── external-pages.html
└── colors.html
├── .jshintrc
├── .editorconfig
├── server.js
├── scripts
└── publish-github-pages.sh
├── LICENSE
├── package.json
├── README.md
└── Gulpfile.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/src/scss/base/layout.scss:
--------------------------------------------------------------------------------
1 | *, *:before, *:after {
2 | box-sizing: inherit;
3 | }
--------------------------------------------------------------------------------
/src/js/index.js:
--------------------------------------------------------------------------------
1 | import Card from './components/Card';
2 |
3 | module.exports = {
4 | Card: Card
5 | };
6 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .git*
2 | src/
3 | public/
4 |
5 | .editorconfig
6 | .jshintrc
7 | .gitignore
8 | Gulpfile.js
9 | server.js
10 |
--------------------------------------------------------------------------------
/src/scss/pages/cards.scss:
--------------------------------------------------------------------------------
1 | @import "base/variables";
2 |
3 | // Card - Modifier
4 | .Card--no-padding {
5 | margin-bottom: 0;
6 | }
--------------------------------------------------------------------------------
/public/img/block-title-text--hero@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bufferapp/buffer-style/HEAD/public/img/block-title-text--hero@2x.png
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "browser": true,
3 | "node": true,
4 | "esnext": true,
5 | "devel": true,
6 | "curly": false,
7 | "undef": true,
8 | "globals": {
9 | "React": true
10 | },
11 | "-W030": true
12 | }
13 |
--------------------------------------------------------------------------------
/src/js/guide.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Card from './components/Card.jsx';
3 |
4 | React.render(
5 | (
6 | This is a card
less/components/Card.less provides a number of predefined card styles, which are documented below, for most use cases.This is the default style of a card. To use it, set the class property of a div node to Card.
Use this modifier to set a cards padding value from 16px to 32px. To use it, give a div node an additional class of Card--double-padding.
Use this modifier to describe a card that has no initial content but is expected to in the future. To use it, give a div node an additional class of Card--empty.
Use this modifier when a card is displayed on a dark background. To use it, give a div node an additional class of Card--no-border.
Use this modifier to set a cards padding value to 0. To use it, give a div node an additional class of Card--no-padding.
less/components/Tag.less provides a number of predefined tag styles, which are documented below, for most use cases.A div or span node with a class of Tag sets its padding property value to 2px 8px, its font-size property value to 11px, its font-weight property value to 600, its color property value to $shuttle-gray, its background-color property value to @geyser, and its border-radius property value to @border-radius-level-1.
To use it, give a div or span node a class of Tag.
This modifies adds a margin-right property value of 8px.
This modifies a the color property value to @white and the background-color property value to @torch-red.
This modifies a the color property value to @white and the background-color property value to @curious-blue.
less/components/ProfilePicture.less provides a number of predefined card styles, which are documented below, for most use cases.An img node with a class of ProfilePicture changes its display property value to block, its width property value to 32px, its height property value to 32px, and its border-radius property value to 256px.
To use it, give an img node a class of ProfilePicture.
53 | This modifies a the width and height to 128px.
61 | This modifies a the width and height to 64px.
66 | This modifies a the width and height to 48px.
71 | This modifies a the width and height to 16px.
76 | NavBar is an object that can be used to navigate. less/components/NavBar.less provides a predefined style, which is documented below, for most use cases.The NavBar is used both within the app and externally as our primary form of navigation that sits at the top of the viewport. It has three children; NavBar__title, NavBar__left-menu, and NavBar__right-menu.
To use it, give a parent div node a class of NavBar and its three children nodes NavBar__title, NavBar__left-menu, and NavBar__right-menu respectively.
NavBar__left-menu is aligned to the left of the NavBar and has a flex-grow property value of 1. This means it will always remain wider than NavBar__title and NavBar__right-menu.
NavBar__menu__item objects are children objects of NavBar__left-menu and NavBar__right-menu.
NavBar__menu__item__link objects are children objects of NavBar__menu__item.
NavBar__right-menu is aligned to the right of the NavBar and has a flex-grow property value of 0. This means its width will be 100% of the total width of its children.
This element displays a title and is aligned to the left of the NavBar and has a flex-grow property value of 0. This means its width will be 100% of the total width of its children.
This modifier changes the property values of children nodes with a class of NavBar__menu__item__link. The font-weight property value is changed to 600 and the color property value is changed to $outer-space.
This modifier changes the margin-right property value to 0.
less/components/Button.less provides a number of predefined button styles, which are documented below, for most use cases.This is the default style of a button. To use it, set the class property of a button or a node to Button.
Use this modifier to communicate a destructive action to the user. To use it, give an a, button, or div node an additional class of Button--state-error.
Use this modifier to communicate a non-primary action to the user. To use it, give an a, button, or div node an additional class of Button--type-borderless.
Use this modifier to communicate an in-app action to the user. To use it, give an a, button, or div node an additional class of Button--type-in-app.
Use this modifier to communicate a secondary action to the user. To use it, give an a, button, or div node an additional class of Button--type-secondary.
Use this modifier to communicate a primary action to the user when space is limited. To use it, give an a, button, or div node an additional class of Button--type-small.
Use this modifier to communicate a tertiary action to the user. To use it, give an a, button, or div node an additional class of Button--type-tertiary.
Use to communicate an action to the user using an icon only. To use it, give an a, button, or div node a class of ButtonIcon.
960px. less/components/GridSystem.less provides all column widths, which are documented below, for most use cases.Each row of columns is wrapped within a GridRow. This keeps them organized and prevents a mosaic effect from occuring. GridRow has no defined properties but instead has a state rule for ::after, which sets its display property value to block, its clear property value to both, and its content property value to "". Having this rule in place allows every instance of GridRow to fully contain any elements within it that may be floating.
GridRow also updates any children img nodes to be responsive by setting their max-width property value to 100% and their height property value to auto.
To use it, give a div node a class of GridRow and place your content inside. A GridRow must go within a Block.
The purpose of the GridContainer is to contain a pages content within a set width. This prevents a pages content from spanning 100% of the viewport. Viewports that have a minimum width of 1024px have the GridContainer width property value set to 960px. Viewports smaller than this have the GridContainer width property value set to 100%. A GridContainer has a margin property value of 0 auto. Like the GridRow, a GridContainer has a state rule for ::after, which sets its display property value to block, its clear property value to both, and its content property value to "". Having this rule in place allows every instance of GridRow to fully contain any elements within it that may be floating.
To use it, give a div node a class of GridContainer and place your content inside. A GridContainer must go within a GridRow.
Our grid contains 12 columns. Columns break up content into vertical groups. Depending on the design we're trying to build, depends on the arrangement of the widths of each column. Each GridRow must contain column widths that equate to 12. For example:
We've chosen to be super descriptive with our column nomenclature. To use a single column, give a div node a class of OneColumn followed by either the --medium or --large modifier. Columns larger than a single column use *Columns, i.e. ThreeColumns, EightColumns, etc.
Any column with a --large modifier will determine how many columns that node will use on a viewport with a width greater than or equal to 1024px.
Any column with a --medium modifier will determine how many columns that node will use on a viewport with a width less than 1024px.
less/base/typography.less provides a number of styles, which are documented below, for most use cases.Our body node has a font-size property value of @font-size, a line-height property value of @line-height, and a color property value of @shuttle-gray.
Our code node has a padding property value of 2px 4px, a color property value of @torch-red, a background-color property value of rgba(@torch-red, 0.1), and a border-radius property value of @border-radius-level-2.
All headings have a line-height property value of normal and a color property value of @outer-space.
h1, h2, and h3 nodes have a margin property value of 0 0 32px 0 and a font-weight property value of 300.
h1 nodes have a font-size property value of 48px and a line-height property value of 72px.
h2 nodes have a font-size property value of 40px and a line-height property value of 60px.
h3 nodes have a font-size property value of 24px and a line-height property value of 36px.
h4, h5, and h6 nodes have a margin property value of 0 0 16px 0, a font-size property value of @font-size, and a line-height property value of @line-height.
All a nodes have a text-decoration property value of none and their :hover state has a text-decoration property value of underline.
All ol and ul nodes have a margin property value of 2px 16px 32px 34px and their children li nodes have a margin-bottom property value of 8px.
Use this modifier to set an ordered or unordered lists list-style property value to none.
Use this modifier to set an ordered or unordered lists margin-bottom property value to 0.
All p nodes have a margin property value of 16px 0.
Use this modifier to set a paragraphs margin-top property value to 0.
Use this modifier to set a paragraphs margin-bottom property value to 0.
Block objects. less/components/ExternalPage.less provides a number of predefined block styles, which are documented below, for most use cases.This is the default style of a Block object.
It sets the padding-top and padding-bottom to 64px and the background-color to $white.
To use it, give a div node a class of Block.
This modifier sets the background-color of a Block to $aqua-haze. To use it, give a div node an additional class of Block--type-alternative.
This modifier sets the text-align of a Block to center and its background-color to $outer-space.
It sets the margin-bottom of children h2 and h3 nodes to 0
It changes the color of a child h2 node to $white, the color of a child h3 node to 0.8 of $white, and the color of a child p node to 0.6 of $white.
It sets the margin-top of a child Button node to 32px.
To use it, give a div node an additional class of Block--type-dark.
This modifier sets the margin-top of children h5 and p nodes to 0 and their margin-bottom to 16px and the margin of children ul nodes to 0 0 32px 0.
To use it, give a div node an additional class of Block--type-footer.
This element sets the margin-top of the node to 32px and the margin-bottom of h2 and h3 nodes contained within it to 0.
This element sets the color of a nodes contained within it to $shuttle-gray.
This modifier sets the text-align of the node to center and the margin of img nodes contained within it to 0 auto.
This modifier sets the margin-bottom of h1, h2, h3, h4, h5, and h6 nodes to 0.
This modifier sets the text-align of the node to left.
This modifier sets the margin-top of the node to 0.
Add this class to a Block object to reduce the width of a GridContainer within it to 640px on a desktop and 100% on tablets and smartphones.
Add this class to a Block object to set the margin-bottom of a p node contained within it to 0.
It sets the margin-top of a ProfilePicture object contained within it to 16px.
This is the default style of a BlockHero object. It sets the padding-top and padding-bottom to 128px, text-align to center, background-position to top, background-size to cover, and its background-repeat to no-repeat.
It sets the margin-bottom of h2, h3 and p nodes to 0, the color of h2 nodes to $white, and the color of h3 nodes to 0.5 of $white.
It sets the margin-top of a Button object contained within it to 32px.
less/base/variables.lessOur blue palette is used to describe primary actions such as pimary buttons, links, and other objects that fall into this category. When thinking about what defines a primary action, it is the first action we're looking for a user to take.
50 |We use @curious-blue as the main blue color for the object, @denim for its :hover state, and @tory-blue for its :active state.
#168eea
61 |#137ac9
69 |#0f63a4
77 |Our brand palette is used to describe the various brands represented in the Buffer product.
90 |#4a484c
100 |#3b5998
108 |#dd4b39
116 |#007bb6
128 |#bd081c
136 |#55acee
144 |Our gray palette is used in most objects; from typography and border colors to backgrounds and shadows.
157 |We use @outer-space for the color of input, label, the active NavBar__menu__item, h1 through h6, the :active state of a Button--type-tertiary (including its background-color property at 10% opacity), and the :hover state of a Button--type-tertiary.
We use @shuttle-gray for the color of body, NavBar__menu__item, and Tag.
We use @nevada for the border-color and color of Button--type-tertiary.
We use @geyser for the border-color of all objects that require a border.
We use @aqua-haze for an alternative, light background color.
#323b43
172 |#59626a
180 |#666c72
188 |#ced7df
200 |#f4f7f9
208 |We only use one shade; @white, which is either used as a background-color or a color. When used as a color, it can be coupled with an opacity variation.
#fff
231 |Our state palette includes three colors used to describe the state of a given object.
244 |We use @shamrock as the background-color at 20% or the color of any object that has a --state-success.
We use @saffron as the background-color at 20% or the color of any object that has a --state-warning.
We use @torch-red as the background-color at 20% or the color of any object that has a --state-error.
#2fd566
257 |#f1cb3a
265 |#ff1e1e
273 |