::before & ::after

Hi people! Two questions: 1. Why isn't my ::after showing up (or to be precise, why is it sized 0 x 0) 2. Why is the height of the ::before so tall? https://github.com/AMarlonG/Quote-by-the-artist-Beck
13 Replies
Kiers
Kiersβ€’16mo ago
Really not sure why 'close-quote' isn't being recognised, but content: '\201D'; seems to work instead. As to the height of the ::before - I think that the extra space is just the blank part of the " glyph. As you see in a sentence, it sits high above the baseline, so it's just that gap. Ah! the close-quote works if you remove the container-type: inline-size; from the content class. not sure why that clashes though...\
Γ… Marlon G
Γ… Marlon Gβ€’16mo ago
Wow! This is so interesting ... So the close-quote is visible in Firefox, but FF doesnΒ΄t allow for container type and units. This is quite essential for this project, but at least the container stuff will work from 14th of mMarch with the release of FF 111... So why does Chrome allow all the container stuff but that then somehow affects the ::after, unless you use that weird code you put in under content. What kind of code unit is that?
Kiers
Kiersβ€’16mo ago
Hi, yeah - I've not used containers in anger as yet, so I'm not familiar with why it affects ::after and not other content... The \201D is the character code for a closing quote - to be honest, I'd have expected the two to produce exactly the same result, so there must be something weird going on... it might even be a bug πŸ™‚
Γ… Marlon G
Γ… Marlon Gβ€’16mo ago
I'm gonna get back to this project after 14th of March, cause it will be very interesting to see how FF deals with this issue. Thanx for the answers and solutions so far! πŸ‘
Kevin Powell
Kevin Powellβ€’16mo ago
Saw the YT suggestion, but I don't think it has anything to do with container queries here (if it is, it's a bug with them), but if I change the content away from close-quote, it works for me, even with the container-type: inline-size the only thing that isn't working is close-quote, and for me, it doesn't work regardless... which I'm not sure what's causing it. I also tested in Safari, and it does show up there. I'm struggling to figure out what's going wrong here tbh... Oh wait, it is coming from the container-type: inline-size. It's a bug, I'll file a bug report
Kiers
Kiersβ€’16mo ago
Wow, never thought it would be an actual bug... πŸ™‚ I mean, it looked like one but I just figured I was missing something. Cheers Kevin πŸ™‚
Kevin Powell
Kevin Powellβ€’16mo ago
Except now I can't recreate it in another situation πŸ˜…
Kiers
Kiersβ€’16mo ago
Ah! The plot thickens!
Kevin Powell
Kevin Powellβ€’16mo ago
can confirm, no issues in Safari or FF, only in Chrome, so 100% an edge-case bug there. This has opened up a rabbit-hole for me πŸ˜‚ In FF, an open-quote followed by a \201D doesn't close the quote (so if you have another quote afterwards, it acts like a nested one with a single ', even though it shows the closed quote character, but in Chrome it does act as a close-quote πŸ˜‚ If you're curious, you can follow the bug report here... I have a feeling it won't be a fast moving one though πŸ˜… https://bugs.chromium.org/p/chromium/issues/detail?id=1417207
Γ… Marlon G
Γ… Marlon Gβ€’16mo ago
... so I'v actually uncovered a bug. Jeez. That's a bit daunting. How do you figure out it is a bug? And how do your report them? It will be interesting to see what happens when FF 111 is released ... And ... is there any reason the ::before works, and not the ::after? Sorry for the rabbit hole, but hey, it's a little bit fun as well I think! Kind of fun to be bug hunting! 😎
Kevin Powell
Kevin Powellβ€’16mo ago
If ever you find a bug, if you go to the link above, you'll see a new issue button to report one. Best way to know it's a bug is recreate it with a simple example, so you know it's not something else causing it, and then testing it in other browsers. If it works in others, but not the 3rd one, then chances are it is
In this case I tested it in FF Nightly, which has container queries, and Safari, and it worked fine in both
Γ… Marlon G
Γ… Marlon Gβ€’16mo ago
Sweet! Thank you! For some reason this really hyped my motivation to learn CSS even more. Enjoy the weekend! πŸ˜ƒ