mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-25 02:19:12 -04:00
Add comments about deleting this code in future
If the :has pseudo-class becomes available in the browsers we support in future, the code this branch/pull request adds will be redundant as its behaviour will be possible only using CSS. This adds comments to note this to the parts of the code you'd need to remove.
This commit is contained in:
@@ -25,6 +25,10 @@ $(() => $('.govuk-header__container').on('click', function() {
|
||||
$(this).css('border-color', '#005ea5');
|
||||
}));
|
||||
|
||||
// Applies our expanded focus style to the siblings of links when that link is wrapped in a heading.
|
||||
//
|
||||
// This will be possible in CSS in the future, using the :has pseudo-class. When :has is available
|
||||
// in the browsers we support, this code can be replaced with a CSS-only solution.
|
||||
$('.js-mark-focus-on-parent').on('focus blur', '*', e => {
|
||||
$target = $(e.target);
|
||||
if (e.type === 'focusin') {
|
||||
|
||||
Reference in New Issue
Block a user