From 2ba2af97cfc55240b25ba0abc5caba87447c2cc4 Mon Sep 17 00:00:00 2001 From: Volker E Date: Mon, 8 Nov 2021 21:58:57 -0800 Subject: [PATCH] Fix specificity of widespread `.external` selector Returning to `a.external` over only `.external` as it's used widely within MediaWiki and skins and it needs to kick in in appropriate places. `.external` is besides one false positive only for anchor elements, nonetheless more specific is simpler and more fail-safe than the other way round. Change-Id: I3e2fec26d1f835b11f9a66fdf4ba7faeca12d9d2 --- resources/common/typography.less | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/resources/common/typography.less b/resources/common/typography.less index e03fa6f5d..6f10e1118 100644 --- a/resources/common/typography.less +++ b/resources/common/typography.less @@ -136,11 +136,10 @@ pre, } // External links -.mw-parser-output { - .external { - background-image: url( images/external-link-ltr-icon.svg ); - background-position: center right; - background-repeat: no-repeat; - padding-right: 13px; - } +// Use of `a` element selector due to its widespread usage and for limiting generic class scope. +.mw-parser-output a.external { + background-image: url( images/external-link-ltr-icon.svg ); + background-position: center right; + background-repeat: no-repeat; + padding-right: 13px; }