Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(avoid-inline-spacing): add spacing threshold #3533

Merged
merged 12 commits into from
Aug 9, 2022

Conversation

WilcoFiers
Copy link
Contributor

  • Replaces the avoid-inline-styling check three new checks, one for each CSS property
  • Add a important-css-property evaluate method
  • Enable ACT rule tests related to the avoid-inline-spacing axe-core rule
  • For the line-height property, only fail multi-line texts

Closes issue: #3467

@WilcoFiers WilcoFiers marked this pull request as ready for review July 20, 2022 08:57
@WilcoFiers WilcoFiers requested a review from a team as a code owner July 20, 2022 08:57
test/checks/shared/inline-style-property.js Outdated Show resolved Hide resolved
test/checks/shared/inline-style-property.js Outdated Show resolved Hide resolved
test/checks/shared/inline-style-property.js Outdated Show resolved Hide resolved
});
});

(isIE11 ? xit : it)('is false when `initial` (meaning `normal`) is used along with !important', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the parenthesis meaning, super helpful.

lib/checks/shared/inline-style-property-evaluate.js Outdated Show resolved Hide resolved
assert.isNull(checkContext._data);
});

(isIE11 ? xit : it)('is false when below 1.5em and !important', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this IE skip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beat me... IE reported the value as 0.19. Guess IE just cannot count. Didn't think it worth debugging since we're pulling IE soon.

test/checks/shared/inline-style-property.js Show resolved Hide resolved
lib/commons/text/get-line-count.js Outdated Show resolved Hide resolved
lib/commons/text/get-line-count.js Outdated Show resolved Hide resolved
@WilcoFiers WilcoFiers dismissed a stale review via 0a988b7 August 8, 2022 08:12
WilcoFiers and others added 3 commits August 8, 2022 10:12
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
The cheese grater is in the way!
</p>

<!-- CSS keywords -->
Copy link
Contributor Author

@WilcoFiers WilcoFiers Aug 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add "initial", since IE chokes on that. It's covered by unit tests anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants