Skip to content

Adds style for warnings and notes #2710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions _scss/_notes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Infos, notes, and warnings
*/

$info-color: #1488C6;
$warning-color: #aa6708;
$danger-color: #ce4844;

blockquote {
border-left-color: $info-color;
}

blockquote > p:first-child {
margin-top: 0;
}

blockquote > p > strong {
color: $info-color;
}

blockquote.warning {
border-left-color: $warning-color;
}

blockquote.warning > p > strong {
color: $warning-color;
}

blockquote.danger {
border-left-color: $danger-color;
}

blockquote.danger > p > strong {
color: $danger-color;
}
1 change: 1 addition & 0 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
@import "github";
@import "overrides";
@import "mobile";
@import "notes";
33 changes: 21 additions & 12 deletions test.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,20 +358,31 @@ Bootstrap JS are loaded.

## Admonitions (notes)

> **Note**: This is a note.
> **Note**: This is a note using the old note style

> **Info**: This is an info.

> **Tip**: This is a tip.
> **This is a note using the new style**
>
> And you include a small description here telling users to be on the lookout

> **Warning**: This is a warning.
> **Be careful out there**
>
> Add the `warning` class to your blockquotes if you want to tell users
> to be careful about something.
{: .warning}

> **Caution**: This is a caution.
> **Ouch, don't do that!**
>
> Use the `danger` class to let people know this is dangerous or they
> should pay close attention to this part of the road.
>
> You can also add more paragraphs here if your explanation is
> super complex.
{: .danger}

> **Note**: One line of note text
> another line of note text

> **Note**: This is a note with a list and a table in it.
> **This is a crazy note**
>
> This note has tons of content in it:
>
> - List item 1
> - List item 2
Expand All @@ -383,6 +394,7 @@ Bootstrap JS are loaded.
>
> And another sentence to top it all off.


## Comments

You can use XML style comments, which show up in the HTML "view source", or
Expand Down Expand Up @@ -548,6 +560,3 @@ authorizedkeys:
volumes:
/root:/user:rw
```