dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
702 stars 1.55k forks source link

Consider formatting code for viewability #8374

Open Rick-Anderson opened 2 years ago

Rick-Anderson commented 2 years ago

We have a rule that snippets shouldn't require a horizontal scroll bar on tablet sized devices. We simulate tablet size by making the widest browser window that doesn't have a left or right TOC. There are obvious exceptions, but in general the snippets in the ASP.NET Core docs rarely need a horizontal scroll bar for tablet sized displays. Consider this sample with this snippet on even a large monitor. The sample is so long you don't even get to the horizontal scroll bar. I can't see the code and can't even scroll. The new namespace syntax in C# 10 helps, but often you need to break up long horizontal lines.

image

cc @gewarren @BillWagner

dotnet-issue-labeler[bot] commented 2 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.