CSS/SCSS: False positives

css

(Tomasz Poradzewski) #1

Hi,

.c-badge__icon {
	@extend .position-absolute;
}
  • Unexpected unknown media feature name “prefers-reduced-motion” (used by bootstrap4)

https://sonarcloud.io/project/issues?id=YetiForceCRM&issues=AWVmmxeLX2sY87p0VV9r&open=AWVmmxeLX2sY87p0VV9r

  @media screen and (prefers-reduced-motion: reduce) {}
  • Unexpected unknown pseudo-element selector “::i-block-chrome”

https://sonarcloud.io/project/issues?id=YetiForceCRM&issues=AWVmmxeLX2sY87p0VV9r&open=AWVmmxeLX2sY87p0VV9r

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  ::i-block-chrome, ::i-block-chrome {}

Are they all just false-positives?


(Elena Vilchik) #4

Hi,

Thanks for sharing with us your findings! and sorry for long reply:)

  • @extend: ticket is created https://github.com/SonarSource/sonar-css/issues/135

  • prefers-reduced-motion: I doubt if we should really ignore this feature:

    1. looks like it’s supported only in safari and mozilla, do you really want to use it?
    2. do you analyze “bootstrap” sources? it’s not recommended to analyze your dependencies
  • ::i-block-chrome - I can’t find any doc referencing it. Can you help on that?

Regards,
Elena