-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cxl-ui): center instructor image #406
Conversation
size-limit report 📦
|
@@ -132,7 +132,7 @@ | |||
@media #{mq.$large} { | |||
position: absolute; | |||
bottom: calc(-1 * var(--lumo-space-xl)); | |||
right: calc(2 * var(--lumo-space-xl)); | |||
right: calc(27.5% - 200px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still a lot of magic numbers 🤔 is there no way to have some canonical generic numberless positioning formula here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having trouble finding a formula that can calculate centering the image(400px) two thirds to the right of the container. The container is absolutely positioned which makes it difficult to just use relative units. I'm trying now in inspector, and using left: calc(50% + 100px)
instead of right
, looks a bit better. 100px being 1/4 of the width of the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -132,7 +132,7 @@ | |||
@media #{mq.$large} { | |||
position: absolute; | |||
bottom: calc(-1 * var(--lumo-space-xl)); | |||
right: calc(2 * var(--lumo-space-xl)); | |||
right: calc(27.5% - 200px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anoblet ping |
a1123c3
to
6cc8625
Compare
Although it may seem like more of a magic number, |
6cc8625
to
51dd62d
Compare
What about the option of JS inline style calculations based on actual image size? |
It'd be perfect but this is suppose to be a quick task. We don't want to spend on it more than we already did. Proposed solution is going live. |
51dd62d
to
105ebf1
Compare
What exactly was spent here? Majority of the time it's been sitting waiting for review. This «giving up» style is a sure way to build into tech debt. |
https://app.clickup.com/t/86b00z797