mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00
Fix font adjustment for double-code embedding
Add additional CSS injection to prevent code tag embedded in code tag from having its font size adjusted twice. Discussion: https://postgr.es/m/20170408015201.GA18573@momjian.us
This commit is contained in:

committed by
Magnus Hagander

parent
82c28b2b18
commit
d7957a214d
@ -19,6 +19,9 @@ if (newMonoSize != 1)
|
||||
{
|
||||
document.write('<style type="text/css" media="screen">'
|
||||
+ '#docContainer tt, #docContainer pre, #docContainer code'
|
||||
+ '{font-size: ' + newMonoSize.toFixed(1) + 'em;}</style>\n');
|
||||
+ '{font-size: ' + newMonoSize.toFixed(1) + 'em;}</style>\n'
|
||||
/* prevent embedded code tags from changing font size */
|
||||
+ '#docContainer code code'
|
||||
+ '{font-size: 1em;}</style>\n');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user