WIP: Improve style for quoted text in RichContent #412
1 changed files with 12 additions and 2 deletions
|
@ -1,7 +1,17 @@
|
||||||
|
@import './../../_variables.scss';
|
||||||
|
|
||||||
.RichContent {
|
.RichContent {
|
||||||
blockquote {
|
blockquote {
|
||||||
margin: 0.2em 0 0.2em 2em;
|
margin: 0 0 1em 0.2em;
|
||||||
font-style: italic;
|
padding: 0 0 0 1em;
|
||||||
ilja marked this conversation as resolved
|
|||||||
|
border-width: 0 0 0 0.3em;
|
||||||
|
border-style: solid;
|
||||||
|
color: $fallback--faint;
|
||||||
|
color: var(--faint, $fallback--faint);
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
|
Loading…
Reference in a new issue
suggestion, not a blocker: i’ve also commonly seen text colour being a bit more muted for quoted sections. We could achieve this with something like this:
or introduce a new style property for quoted text colour. The former may be undesirable in some themes whose text has a poor contrast by default.
yeah i think i agree, muted quotations seems to be the norm
Is fixed for making it faint. I did the same way as how making text faint is done in other locations. It's the same as e.g. the timestamp right-top of the status.
When making a theme for akkoma-fe, there's a check for how readable things remain. I'm unsure how that exactly works, but by using the same way of doing this, i'm assuming this is also taken into account for the theming engine.
There's still some weirdness with space, but that was already a problem. I'll see if I can figure out what's going on there.
Here's how it looks now, and i'm taking the opportunity to show how nested quotes are also nicely working ^^
And how it is without these changes
The comment about the space between a paragraph and blockquote is now also fixed 🎉
The reason is; p-tags only have margin at the bottom. Blockquotes are block elements on their own, but the margin was different. This gave this problem. See screenshots
Here we check the p-tag. We see there's only a margin at the bottom. That margin is 1em and is what's pushing the next block 1em down.
But when we check the blockquote, we see it has margins all around. All are 0.2em, so it only pushes the block below 0.2em down. Between it and the block above, the space is 1em, because there the p-tag has it's 1em margin.
Other block elements I can think of who may have similar problems are code, ul and ol-tags. I checked those, and visualy they seem OK. Checking with developer tools (F12 in browseer), it seems they have 1em margin bottom and top, always. We could nitpick wether those should be better to have 0 as last-child, and if they need the margin-top, but if someone wants that, I prefer to have that discussion somewhere else and keep this MR to the blockquotes. If we have that discussion, we should start by checking what elements we allow through the scrubber.
That leaves the problem of the blockqoute looking weird when it comes after a mention, I'll see if I can figure that one out too.
That last problem is also fixed with #347 already. Is there a reason why #347 is still open? Because I think it makes more sense to merge that first. After that I can fix merge conflix on this PR, and then we'll have nice looking quote posts.
hm 🤔 I do wonder why that
is for. When I just remove it, it also works. AND when I remove it, codeblocks work better imo. The change in #347 makes the lines "wrap". By removing it, we get a scrollbar.
This is with removing the line
This is with the fix from #347
I'll make the commit as the first example (where we have the scroll bar) and leave it up to others to decide what they like best.
Pushed, I think it's good now. Here's a last screenshot showing blockquotes and different spacings.
Seems it was an akkoma regression when trying to get mfm to work. Before that, the code I now removed was also just not there. I'm unsure why it was added.
$[spin something]
seems to still work for example.@nbsp Do you happen to remember what this
white-space: pre-wrap
was for (just to be sure we're not breaking other things)? In src/components/status_body/status_body.scsscommit:
931ed3d3c7 (diff-4200029adfe97f22b2316110f9e4adafca58f990)
pr: #29
EDIT: Nevermind, I think I found it. E.g.
$[spin 🥴]
, the whitespace needs to be preserved. Withoutthis line, it collapses to one whitespace. This isn't purely an MFM thing, but I understand that it was added to get better MFM integration.