-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix list item formatting for lists with paragraphs #1283
Fix list item formatting for lists with paragraphs #1283
Conversation
This removes the fancy tick-mark next to unordered list items, which is a little depressing, but fixes formatting for them when they contain paragraphs (`<p>` elements). The tick-mark has been replaced with a square mark. Both ordered and unordered lists have grown 1rem of left padding to compensate for their position. Considered using disclosure-closed as a similar triangle replacement, but it's not regarded as something that should be used in production (per MDN). Using a simple string is unsupported because it's only in a CSS working draft, so a square is the least controversial option, I think. Closes #1282.
Attaching a screenshot of Firefox (Chrome looks the same, so didn't bother capturing that, but can if needed) with the changes to contrast the current behavior in #1282. And the markdown from above: ## Separated by Newlines
1. Simple list
2. Each item is a paragraph
1. Nested ordered list.
2. Check that these work as expected--
Even when nested.
3. Because each item is separated by a line
## Multi-line list
- This list contains items with multiple lines, requiring paragraphs in the list item.
That is, the list item is more complicated than just `<li>Test</li>`.
- Once an item in a list is a paragraph, all items are paragraphs.
- This also contains a paragraph.
- Nested
- List items
To test with.
- Because they matter too.
Just to illustrate this mid-list.
- Another paragraph.
## Simple List
- This list works.
- It isn't separated by newlines.
- It doesn't have multiple lines in any item. |
Should be possible to make a small adjustment to handle that. At least as CSS changes go, it’s not too bad of a break. Not sure if you want to do the PR for it, since I don’t have WikiJS set up for dev locally right now. |
I mean, i'm not an expert in css, but wouldn't this be solved whit just a css rule like .v-content ul > li > p {
display: inline-flex;
} or for more compatibility with old browsers: .v-content ul > li > p {
display: inline-table;
} or for even more compatibility with old browsers: .v-content ul > li > p {
display: inline-block;
vertical-align: top;
padding-top: 0px;
} this makes so it wraps the "p" element in the li and you still have the fancy bullets, and as a bonus this doesn't break link-lists UPDATE: .v-content ul {
width: 100%;
}
.v-content ul>li {
display:flex;
flex-wrap: wrap;
}
.v-content ul>li>p{
display:inline-block;
vertical-align:top;
padding-top:0!important;
} |
In kinda response to: requarks#1283 Solves the problem with the list having issues with p elements and with multi lines but keeping the fancy css bullets. Tested on Chrome, Firefox, Opera and Edge.
* Fix list formatting multiline with fancy bullets In kinda response to: #1283 Solves the problem with the list having issues with p elements and with multi lines but keeping the fancy css bullets. Tested on Chrome, Firefox, Opera and Edge. * remove important * fix: bullet symbol for RTL Co-authored-by: Nicolas Giard <github@ngpixel.com>
This removes the fancy tick-mark next to unordered list items, which is a little depressing, but fixes formatting for them when they contain paragraphs (`<p>` elements). The tick-mark has been replaced with a square mark. Both ordered and unordered lists have grown 1rem of left padding to compensate for their position. Considered using disclosure-closed as a similar triangle replacement, but it's not regarded as something that should be used in production (per MDN). Using a simple string is unsupported because it's only in a CSS working draft, so a square is the least controversial option, I think. Closes requarks#1282.
* Fix list formatting multiline with fancy bullets In kinda response to: requarks#1283 Solves the problem with the list having issues with p elements and with multi lines but keeping the fancy css bullets. Tested on Chrome, Firefox, Opera and Edge. * remove important * fix: bullet symbol for RTL Co-authored-by: Nicolas Giard <github@ngpixel.com>
This removes the fancy tick-mark next to unordered list items, which is
a little depressing, but fixes formatting for them when they contain
paragraphs (
<p>
elements). The tick-mark has been replaced witha square mark. Both ordered and unordered lists have grown 1rem of left
padding to compensate for their position.
Considered using disclosure-closed as a similar triangle replacement,
but it's not regarded as something that should be used in production
(per MDN). Using a simple string is unsupported because it's only in
a CSS working draft, so a square is the least controversial option,
I think.
Closes #1282.