diff options
author | amzrk2 | 2020-05-27 22:53:13 +0800 |
---|---|---|
committer | amzrk2 | 2020-05-27 22:53:13 +0800 |
commit | dfb6e1f80754c1c8f2d4d332c5292319f008a67b (patch) | |
tree | fd8c0cf13e03613b6a39c662b6a0ced87fb69157 /assets/_primer/markdown/lists.scss | |
parent | aa5290aeef9df1c583fdf30290351968df9215dc (diff) | |
download | hugo-theme-fuji-dfb6e1f80754c1c8f2d4d332c5292319f008a67b.tar.gz hugo-theme-fuji-dfb6e1f80754c1c8f2d4d332c5292319f008a67b.tar.bz2 hugo-theme-fuji-dfb6e1f80754c1c8f2d4d332c5292319f008a67b.zip |
v2 original port
Diffstat (limited to 'assets/_primer/markdown/lists.scss')
-rw-r--r-- | assets/_primer/markdown/lists.scss | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/assets/_primer/markdown/lists.scss b/assets/_primer/markdown/lists.scss new file mode 100644 index 0000000..b680faf --- /dev/null +++ b/assets/_primer/markdown/lists.scss @@ -0,0 +1,77 @@ +// Base styles +// stylelint-disable selector-no-qualifying-type +// stylelint-disable selector-max-type +.markdown-body { + + // Lists, Blockquotes & Such + ul, + ol { + // stylelint-disable-next-line primer/spacing + padding-left: 2em; + + &.no-list { + padding: 0; + list-style-type: none; + } + } + + // Did someone complain about list spacing? Encourage them + // to create the spacing with their markdown formatting. + // List behavior should be controled by the markup, not the css. + // + // For lists with padding between items, use blank + // lines between items. This will generate paragraphs with + // padding to space things out. + // + // - item + // + // - item + // + // - item + // + // For list without padding, don't use blank lines. + // + // - item + // - item + // - item + // + // Modifying the css to emulate these behaviors merely brakes + // one case in the process of solving another. Don't change + // this unless it's really really a bug. + ul ul, + ul ol, + ol ol, + ol ul { + margin-top: 0; + margin-bottom: 0; + } + + li { + word-wrap: break-all; + } + + li > p { + margin-top: $spacer-3; + } + + li + li { + margin-top: $em-spacer-3; + } + + dl { + padding: 0; + + dt { + padding: 0; + margin-top: $spacer-3; + font-size: 1em; + font-style: italic; + font-weight: $font-weight-bold; + } + + dd { + padding: 0 $spacer-3; + margin-bottom: $spacer-3; + } + } +} |