سؤال

I use Resharper 8

I have a css stylesheet file which has this class :

.textShadow
{
    text-shadow: 0px 1px 2px #5b5b5b;
}

When I hover it there is a suggestion (R#8 suggestion ) enter image description here

so when I click on it it says :

enter image description here

And so ,it added the vendor prefix :

enter image description here

But as far as I know , there is no -ms-text-shadow prefix.

Strange, but when I hover on the new added line , R#8 does say :

enter image description here

I don't understand , if R#8 knows that there is no such vendor prefix , why does he suggests it ?

هل كانت مفيدة؟

المحلول

Visual Studio 2012 has a lot of knowledge about CSS 3. The information is stored in %ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\Packages\1033\schemas\CSS. My guess is that the quick-fix to introduce -ms-text-shadow is based on ReSharper's own schema for CSS 3. However, the Visual Studio schema (in css-module-text.xml) does not have a definition for -ms-text-shadow and this could be the source of the ReSharper inspection.

If that is true ReSharper has two ways of inspecting CSS 3, one based on a ReSharper schema and another based on Visual Studio schema. That is a possible explanation of the unexpected behavior you experience.

It is my understanding that if you install Web Essentials in Visual Studio 2012 it will automatically update the CSS 3 schema files from the information located at Mads Kristensen's Real World Validator.

نصائح أخرى

I believe that it's a r# bug. I always use this web site to check compability and there's no text-shadow for IE until version 10:

http://caniuse.com/#feat=css-textshadow

but you could get the same result with this (in IE 9): https://stackoverflow.com/a/6900705/1384539

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top