dotnet / dotnet/dotnet-api-docs
Consider formatting code for viewability
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
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](https://docs.microsoft.com/en-us/dotnet/api/system.stringcomparison?view=net-6.0#examples) with [this snippet](https://github.com/dotnet/dotnet-api-docs/blob/main/snippets/csharp/System/String/Equals/equals_ex3.cs) 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.

cc @gewarren @BillWagner
Contributor guide
Assessment
This issue has not been assessed yet.