diff --git a/tildes/scss/_base.scss b/tildes/scss/_base.scss index a00b34b..3dfc9bd 100644 --- a/tildes/scss/_base.scss +++ b/tildes/scss/_base.scss @@ -156,17 +156,15 @@ menu { list-style-type: none; } -ol { - list-style-position: outside; - margin: 0 0 1rem 2rem; - - li { - margin-top: 0.2rem; - max-width: $paragraph-max-width - 2rem; - } - - &:last-child { - margin-bottom: 0.2rem; +// We'll use lists for their semantic value sometimes, so we don't want them to +// have the normal list numbering/etc. by default. We'll specifically add that +// back in for text-based lists in places where it's needed. +ol, ul { + list-style: none; + margin: 0; + + ol, ul { + list-style: none; } } @@ -210,13 +208,3 @@ td, th { th { border-bottom-width: $border-width-lg; } - -ul { - list-style-position: outside; - margin: 0.4rem 0 0.4rem 1rem; - - li { - margin-top: 0.2rem; - max-width: $paragraph-max-width - 1rem; - } -} diff --git a/tildes/scss/_placeholders.scss b/tildes/scss/_placeholders.scss new file mode 100644 index 0000000..bb67fbb --- /dev/null +++ b/tildes/scss/_placeholders.scss @@ -0,0 +1,27 @@ +// Copyright (c) 2018 Tildes contributors +// SPDX-License-Identifier: AGPL-3.0-or-later + +// sets up (nested) lists specifically for text content +%lists-text { + ol, ul { + list-style-position: inside; + margin: 0 0 0.4rem 1rem; + + li { + margin-top: 0.2rem; + max-width: $paragraph-max-width - 1rem; + } + + &:last-child { + margin-bottom: 0.2rem; + } + } + + ol { + list-style-type: decimal; + } + + ul { + list-style-type: disc; + } +} diff --git a/tildes/scss/modules/_comment.scss b/tildes/scss/modules/_comment.scss index 604d863..c2d46b3 100644 --- a/tildes/scss/modules/_comment.scss +++ b/tildes/scss/modules/_comment.scss @@ -126,6 +126,8 @@ } .comment-text { + @extend %lists-text; + padding: 0.2rem; padding-left: 0.4rem; overflow: auto; diff --git a/tildes/scss/modules/_empty.scss b/tildes/scss/modules/_empty.scss index 143c6f2..336b829 100644 --- a/tildes/scss/modules/_empty.scss +++ b/tildes/scss/modules/_empty.scss @@ -5,11 +5,3 @@ background: inherit; color: inherit; } - -.empty-list { - list-style-type: none; - - li { - max-width: unset; - } -} diff --git a/tildes/scss/modules/_nav.scss b/tildes/scss/modules/_nav.scss index f5611aa..d49f881 100644 --- a/tildes/scss/modules/_nav.scss +++ b/tildes/scss/modules/_nav.scss @@ -3,6 +3,7 @@ .nav { li { + margin-bottom: 0; font-size: 0.6rem; font-weight: bold; } diff --git a/tildes/scss/modules/_post-buttons.scss b/tildes/scss/modules/_post-buttons.scss index 19c345d..3ec2da3 100644 --- a/tildes/scss/modules/_post-buttons.scss +++ b/tildes/scss/modules/_post-buttons.scss @@ -14,6 +14,10 @@ justify-content: left; } + li { + margin-top: 0; + } + // Combined with flex-wrap: wrap, this should put any form on its own line form { min-width: 100%; diff --git a/tildes/scss/modules/_post.scss b/tildes/scss/modules/_post.scss index 86d45dc..b6515a7 100644 --- a/tildes/scss/modules/_post.scss +++ b/tildes/scss/modules/_post.scss @@ -2,26 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-or-later .post-listing { - list-style-type: none; - margin-left: 0; - h2 { font-size: 0.6rem; } - // override the normal nested list behaviors - .comment-text ol, .topic-text-excerpt ol { - list-style-type: decimal; - margin: 0 0 1rem 2rem; - } - - .comment-text ul, .topic-text-excerpt ul { - margin: 0.4rem 0 0.4rem 1rem; - } - & > li { margin-bottom: 1rem; - max-width: none; } .is-topic-mine, .is-topic-official { diff --git a/tildes/scss/modules/_settings.scss b/tildes/scss/modules/_settings.scss index d962c81..24fa8ad 100644 --- a/tildes/scss/modules/_settings.scss +++ b/tildes/scss/modules/_settings.scss @@ -2,8 +2,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later .settings-list { - list-style-type: none; - li { margin-bottom: 1rem; } diff --git a/tildes/scss/modules/_topic.scss b/tildes/scss/modules/_topic.scss index ce6a7c6..418facc 100644 --- a/tildes/scss/modules/_topic.scss +++ b/tildes/scss/modules/_topic.scss @@ -1,15 +1,8 @@ // Copyright (c) 2018 Tildes contributors // SPDX-License-Identifier: AGPL-3.0-or-later -.topic-listing { - list-style-type: none; - margin: 0; - - & > li { - margin: 0; - margin-bottom: 0.2rem; - max-width: none; - } +.topic-listing > li { + margin: 0 0 0.2rem 0; } .topic-listing-filter { @@ -159,6 +152,8 @@ } .topic-text-excerpt { + @extend %lists-text; + display: none; @media (min-width: $size-md) { display: block; @@ -172,10 +167,6 @@ margin: 0 0 0.4rem 0; } - ol { - list-style-type: decimal; - } - summary { line-height: 0.8rem; } @@ -247,6 +238,8 @@ } .topic-full-text { + @extend %lists-text; + overflow: auto; } diff --git a/tildes/scss/styles.scss b/tildes/scss/styles.scss index d5bd4d7..2d04be8 100644 --- a/tildes/scss/styles.scss +++ b/tildes/scss/styles.scss @@ -2,6 +2,7 @@ @import 'spectre-0.5.1/_variables.scss'; @import 'mixins'; +@import 'placeholders'; @import 'base'; @import 'layout'; diff --git a/tildes/tildes/templates/error_group_not_found.jinja2 b/tildes/tildes/templates/error_group_not_found.jinja2 index bfacb14..7ad5607 100644 --- a/tildes/tildes/templates/error_group_not_found.jinja2 +++ b/tildes/tildes/templates/error_group_not_found.jinja2 @@ -15,7 +15,7 @@ Group not found

No group named '{{ supplied_name }}'

{% if group_suggestions %}

Did you mean one of these groups instead?

-