Bug 239471 - Style sheet for "important" warning is too wide
Summary: Style sheet for "important" warning is too wide
Status: Closed Overcome By Events
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-doc (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-07-27 06:20 UTC by Tim Hogard
Modified: 2022-11-06 17:25 UTC (History)
2 users (show)

See Also:


Attachments
Proposed path for docbook.css (319 bytes, patch)
2019-07-27 06:24 UTC, Tim Hogard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hogard 2019-07-27 06:20:55 UTC
The "important" boxes on the web pages all hang over to the right compared to all the other boxes.  This is a result of the red highlight on the left side.

My proposed fixes is add a calculated width in a later element.  I did this to fail more gracefully in browsers that don't support calc.  Note the spaces in "90% - 11px" are required. 

--- docbook.css.orig	2019-07-27 15:56:36.000000000 +1000
+++ docbook.css	2019-07-27 16:07:41.000000000 +1000
@@ -334,14 +334,18 @@
 .important {
 	font-style:italic;
 	border: 1px solid #a00;
 	border-left: 12px solid #c00;
 	width: 90%;
 }
 
+.important {
+	width: calc(90% - 11px);
+}
+
 .warning {
 	color: #9F1313;
Comment 1 Tim Hogard 2019-07-27 06:24:47 UTC
Created attachment 206096 [details]
Proposed path for docbook.css
Comment 2 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2022-11-06 17:25:02 UTC
Thanks for the patch. We stop using this CSS code when we moved to Hugo/AsciiDoctor and created the new Documentation Portal.