Aspnetcore: Visual Studio 2017 max-width:fit-content CSS Validation

Created on 11 Apr 2018  路  6Comments  路  Source: dotnet/aspnetcore

While creating a asp.net web application I noticed that this css is being marked as an invalid value.

 .LongevityTable {
        max-width: fit-content;
    }

It is certainly valid css as documented here
https://developer.mozilla.org/en-US/docs/Web/CSS/max-width

I'm using Visual Studio 2017 Community

Most helpful comment

Done. Thank you for your assistance Eilon.

All 6 comments

@jaygriggs - where is that CSS located? Is it a custom style that is part of your app, or part of the default templates?

Hi Eilon,
I find that it's marked invalid if it's in site.css or on the individual page as inline styling.
Obviously to target FireFox you would use -moz-fit-content which has the same issue.

Just to make sure I understand, this is custom CSS that you added to a project, and VS is incorrectly flagging it as invalid? If that's the case, the best way to report these issues is directly within VS by clicking the "Send feedback" button in the upper-right corner of the VS window.

Done. Thank you for your assistance Eilon.

@jaygriggs I'm having the same issue in VS 2019 Preview, did you resolve it?

No not at all. Many conversations with the VS team has shown me that the reason for these types of issues is they follow EDGE/Internet explorer guidelines. If the code is invalid in EDGE(shows in VS) Funny that the whole tool has issues because they follow Edge guidelines. I have no clue what their thoughts are now that they announced they are giving up on Edge and moving to the Chromium core.

Was this page helpful?
0 / 5 - 0 ratings