-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Description
Forgive me if this is already in progress anywhere I've missed or is indeed already possible, however, it would be good if there were classes to position elements centrally.
I've just added this CSS to my page, trying to keep the naming convention:
.pin-c-x {
left: 50%;
transform: translateX(-50%);
}
.pin-c-y {
top: 50%;
transform: translateY(-50%);
}
.pin-c {
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
Using pin-x and pin-y doesn't achieve this as they "stretch" the element to the top and bottom.
I have a codepen to demonstrate here: https://codepen.io/mattrogowski/pen/LdpVNw
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels