Skip to content

Commit 9bb3bc3

Browse files
committed
Update the part about CSS minification
1 parent 8a66cc4 commit 9bb3bc3

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

faq.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,15 @@ <h4>The style database is an abstraction that supplies initial values for proper
107107
<p>The <a href="usage.html#cascade">user agent sheet</a> depends on the document type and is not always loaded, while the <a href="api/3/io/sf/carte/doc/style/css/StyleDatabase.html">style database</a>
108108
is document-independent (but medium-specific).</p>
109109
</div>
110-
<div id="minifywarn">
111-
<h4>Are the minification methods recommended for production use?</h4>
112-
<p>This library's support for minification (<code>getMinifiedCssText()</code> and related methods) is not intended as a
113-
general-purpose minification solution, but could be useful as part of a wider CSS toolchain, perhaps with a specialized
114-
minifier at its end.</p>
115-
<p>If you decide to use the minification methods in 1.x be sure to use this library's internal parser, and not the other SAC parsers.
116-
And if you use any kind of Internet Explorer hack, please use a sheet factory with the proper NSAC parser flags set. Some IE hacks are
117-
supported, but others may give unexpected results so you should be very careful about that.</p>
110+
<div id="minify">
111+
<h4>Can this library be used as a general-purpose CSS minifier?</h4>
112+
<p>This library's support for minification (the <code><a
113+
href="api/latest/io.sf.carte.css4j/io/sf/carte/doc/style/css/util/Minify.html">Minify</a></code>
114+
class, or methods like <code><a
115+
href="api/latest/io.sf.carte.css4j/io/sf/carte/doc/style/css/om/AbstractStyleSheet.html#toMinifiedString()">toMinifiedString()</a></code>
116+
and the various <code>getMinifiedCssText()</code>) will not produce output of the smallest size,
117+
but should be significantly more reliable than alternatives like YUI Compressor.</p>
118+
<p>See also the part about <a href="usage.html#minification">minification in the Usage Guide</a>.</p>
118119
</div>
119120
<div id="mavencentral">
120121
<h4>Are this project's artifacts available on Maven Central?</h4>

usage.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,8 @@ <h2>Minification</h2>
11671167
href="api/latest/io.sf.carte.css4j/io/sf/carte/doc/style/css/util/Minify.html">Minify</a> convenience
11681168
class does just that.
11691169
</p>
1170+
<p><em>Note: if you minify CSS that uses Internet Explorer hacks, first be sure that it is limited to
1171+
only use the <a href="#legacycompat">legacy hacks that this library supports</a>.</em></p>
11701172
<h3 class="subtema" id="yuicompressor">Beware of YUI Compressor</h3>
11711173
<p>For further minification, you could choose to apply a specialized minification utility to the output of
11721174
<code>toMinifiedString()</code>, and <a href="https://github.com/yui/yuicompressor" target="_blank">YUI

0 commit comments

Comments
 (0)