[Docs] Update ClangFormatStyleOptions.rst's versionbadge's to have min-width
authorShivam Gupta <Shivam.Gupta2@amd.com>
Fri, 14 Apr 2023 18:14:39 +0000 (23:44 +0530)
committerShivam Gupta <Shivam.Gupta2@amd.com>
Fri, 14 Apr 2023 18:27:26 +0000 (23:57 +0530)
This fix https://github.com/llvm/llvm-project/issues/61934

By default, the width property is used to set the width of a table column.
However, if the content of a cell in that column is wider than the width
specified by the width property, the cell's content will overflow the
column and the table will become wider than the specified width.
This causes the version numbers to be displayed outside of their table cells.

Using the min-width property instead of width ensures that the column is
wide enough to accommodate the content of its cells. If a cell's content is
wider than the specified min-width, the column will expand to fit the content.

clang/docs/ClangFormatStyleOptions.rst

index 899d5b2..2e90389 100644 (file)
@@ -7,7 +7,7 @@
 .. raw:: html
 
       <style type="text/css">
-        .versionbadge { background-color: #1c913d; height: 20px; display: inline-block; width: 120px; text-align: center; border-radius: 5px; color: #FFFFFF; font-family: "Verdana,Geneva,DejaVu Sans,sans-serif"; }
+        .versionbadge { background-color: #1c913d; height: 20px; display: inline-block; min-width: 120px; text-align: center; border-radius: 5px; color: #FFFFFF; font-family: "Verdana,Geneva,DejaVu Sans,sans-serif"; }
       </style>
 
 .. role:: versionbadge