docs/uidesign/monospace.html: Add textareas to the demo

It seems that textareas have their own font-size set in Chrome (but not
Firefox and other browsers), making them unaffected by this behavior.

Change-Id: I811245ea26b4d90ad252fe8f6d2e096e27cb9073
This commit is contained in:
Bartosz Dziewoński 2017-09-28 05:19:20 +02:00 committed by Krinkle
parent 6c6d5fd34d
commit 84b634a9a8

View file

@ -2,16 +2,25 @@
<html lang="en" dir="ltr"> <html lang="en" dir="ltr">
<head> <head>
<style> <style>
pre { pre,
textarea {
border: 1px dashed #AAA; border: 1px dashed #AAA;
background-color: #E0E0E0; background-color: #E0E0E0;
color: #000000; color: #000000;
margin: 1em 10%;
padding: 0.5em; padding: 0.5em;
height: 1em;
width: 90%;
} }
blockquote { blockquote {
font-style: italic; font-style: italic;
} }
table {
width: 100%;
table-layout: fixed;
}
td {
padding: 0.5em;
}
</style> </style>
</head> </head>
<body> <body>
@ -33,45 +42,138 @@ font besides just "monospace", those browsers will no longer treat it as
monospace and use 0.8 x 16px = 13px instead. monospace and use 0.8 x 16px = 13px instead.
</blockquote> </blockquote>
<p> <p>
Additionally, it seems that textareas have their own font-size set in Chrome
(but not Firefox and other browsers), making them unaffected by this behavior.
</p>
<p>
Below are various rendering: Below are various rendering:
</p> </p>
<table>
<tr>
<th>&lt;pre&gt;</th>
<th>&lt;textarea&gt;</th>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: monospace;'> font-family: monospace;'>
font-family: monospace; font-family: monospace;
</pre> </pre>
</td>
<td>
<textarea style='
font-family: monospace;'>
font-family: monospace;
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: "Courier New";'> font-family: "Courier New";'>
font-family: "Courier New"; font-family: "Courier New";
</pre> </pre>
</td>
<td>
<textarea style='
font-family: "Courier New";'>
font-family: "Courier New";
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: Courier;'> font-family: Courier;'>
font-family: Courier; font-family: Courier;
</pre> </pre>
</td>
<td>
<textarea style='
font-family: Courier;'>
font-family: Courier;
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: monospace, monospace;'> font-family: monospace, monospace;'>
font-family: monospace, monospace; font-family: monospace, monospace;
</pre> </pre>
</td>
<td>
<textarea style='
font-family: monospace, monospace;'>
font-family: monospace, monospace;
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: monospace, "Courier New";'> font-family: monospace, "Courier New";'>
font-family: monospace, "Courier New"; font-family: monospace, "Courier New";
</pre> </pre>
</td>
<td>
<textarea style='
font-family: monospace, "Courier New";'>
font-family: monospace, "Courier New";
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: monospace, Courier;'> font-family: monospace, Courier;'>
font-family: monospace, Courier; font-family: monospace, Courier;
</pre> </pre>
</td>
<td>
<textarea style='
font-family: monospace, Courier;'>
font-family: monospace, Courier;
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: monospace, Verdana;'> font-family: monospace, Verdana;'>
font-family: monospace, Verdana; font-family: monospace, Verdana;
</pre> </pre>
</td>
<td>
<textarea style='
font-family: monospace, Verdana;'>
font-family: monospace, Verdana;
</textarea>
</td>
</tr>
<tr>
<td>
<pre style=' <pre style='
font-family: monospace, DOESNOTEXISTREALLY;'> font-family: monospace, DOESNOTEXISTREALLY;'>
font-family: monospace, DOESNOTEXISTREALLY; font-family: monospace, DOESNOTEXISTREALLY;
</pre> </pre>
</td>
<td>
<textarea style='
font-family: monospace, DOESNOTEXISTREALLY;'>
font-family: monospace, DOESNOTEXISTREALLY;
</textarea>
</td>
</tr>
</table>