[wp-meta] [Making WordPress.org] #6877: Slack icon incorrectly showing for URLs on Make

Making WordPress.org noreply at wordpress.org
Tue Mar 21 18:20:19 UTC 2023


#6877: Slack icon incorrectly showing for URLs on Make
--------------------------------------+-----------------------
 Reporter:  desrosj                   |      Owner:  (none)
     Type:  defect (bug)              |     Status:  new
 Priority:  normal                    |  Milestone:
Component:  Make (Get Involved) / P2  |   Keywords:  has-patch
--------------------------------------+-----------------------
 I noticed while [https://make.wordpress.org/community/2023/03/20
 /contributor-working-group-mentorship-kick-off-chat-agenda-march-20th-1200
 -utc-emea-and-2100-utc-amer/ reading a recent post on the Community Make
 blog] that all anchor tags with `.slack.com` show the Slack icon to the
 left of the link, regardless of where that string matches within the
 `href` attribute.

 In this case, the link is a Google Calendar link that includes a link to a
 Slack channel. This is because the `attr*=value`
 [https://www.w3.org/TR/selectors-3/#attribute-substrings substring
 matching selector] is being used, which matches elements that contain the
 value anywhere within the specified attribute.

 Changing the CSS selector to use the `attr^=val` value selector will only
 add the icon to elements that start with a Slack URL. I think the original
 intent was probably to always show the icon no matter which Slack instance
 is being linked to, but adding a rule for each officially endorsed Slack
 instance seems fine as there won't be many (if there's even others today).

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/6877>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list