Authentication-Results: mail-b.sr.ht; dkim=pass header.d=bitfehler.net header.i=@bitfehler.net Received: from mx.bitfehler.net (mx.bitfehler.net [213.239.215.46]) by mail-b.sr.ht (Postfix) with ESMTPS id E467E11EFD8 for <~sircmpwn/sr.ht-dev@lists.sr.ht>; Thu, 1 Dec 2022 21:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitfehler.net; s=default; t=1669931601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FXSicHRZ2Er1b8eXhnA9xo6HfvTdMbxSkMd2j6HJ1fY=; b=pBGsen2iVAbTKL3kPvsH8vfauGJ4elJXjdjFQVeEuQfaPQgjfI5bUMsREbQdnwU5M0Tjjf U35H5fnpgb872U/9NfG3TDNVgq4sbw/xp7cX3UR9DZslP3LAgGyQuQF0d5NCgyfOpknmuR Aj5X1H9YTl5wQzbXqlD3X9uaCPCCMdBFlltpfj5HEQsMW2bdADTA9TjcEH6rUMrwVf2zt8 5xF5fE1ZAuSNUp1Es7oipi5exUlnd7xazW6dILTFwZEY3B0u7UHyAzP4gIQieiFeVJseFu Vcy53VNFGqa5A3t96PXi0CwSzsqaWX3BL+JFWrbr2yqulPQ8JeguArbJ6ynXMw== Received: from localhost.localdomain (2a02-2454-31d-5f00--feb.dyn6.pyur.net [2a02:2454:31d:5f00::feb]) by mx.bitfehler.net (OpenSMTPD) with ESMTPSA id 2b311590 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <~sircmpwn/sr.ht-dev@lists.sr.ht>; Thu, 1 Dec 2022 21:53:21 +0000 (UTC) From: Conrad Hoffmann To: ~sircmpwn/sr.ht-dev@lists.sr.ht Subject: [PATCH git.sr.ht 1/2] Revert "Change markup for diff insert/delete lines" Date: Thu, 1 Dec 2022 22:53:19 +0100 Message-Id: <20221201215320.615535-1-ch@bitfehler.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This reverts commit b75d2f0e03317c9b37dfdb702f3a959555309890. This commit has some issues: - It uses / not for the content that was actually added/removed (i.e. the diff), but for the line stats. I don't think that helps accessibility, it might actually make it worse. - It adds some CSS to apply text decoration to /, but only inside the `diff` class. However, the elements never occur inside the `diff` class (see first item). The CSS is never used. - Instead, the place where it was used (line stats) got unintended text decoration applied, causing a follow-up commit which fixed this the wrong way, causing yet more issues (fixed in next commit). I think the one place where it would make sense to apply / is the diff itself, but that might be a more serious operation. --- gitsrht/templates/utils.html | 4 ++-- scss/main.scss | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gitsrht/templates/utils.html b/gitsrht/templates/utils.html index 9a9637d..14d6c75 100644 --- a/gitsrht/templates/utils.html +++ b/gitsrht/templates/utils.html @@ -195,8 +195,8 @@ instead. target="_blank" {% endif %} >{{patch.delta.new_file.raw_path.decode('utf-8', 'replace')}}{# - #} +{{patch.line_stats[1]}}{# - #} -{{patch.line_stats[2]}}{% + #} +{{patch.line_stats[1]}}{# + #} -{{patch.line_stats[2]}}{% if patch.delta.old_file.mode != patch.delta.new_file.mode %}{# #}{# #}{% endif %} diff --git a/scss/main.scss b/scss/main.scss index 31f5317..a5530ee 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -273,7 +273,6 @@ del { } .diff { - ins, del, .lineno { text-decoration: none; } -- 2.38.1