diff --git a/_sass/alerts.scss b/_sass/alerts.scss new file mode 100644 index 00000000..e873dcd0 --- /dev/null +++ b/_sass/alerts.scss @@ -0,0 +1,60 @@ +blockquote.markdown-alert, .markdown-alert { + padding: var(--base-size-8) var(--base-size-16); + margin-bottom: var(--base-size-16); + color: inherit; + border-left: .25em solid var(--borderColor-default, var(--color-border-default)); +} + +.markdown-alert>:first-child { + margin-top: 0; +} + +.markdown-alert>:last-child { + margin-bottom: 0; +} + +.markdown-alert .markdown-alert-title { + display: flex; + font-weight: var(--base-text-weight-medium, 500); + align-items: center; + line-height: 1; +} +.markdown-alert.markdown-alert-note { + border-left-color: var(--borderColor-accent-emphasis, var(--color-accent-emphasis)); +} + +.markdown-alert.markdown-alert-note .markdown-alert-title { + color: var(--fgColor-accent, var(--color-accent-fg)); +} + +.markdown-alert.markdown-alert-important { + border-left-color: var(--borderColor-done-emphasis, var(--color-done-emphasis)); +} + +.markdown-alert.markdown-alert-important .markdown-alert-title { + color: var(--fgColor-done, var(--color-done-fg)); +} + +.markdown-alert.markdown-alert-warning { + border-left-color: var(--borderColor-attention-emphasis, var(--color-attention-emphasis)); +} + +.markdown-alert.markdown-alert-warning .markdown-alert-title { + color: var(--fgColor-attention, var(--color-attention-fg)); +} + +.markdown-alert.markdown-alert-tip { + border-left-color: var(--borderColor-success-emphasis, var(--color-success-emphasis)); +} + +.markdown-alert.markdown-alert-tip .markdown-alert-title { + color: var(--fgColor-success, var(--color-success-fg)); +} + +.markdown-alert.markdown-alert-caution { + border-left-color: var(--borderColor-danger-emphasis, var(--color-danger-emphasis)); +} + +.markdown-alert.markdown-alert-caution .markdown-alert-title { + color: var(--fgColor-danger, var(--color-danger-fg)); +} diff --git a/_sass/jekyll-v4-theme-primer.scss b/_sass/jekyll-v4-theme-primer.scss index d9d77d21..468a357d 100644 --- a/_sass/jekyll-v4-theme-primer.scss +++ b/_sass/jekyll-v4-theme-primer.scss @@ -17,6 +17,9 @@ @import "@primer/css/markdown/index.scss"; @import "@primer/css/buttons/index.scss"; @import "@primer/css/tooltips/index.scss"; + +@import "alerts.scss"; + [data-color-mode=light][data-light-theme*=light], [data-color-mode=dark][data-dark-theme*=light] { @import "rouge-light.scss"; @@ -47,4 +50,3 @@ clipboard-copy { height: 28px; width: 28px; } - diff --git a/index.md b/index.md index e18dd7d0..dd9d65a9 100644 --- a/index.md +++ b/index.md @@ -114,6 +114,23 @@ end