Skip to content
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

Post styling improvement ideas #177

Open
FireIsGood opened this issue Jan 18, 2025 · 2 comments
Open

Post styling improvement ideas #177

FireIsGood opened this issue Jan 18, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@FireIsGood
Copy link

Just a quick once over on the current styles, here's what I found:

  • Blog names break out if they're max width. Mostly an issue if you have a thin phone and someone thinks it would be fun to max out their width.
  • Images are very cursed.
    • They are currently an absolutely positioned thing with a—what I presume to be calculated—padding bottom on a container div element. If I had to bet, I would assume this is you fighting with the implicit img element style of display: inline causing like 2-4px bottom margins that cannot be erased. Otherwise I have no idea why you would do this.
    • Please just make it display: block;. Please.
  • There's a 4px gap between things which could more effectively be done with just margins and line height.
  • A lot of your sizes are pixel based. Generally this is a bad idea.
    • Text elements have 15 pixel bottom margins when the default for that is 1em which is 16px by default.
      • This makes text below images very upset.
    • The general solution is to remember the semantic that rem units are for things you want to change when the user modifies their browser settings for larger text and that 1rem is equal to 16 pixels.
    • Text elements also have a letter spacing reduced a little. This breaks ligatures and has weird workarounds if you still wanted it.

Some freebies:

.interaction-buttons a {
  aspect-ratio: 1 / 1;
  display: flex;
  width: 1.5rem;
  justify-content: center;
  align-items: center;
}
.image-container img { /* though tbh just make it for all images by default*/
  display: block;
}

Good luck on this! I'm currently not able to contribute so I can't really do much for you other than this.

@syeopite
Copy link
Owner

syeopite commented Jan 18, 2025

The images are actually just replicating what Tumblr does in order to:

  1. Prevent layout shifts when the images are loaded

  2. Ensure that images follow a very specific aspect ratio that depends on how they are arranged within a photoset row and what size the smallest member of a row is.

It is very much cursed but I don't believe there is much else I can do in order to ensure that both of the two criterias are met.

I'll have to see if the the modern aspect-ratio property can fully replicate Tumblr's current behavior

@syeopite syeopite added the enhancement New feature or request label Jan 18, 2025
@FireIsGood
Copy link
Author

Dang that sucks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants