-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from accessibility-in-action/feat/blockquote
feat: add blockquote element (resolves #19)
- Loading branch information
Showing
7 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,5 @@ | ||
# Blockquote | ||
|
||
Blockquotes can include a citation, which should be wrapped in a [`<cite>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite). | ||
The em dash that precedes a citation is added using generated content, so only | ||
the name or work cited needs to be include within the `<cite>` 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,9 @@ | ||
const faker = require("faker"); | ||
|
||
module.exports = { | ||
status: "ready", | ||
context: { | ||
quote: faker.lorem.sentence(9), | ||
citation: "Anonymous" | ||
} | ||
}; |
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 @@ | ||
<blockquote> | ||
{% render "@p", {content: quote} %} | ||
{% if citation %}<cite>{{ citation }}</cite>{% endif %} | ||
</blockquote> |
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,16 @@ | ||
blockquote { | ||
border-left: var(--ll-border-medium); | ||
border-top-left-radius: 0.125em 100%; | ||
font-size: var(--step-1); | ||
padding-inline-start: var(--step-0); | ||
} | ||
|
||
cite { | ||
font-size: var(--step-0); | ||
font-style: normal; | ||
padding-inline-start: 2ch; | ||
} | ||
|
||
cite::before { | ||
content: "–"; | ||
} |
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