Opened 4 years ago

Closed 3 years ago

#14880 closed defect (fixed)

Remove 1px border from img inside table

Reported by: dcf Owned by: Sebastian
Priority: Low Milestone:
Component: Webpages/Website Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I found this CSS rule that adds a 1px border to img inside table:

table td img,
table tr img {
	border: 1px solid #cac8a7;
	float: left;
	margin-right: 10px;
}

It doesn't appear to be used anywhere except in download/download-unix.html, where it looks like a bug. The only other files where img is nested in table are index.html and donate/thankyou.html, which both remove the border though more specific CSS rules.

I noticed this while trying to add a table to download-easy.html for #14838.

Child Tickets

Attachments (1)

borders.png (14.3 KB) - added by dcf 4 years ago.
How the borders appear on download-unix.html.

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by dcf

Attachment: borders.png added

How the borders appear on download-unix.html.

comment:1 Changed 4 years ago by dcf

Here is how the borders look on download-unix.html:
How the borders appear on download-unix.html.
This is the script I used to search for img nested in table:

#!/usr/bin/env python
import getopt
import sys
from bs4 import BeautifulSoup
opts, args = getopt.gnu_getopt(sys.argv[1:], "")
for filename in args:
    with open(filename) as f:
        soup = BeautifulSoup(f)
        for table in soup.find_all("table"):
            for img in table.find_all("img"):
                print filename, img

I ran it like this:

find . -name '*.html.en' | xargs ./search.py

comment:2 Changed 4 years ago by ilv

I've checked this and it seems correct. The imgs inside tables in index have the .project img class, and the imgs inside tables in donate/thankyou have the #thanks_btm .thankyou_h2 class.

I have fixed this in https://github.com/ilv/tpo/tree/download-unix_minor-fixes along with a fix for #14975.

comment:3 Changed 4 years ago by dcf

Status: newneeds_review

ilv has a branch in comment:2 that needs review.

comment:4 Changed 3 years ago by Sebastian

Severity: Normal

cherry-picked, thanks

comment:5 Changed 3 years ago by Sebastian

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.