I don’t really understand why specifying display: grid is required. The default block should be enough and commenting that line it makes no difference as far as I can see?
I like how you’ve used shadows to solve this, I probably used a border and either flattened the side or left it with untidy corners. This is a much better solution!
Try toggling it with browser DevTools instead of within CodePen to see a slightly more immediate effect. Without it, the negative margins on the paragraph do not resolve the leading space (as described). I checked that behavior is the same in Chrome, Firefox, and Safari so let me know if you are using something different.
I don’t really understand why specifying
display: grid
is required. The defaultblock
should be enough and commenting that line it makes no difference as far as I can see?I like how you’ve used shadows to solve this, I probably used a border and either flattened the side or left it with untidy corners. This is a much better solution!
Try toggling it with browser DevTools instead of within CodePen to see a slightly more immediate effect. Without it, the negative margins on the paragraph do not resolve the leading space (as described). I checked that behavior is the same in Chrome, Firefox, and Safari so let me know if you are using something different.
Ah, I see now toggling with the dev tools. I was trying on mobile so wasn't obvious what was happening!