Inset and pseudo elements
Hi!
Is there a way of setting the red stripe to be glued to the left side of the
.content
container (inset-inline-start)?
I thought that the pseudo element, when container is position: relative;
and pseudo element is position: absolute
, would use the container as the layout referance, and not the viewport (or is it body
/ html
?). Would love to avoid the position of the red stripe to be a magic number thing, especially for responsiveness ...
Design:
https://github.com/AMarlonG/Materiality/blob/main/assets/11.jpg
Repo:
https://github.com/AMarlonG/Materiality4 Replies
you already have the the position to absolute, that is ok. But you didnt set a position yet. You can just add a
left: 0
and top: 0
for exampleBut if I say
left: 0
and top: 0
it looks like this. It doesn't stick to the left of the .content
like I want from the design.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes!
That was it, and of course it makes sense when you explain it.
Removes the need for
justify-self
as well.
Thanx a lot! 🙌