Skip to content

Fix some blur issues#125

Open
nuru00 wants to merge 2 commits intodonkuri:mainfrom
nuru00:fixedblur
Open

Fix some blur issues#125
nuru00 wants to merge 2 commits intodonkuri:mainfrom
nuru00:fixedblur

Conversation

@nuru00
Copy link
Contributor

@nuru00 nuru00 commented Nov 8, 2025

The first commit makes the design consistent by making the blurred image have rounded corners
Before:
3HGqdzfFWI
After:
ULTmrMAPmp
The second commit fixes main-picture-position: "alt" when it is paired with "nsfw-blur-contained: "on"
Before:
pythonw_Ib2zVLzEmf
After:
WqrW7gf5Lo
Due to font-size: 0 now being on the container, there is some lost margin that needs to be manually added back.

@donkuri
Copy link
Owner

donkuri commented Nov 16, 2025

No issue on my end. @itokatsu @bewizible

@bewizible
Copy link
Collaborator

l don't really mind the changes this brings about, I think.

@itokatsu
Copy link
Contributor

itokatsu commented Nov 18, 2025

Thanks for your contributions especially that bugfix.
Seeing this I feel we should also move the border from the image to the container, keeping it visible / unblurred.
It feels really off removing the blur and see it appearing.

This aside, looks solid to me.

@nuru00
Copy link
Contributor Author

nuru00 commented Nov 18, 2025

I thought about that but then you would also have to add:

#lapis:not([data-nsfw-blur-contained="on"]) .image-alt.NSFW,
#lapis:not([data-nsfw-blur-contained="on"]) .image-alt.nsfw,
#lapis:not([data-nsfw-blur-contained="on"]) .image-alt.Nsfw {
  border: solid transparent 2px;

  &:hover {
    border: solid var(--fg-subtle) 2px;
  }
}

Otherwise the unblurred border would show through the blur when nsfw-blur-contained is off. I also don't like how you can see border abruptly appear if you pay close attention but that's just a minor nitpick. I'm happy with either approach.

EDIT: Nevermind, I remembered the reason I went for this approach was because of how hacky this gets. If you move the border to the container then the image doesn't fit properly because of border-radius: 5px, if you override it to 0px then the image corners are over the border and you can't set overflow: hidden because that would just be nsfw-blur-contained=on. In the end the simplest solution would be to set border-radius to 3px and call it good enough.

@nuru00
Copy link
Contributor Author

nuru00 commented Nov 18, 2025

The best that I can come up with is something like this:

.image-alt {
  margin: auto;
  margin-bottom: 10px;
  width: fit-content;
  max-width: 60%;
  border: solid var(--fg-subtle) 2px;
  font-size: 0;

  & img {
    max-height: 250px;
    border-radius: 0px;
  }

  &:hover {
    overflow: hidden;
  }

  &:not(.NSFW):not(.nsfw):not(.Nsfw) {
    overflow: hidden;
  }
}

#lapis:not([data-nsfw-blur-contained="on"]) .image-alt.NSFW,
#lapis:not([data-nsfw-blur-contained="on"]) .image-alt.nsfw,
#lapis:not([data-nsfw-blur-contained="on"]) .image-alt.Nsfw {
  border: solid transparent 2px;

  &:hover {
    border: solid var(--fg-subtle) 2px;
  }
}

@itokatsu
Copy link
Contributor

Yeah this is annoying… I think we're better off either removing the border, or the option to have the non-contained blur altogether.

@donkuri
Copy link
Owner

donkuri commented Nov 21, 2025

Personally, I am fine with having the blur be contained at all times. This is how I've always used it.

@bewizible
Copy link
Collaborator

Keeping aside whether the blur should be contained or not when it's below the word box, I feel like for when it's side-by-side we should keep the blur not being contained option as well. Hmm.

@nuru00
Copy link
Contributor Author

nuru00 commented Nov 23, 2025

I agree, I think the best trade-off between number of users satisfied and clean code would be either this PR in its current state or to make non-contained blur exclusive to side-by-side.

@bewizible
Copy link
Collaborator

@nuru00 I'm afraid I don't understand one thing, with the PR as it is currently, have we removed non-contained blur entirely?
I'm in favor of making non-contained blur a side-by-side only thing I think. We can contain it in alt and if the user wants, and maybe keep/add the option to do that in side-by-side too. @itokatsu thoughts?

@nuru00
Copy link
Contributor Author

nuru00 commented Nov 23, 2025

No, this just fixes a bug with contained blur in alt, with the caveat that the border gets blurred together with the image. IMO, this is better than removing the choice for users to have non-contained blur with alt.

@itokatsu
Copy link
Contributor

@bewizible Not really a fan of the idea, It will be confusing to have the blur behave differently depending on the layout chosen.

@donkuri
Copy link
Owner

donkuri commented Nov 25, 2025

@bewizible Not really a fan of the idea, It will be confusing to have the blur behave differently depending on the layout chosen.

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants