developer-stylechain / stylelint-a11y

Plugin for stylelint with a11y rules
MIT License
8 stars 1 forks source link

'no-outline-none' should also check for 'border: none'. #8

Open alainEHV opened 4 months ago

alainEHV commented 4 months ago

Right now, this scenario triggers an error/warning for the 'no-outline-none' rule:

&:focus {
    border: transparent;
    outline: none;
}

But these do not trigger an error/warning:

&:focus {
    border: 0;
    outline: none;
}

&:focus {
    border: none;
    outline: none;
}

Looking at the code for the 'no-outline-none' rule, adding an extra check for 'none' should be a small change. Assuming there's no underlying reason to ignore 'none'.

Some more work might be needed to debug why border: 0 does not trigger any warning.

alainEHV commented 4 months ago

I did a bit more digging, and border: 0 is also ignored. My initial message said it did trigger an error/warning.

You can check a demo link here.