Skip to content

Commit bd3af79

Browse files
authored
fix(contributors): use float layout instead of table for HTML format (#75)
Replace table-based layout with align=left on images to float them horizontally. This avoids both GitHub's display:block stacking issue and the unwanted table borders. A trailing br clear=all prevents subsequent content from wrapping around the floated images.
1 parent 3a63596 commit bd3af79

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/contributors.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ jobs:
7474
url=$(echo "$user_info" | jq -r '.html_url')
7575
7676
if [[ "$OUTPUT_FORMAT" == "html" ]]; then
77-
# HTML format with enforced size (table cells prevent GitHub's display:block from stacking images)
78-
contributor_output="$contributor_output<td><a href=\"$url\"><img src=\"${avatar}&s=64\" width=\"64\" height=\"64\" alt=\"$login\"></a></td>"
77+
# HTML format with enforced size (align=left floats images horizontally despite GitHub's display:block)
78+
contributor_output="$contributor_output<a href=\"$url\"><img src=\"${avatar}&s=64\" width=\"64\" height=\"64\" align=\"left\" alt=\"$login\"></a> "
7979
else
8080
# Markdown format (default)
8181
contributor_output="$contributor_output[![$login](${avatar}&s=64)]($url) "
@@ -85,7 +85,7 @@ jobs:
8585
# Build the contributors section
8686
if [[ "$OUTPUT_FORMAT" == "html" ]]; then
8787
contrib_section="<!-- readme: contributors -start -->
88-
<table><tr>$contributor_output</tr></table>
88+
${contributor_output}<br clear=\"all\">
8989
<!-- readme: contributors -end -->"
9090
else
9191
contrib_section="<!-- readme: contributors -start -->

0 commit comments

Comments
 (0)