-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typography is made up of three pillars: - typographic system - suggested sizes and styles - proportional scaling Explain these three pillars in the most concise way possible with examples, whilst conforming to the GDS guidelines on content style. The suggested styles use Proxima Nova Light and Semi-Bold in conjuction with system-ui fonts to: - Adhere to the new Barnardo's digital look and feel - Optimise performance by minimising page weight Apply all these to the website itself.
- Loading branch information
1 parent
fd84916
commit f152982
Showing
23 changed files
with
360 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
.cache | ||
public | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.HeadingOne { | ||
font: 600 1.8125rem/2rem Nova, sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const HeadingOne = ({ children }) => <h2 className="HeadingOne">{children}</h2>; | ||
|
||
HeadingOne.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default HeadingOne; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.HeadingTwo { | ||
font: 300 1.625rem/2rem Nova, sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const HeadingTwo = ({ children }) => <h3 className="HeadingTwo">{children}</h3>; | ||
|
||
HeadingTwo.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default HeadingTwo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Lede { | ||
font: 300 1.625rem/2rem Nova, sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const Lede = ({ children }) => <p className="Lede">{children}</p>; | ||
|
||
Lede.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default Lede; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.ListItem { | ||
font: 300 1rem/1.5rem system-ui; | ||
margin-left: 0.25rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const ListItem = ({ children }) => <li className="ListItem">{children}</li>; | ||
|
||
ListItem.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default ListItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Paragraph { | ||
font: 300 1rem/1.5rem system-ui; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const Paragraph = ({ children }) => <p className="Paragraph">{children}</p>; | ||
|
||
Paragraph.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default Paragraph; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.Title { | ||
font: 600 2.25rem/2.5rem Nova, sans-serif; | ||
} | ||
|
||
@media (min-width: 40rem) { | ||
.Title { | ||
font-size: 2.875rem; | ||
line-height: 3rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const Title = ({ children }) => <h1 className="Title">{children}</h1>; | ||
|
||
Title.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default Title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.UnorderedList { | ||
font: 300 1rem/1.5rem system-ui; | ||
padding-left: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "./index.css"; | ||
|
||
const UnorderedList = ({ children }) => ( | ||
<ul className="UnorderedList">{children}</ul> | ||
); | ||
|
||
UnorderedList.propTypes = { | ||
children: PropTypes.node.isRequired | ||
}; | ||
|
||
export default UnorderedList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/** | ||
* Display font definitions | ||
*/ | ||
|
||
@font-face { | ||
font-family: Nova; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: url(./nova-light.woff); | ||
} | ||
|
||
@font-face { | ||
font-family: Nova; | ||
font-style: normal; | ||
font-weight: 600; | ||
src: url(./nova-semibold.woff); | ||
} | ||
|
||
/** | ||
* Minimal reset | ||
*/ | ||
|
||
/* stylelint-disable selector-max-universal */ | ||
* { | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
/* stylelint-enable */ | ||
|
||
/** | ||
* Foundation proportional font-sizing system | ||
* | ||
* The font-size of the html selector is scaled according to the viewport width. | ||
* This provides a general rule for readable text and optimal line length. | ||
* Components can then build of top of this general rule by using rem units. | ||
* Thus, the majority of CSS will use rem units and target class selectors. | ||
* Hence, the selector-max-type and declaration-property-unit-whitelist stylelint rules | ||
* are only disabled for the following code, rather than turned off globally. | ||
*/ | ||
|
||
/* stylelint-disable selector-max-type, declaration-property-unit-whitelist */ | ||
|
||
html { | ||
font-size: 93.75%; | ||
} | ||
|
||
@media (min-width: 36rem) { | ||
html { | ||
font-size: 100%; | ||
} | ||
} | ||
|
||
@media (min-width: 40rem) { | ||
html { | ||
font-size: 106.25%; | ||
} | ||
} | ||
|
||
@media (min-width: 44rem) { | ||
html { | ||
font-size: 112.5%; | ||
} | ||
} | ||
|
||
/* stylelint-enable */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @define Layout */ | ||
|
||
.Layout { | ||
margin: 0 auto; | ||
max-width: 46rem; | ||
padding: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import "../index.css"; | ||
import "./index.css"; | ||
|
||
const Layout = ({ children }) => <main className="Layout">{children()}</main>; | ||
|
||
Layout.propTypes = { | ||
children: PropTypes.any | ||
}; | ||
|
||
export default Layout; |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** @define Index */ | ||
|
||
.Index-typography { | ||
background: whitesmoke; | ||
margin-top: 1rem; | ||
padding: 1rem; | ||
} | ||
|
||
.Index-typographyItem:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
|
||
.Index-typographyItemLabel { | ||
font: 300 0.875rem/1.5rem system-ui; | ||
} | ||
|
||
.Index-scale { | ||
background: whitesmoke; | ||
margin-top: 1rem; | ||
padding: 1rem; | ||
} | ||
|
||
.Index-scaleItem { | ||
font: 300 1.625rem/2rem Nova, sans-serif; | ||
} | ||
|
||
.Index-scaleItem:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
|
||
.Index-headingOne { | ||
margin-top: 2rem; | ||
} | ||
|
||
.Index-headingTwo { | ||
margin-top: 2rem; | ||
} | ||
|
||
.Index-paragraph { | ||
margin-top: 1rem; | ||
} | ||
|
||
.Index-unorderedList { | ||
margin-top: 1rem; | ||
} |
Oops, something went wrong.