Overview
| Artifact ID: | 7b25b41a160a705ae294a249df5b892fc8a67112ddf09c9162c73f4c7f4dbafd |
|---|---|
| Ticket: | 7f6005a867a432cc5a83fff7b7866fabd5f677eb
Magic <meta> viewport tag in generated HTML for mobile browsers |
| User & Date: | anonymous on 2021-06-18 18:20:45 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Currently, the HTML-format reference pages (as available from https://www.tcl.tk/man/) tend to look a bit odd on mobile browsers (Android, iOS). The exact misbehavior differs from device to device and browser to browser, but tends to involve rendering certain elements with extremely small font sizes. This occurs because mobile browsers pretend, by default, that their viewports are much larger than they really are, unless the page includes a special <meta> tag to tell them otherwise. The following adds such a tag to the generated reference pages, and makes them render more nicely, at least on my Android devices: Index: tools/tcltk-man2html-utils.tcl ================================================================== --- tools/tcltk-man2html-utils.tcl +++ tools/tcltk-man2html-utils.tcl @@ -78,11 +78,11 @@ set level "" if {[lindex $args end] eq "../[indexfile]"} { # XXX hack - assume same level for CSS file set level "../" } - set out "<!DOCTYPE html>\n<html lang=\"en\">\n<head><meta charset=\"utf-8\"><title>$title</title>\n[CSS $level]</head>\n" + set out "<!DOCTYPE html>\n<html lang=\"en\">\n<head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>$title</title>\n[CSS $level]</head>\n" foreach {uptitle url} $args { set header "<a href=\"$url\">$uptitle</a> <small>></small> $header" } append out "<body><h2>$header</h2>" global manual - foundin changed to: "trunk"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "d53d839b44106bbdb36827934c6b01eab6894287"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "53. Configuration and Build Tools"
- title changed to:
Magic <meta> viewport tag in generated HTML for mobile browsers
- type changed to: "Patch"