DEV Community

Discussion on: Single-Side Curved "Border" With CSS `box-shadow`

Collapse
 
cchana profile image
Charanjit Chana

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!

Collapse
 
5t3ph profile image
Stephanie Eckles

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.

Collapse
 
cchana profile image
Charanjit Chana

Ah, I see now toggling with the dev tools. I was trying on mobile so wasn't obvious what was happening!