Subject: bug#69815: [PATCH] Fix some CSS issues on elpa.gnu.org

From: john muhl <[email-masked]>
Date: Sun, 17 Mar 2024 21:01:44 -0500

Philip Kaludercic <[email-masked]> writes:

> john muhl <[email-masked]> writes:
>
>> Here are a few patches fixing some minor issues. The first one
>> makes the packages table always full-width and expands the footer
>> background so it contains all the footer text (see before.png).
>>
>> I noticed that with a very narrow view the CSS drops the rank
>> column to help fit but it doesn’t help quite enough to prevent
>> horizontal overflow (narrow.png). It seems to me that the version
>> column is the least important so the second patch changes the
>> narrow view to drop it instead of the rank (after.png).
>>
>> The last patch fixes the doctype for sub-pages. <!DOCTYPE HTML
>> PUBLIC> is not a valid doctype and so triggers quirks mode. Not a
>> big deal but probably better avoided.
>>
>>>>From f13cc711f0bf368f9acb1ae579ab9e078aefce1e Mon Sep 17 00:00:00 2001
>> From: john muhl <[email-masked]>
>> Date: Thu, 14 Mar 2024 13:22:52 -0500
>> Subject: [PATCH] Fix some CSS issues
>>
>> * html/layout.css (footer): Remove fixed height so the background
>> expands to encompass all footer content.
>> (table): Make packages table always use full page width.
>> ---
>>  html/layout.css | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/html/layout.css b/html/layout.css
>> index 7d3be41..9d04958 100644
>> --- a/html/layout.css
>> +++ b/html/layout.css
>> @@ -1,4 +1,4 @@
>> -l/* Copyright (C) 2010-2022, 2024 Free Software Foundation, Inc.
>> +/* Copyright (C) 2010-2022, 2024 Free Software Foundation, Inc.
>>  
>>  This file is free software: you can redistribute it and/or modify
>>  it under the terms of the GNU General Public License as published by
>> @@ -74,7 +74,7 @@ html, body {
>>    height: 100%;
>>    margin: 0 auto -50px; /* the bottom margin is the negative value of the footer's height */
>>  }
>> -footer, .push, .footer {
>> +.push {
>>    height: 90px; /* .push must be the same height as .footer */
>>  }
>>  
>> @@ -302,6 +302,10 @@ footer p, .footer p {
>>    line-height: 1.4em;
>>  }
>>  
>> +table {
>> +  width: 100%;
>> +}
>> +
>>  @media screen and (max-width: 999px) {
>>    .container {
>>      width: 600px;
>> @@ -313,10 +317,6 @@ footer p, .footer p {
>>      font-size: 1em;
>>    }
>>  
>> -  table {
>> -    width: 100%;
>> -  }
>> -  
>>    .container {
>>      width: 90%;
>>      padding: 40px 5%;
>> -- 
>> 2.41.0
>
> Looks good.
>
>>
>>>>From 5dafd0d3483336ff50b5039942bc35c41d30644f Mon Sep 17 00:00:00 2001
>> From: john muhl <[email-masked]>
>> Date: Thu, 14 Mar 2024 13:46:54 -0500
>> Subject: [PATCH] Show rank instead of version on narrow displays
>>
>> * html/layout.css (td):
>> (th): Hide version and right align rank column.
>> ---
>>  html/layout.css | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/html/layout.css b/html/layout.css
>> index 9d04958..02dfb87 100644
>> --- a/html/layout.css
>> +++ b/html/layout.css
>> @@ -283,6 +283,11 @@ td {
>>    border-bottom: 1px solid #ddd;
>>  }
>>  
>> +td:last-child,
>> +th:last-child {
>> +  text-align: right;
>> +}
>> +
>>  footer, .footer {
>>    border-top: 1px solid #999;
>>    text-align:center;
>> @@ -330,7 +335,7 @@ table {
>>      width: 300px;
>>    }
>>  
>> -  td:last-child, th:last-child {
>> +  td:nth-child(2), th:nth-child(2) {
>>      display: none;
>>    }
>>  
>> -- 
>> 2.41.0
>
>
> Why not show both, and allow scrolling horizontally (x-overflow: auto)
> if there is not enough space?
>
>>
>>
>>>>From 16547922cc9339e4f920ae62a1bee09c38625cbf Mon Sep 17 00:00:00 2001
>> From: john muhl <[email-masked]>
>> Date: Thu, 14 Mar 2024 16:54:45 -0500
>> Subject: [PATCH] * elpa-admin.el (elpaa--html-header): Fix DOCTYPE.
>>
>> ---
>>  elpa-admin.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/elpa-admin.el b/elpa-admin.el
>> index d4a9dcf..9475336 100644
>> --- a/elpa-admin.el
>> +++ b/elpa-admin.el
>> @@ -1544,7 +1544,7 @@ readme file has an unconventional name"
>>  ;;; Make the HTML pages for online browsing.
>>  
>>  (defun elpaa--html-header (title &optional header head-extra)
>> -  (format "<!DOCTYPE HTML PUBLIC>
>> +  (format "<!DOCTYPE HTML>
>
> What difference does this make?  Or rather how is this related to the
> other patches?  That should be explained in the commit message.

It’s unrelated. I just included it since it looked like a mistake.
If those pages require quirks mode then a better fix would be get
rid of that requirement. Checking now I see that they serve
non-conforming HTML so perhaps we should fix that first.