forked from gitea/gitea

Extract from https://github.com/go-gitea/gitea/pull/23553, just the parts that fix the diff tree height and the change to the file `:target` style. Fixes: https://github.com/go-gitea/gitea/issues/23593
Extract from https://github.com/go-gitea/gitea/pull/23553, just the parts that fix the diff tree height and the change to the file `:target` style. Fixes: https://github.com/go-gitea/gitea/issues/23593