-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
300fe1c
commit 7290bc1
Showing
17 changed files
with
231 additions
and
311 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
id: base | ||
title: Base | ||
--- | ||
|
||
|
||
|
||
## Affected Type Selectors | ||
|
||
* `body`: Sets body background color as a best practice. | ||
* `img`: | ||
* Sets alt text style to italic. | ||
* Scales image fluidity with its container for rich text editor convenience. | ||
* Align to middle to prevent white space created by aligning to text baseline. | ||
* `iframe`: Removes the default border from iframes. | ||
* `[role='button']`: Fixes clickability of issue for traditionally non-focusable elements with role='button'. | ||
* `[tabindex='-1]`: Suppresses focus outline on non-focusable items. | ||
* `a, area, button, [role='button'], input, label, select, summary, textarea`: Avoid 300ms click delay on devices that support the 'touch-action' CSS property. | ||
* `button` : Work around a Firefox/IE bug where the transparent `button` background results in a loss of the default `button` focus styles. | ||
* `hidden`: Always hiden an element with `hidden` HTML attribute. | ||
|
||
## Configurable Variables | ||
|
||
* `--base-body-background`: The background color of the body of the document. |
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,19 @@ | ||
--- | ||
id: code | ||
title: Code | ||
--- | ||
|
||
## Affected Type Selectors | ||
|
||
* `code, kbd, pre, samp`: Sets custom styles for inline and block code elements. | ||
* `pre`: Adjusts margin for blocks of code or pre-formatted text. | ||
|
||
|
||
## Configurable variables | ||
|
||
* `--base-code-fontFamily` | ||
* `--base-code-fontSize` | ||
* `--base-code-fontWeight` | ||
* `--base-code-letterSpacing` | ||
* `--base-code-lineHeight` | ||
* `--base-code-spacing` |
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,19 @@ | ||
--- | ||
id: forms | ||
title: Forms | ||
--- | ||
|
||
## Affected Type Selectors | ||
|
||
* `fieldset`: Sets border, margin, padding to zero. | ||
* `label`: Allows margins to use magin for spacing. | ||
* `input, button, select, textarea`: | ||
* Removes rounded borders. | ||
* Sets line-height to inherit. | ||
* Removes all margin. | ||
* `textarea`: | ||
* Only allows for vertical resizing to prevent layouts from breaking. | ||
* Easier to read default alignment. | ||
* `input[type='search']`: Overrides the extra rounded corners on search inputs in iOS. | ||
* `input[type='radio'], input[type='checkbox']`: Add right margin to radio buttons and checkboxes. | ||
* `html input[disabled], html input[readonly]`: Change background color. |
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,19 @@ | ||
--- | ||
id: print | ||
title: Print | ||
--- | ||
|
||
## Affected Type Selectors | ||
|
||
|
||
* `*`: Sets bagrounds to transparent, text to black, and removes shadows. | ||
* `a`: Adds underline to links. | ||
* `a[href]`: Adds value of href attribute in parentheses after link text. | ||
* `abbr[title]:after`: Adds value of title attribute in parentheses after abbr text. | ||
* `a[href^="#"]:after, a[href^="javascript:"]:after`: Don't show links that are fragment identifiers, or use the `javascript:` pseudo protocol. | ||
* `pre`: Sets white-space to pre-wrap. | ||
* `pre, blockquote`: Adds thin border and avoid having the page brak in the middle of element. | ||
* `thead`: Displays as table-header-group. | ||
* `tr, img`: Avoid page breaking in the middle of element. | ||
* `p, h2, h3`: Avoid page breaking from separating small pieces of text. | ||
* `h2, h3`: Avoid the page breaking after this element. |
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,20 @@ | ||
--- | ||
id: tables | ||
title: Tables | ||
--- | ||
|
||
## Affected Type Selectors | ||
|
||
* `table`: | ||
* Ensures borders collapse | ||
* Sets border spacing to zero. | ||
* Sets margin bottom to zero. | ||
* `td, th`: Sets padding and vertical aligns top. | ||
* `th`: Sets text color. | ||
* `caption, th`: Align text to left. | ||
* `caption`: Places caption below table and gives it a top margin. | ||
|
||
## Configurable Variables | ||
* `--base-tables-heading-color` | ||
* `--base-tables-spacing` | ||
|
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,74 @@ | ||
--- | ||
id: base-typography | ||
title: Typography | ||
--- | ||
|
||
Note: This sets the <html> element's font-size to 62.5%, which | ||
equals 10px (for default browser font size of 16px). | ||
This allows rem units to be calculated more intuitively. | ||
|
||
Font size strategy | ||
- <html> element font size set as a percentage so that font sizes are accessible | ||
if the user resizes the text size in their browser. | ||
- Font size set on the <body> tag is a rem. A direct relation to the HTML element. | ||
- Font sizes for components should be rem. For example, the font size of the navigation | ||
should be set as a rem. The relation is to the <html> tag, which by default is 10px. | ||
- Font sizes of elements within a component should be em to be relative to the component. | ||
For example, a navigation link within the navigation menu would be set to an em font size, | ||
which would then be in relation to the navigation component (assuming that a font size in rem | ||
was set on the navigation item). | ||
|
||
References that influenced this approach: | ||
https://css-tricks.com/rem-global-em-local/ | ||
http://clagnut.com/blog/2384/ | ||
|
||
|
||
## Affected Type Selectors | ||
|
||
* `html`: Set the base font size to be a percentage so that it's more accessible to browser text zooming, and also scales down text on smaller screen. | ||
* `body`: Set body defaults based on configurable variables for other elements to inherit. | ||
* `address, blockquote, dl, figure, hr, ol, p, ul`: Adjust margins. | ||
* `blockquote`: Add left border and margins/padding. | ||
* `a`: Set link appearance based on configurable variables. | ||
* `a[href^=tel]`: Sets telephone links to default styling to not look like links. | ||
* `ol, ul`: Adjusts margins/padding. | ||
* `dt`: Sets font weight to heavy. | ||
* `dd`: Removes margin. | ||
* `abbr[title]`: Adds bottom border and help cursor to inline abbreviations. | ||
* `address`: Resets browser default. | ||
* `hr`: | ||
* Remove default hr shading. | ||
* Inherit text or parent border color. | ||
* `h1, h2, h3, h4, h5, h6`: Sets styling from configurable variables. | ||
|
||
|
||
## Configurable Variables | ||
|
||
* `--base-typography-color` | ||
* `--base-typography-fontFamily` | ||
* `--base-typography-fontSize: ` | ||
* `--base-typography-fontWeight` | ||
* `--base-typography-hrule-width` | ||
* `--base-typography-letterSpacing` | ||
* `--base-typography-lineHeight: ` | ||
* `--base-typography-spacing: ` | ||
* `--base-typography-link-color` | ||
* `--base-typography-link-colorHover` | ||
* `--base-typography-link-decoration` | ||
* `--base-typography-link-decorationHover` | ||
* `--base-typography-h1-fontSize` | ||
* `--base-typography-h2-fontSize` | ||
* `--base-typography-h3-fontSize` | ||
* `--base-typography-h4-fontSize` | ||
* `--base-typography-h5-fontSize` | ||
* `--base-typography-h6-fontSize` | ||
* `--base-typography-h1-lineHeight` | ||
* `--base-typography-h2-lineHeight` | ||
* `--base-typography-h3-lineHeight` | ||
* `--base-typography-h4-lineHeight` | ||
* `--base-typography-h5-lineHeight` | ||
* `--base-typography-h6-lineHeight` | ||
* `--base-typography-heading-color` | ||
* `--base-typography-heading-fontFamily` | ||
* `--base-typography-heading-fontWeight` | ||
* `--base-typography-heading-letterSpacing` |
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
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
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
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
Oops, something went wrong.