If some functionality doesn't work properly for you, disable it within the configuration file
and report a bug.
Be careful of using attribute selectors on id and class attributes, when using id and class minification.
HSPP should work correctly with UTF-8 encoding and encodings, which are a subset of it.
Also 8-bit encodings such as ISO 8859-x and windows-125x should not cause problems.
000.500 ➔ .5
001.000 ➔ 1
100000 ➔ 1e5
1230000 ➔ 123e4
10 ➔ 10 (not 1e1!)
100 ➔ 100 (not 1e2!)
#aabbcc ➔ #abc
#aabbccdd ➔ #abcd
rgb() and rgba() functions will be rewritten as hex color.
rgb(51, 102, 153)rgb(20%, 40%, 60%)rgb(51, 102, 153, 1)rgb(20%, 40%, 60%, 1)rgb(51, 102, 153, 100%)rgb(20%, 40%, 60%, 100%)rgb(51 102 153)rgb(20% 40% 60%)rgb(51 102 153 / 1)rgb(20% 40% 60% / 1)rgb(51 102 153 / 100%)rgb(20% 40% 60% / 100%)#369.
use_rgba_hex_notation is disabled and alpha is < 100%, each of
rgb(51, 102, 153, 0.5)rgb(20%, 40%, 60%, 0.5)rgb(51, 102, 153, 50%)rgb(20%, 40%, 60%, 50%)rgb(51,102,153,.5)
rgb(51 102 153 / 0.5)rgb(20% 40% 60% / 0.5)rgb(51 102 153 / 50%)rgb(20% 40% 60% / 50%)rgb(51 102 153/.5).
use_rgba_hex_notation is enabled and alpha is < 100%, each of
rgb(51, 102, 153, 0.5)rgb(20%, 40%, 60%, 0.5)rgb(51, 102, 153, 50%)rgb(20%, 40%, 60%, 50%)rgb(51 102 153 / 0.5)rgb(20% 40% 60% / 0.5)rgb(51 102 153 / 50%)rgb(20% 40% 60% / 50%)#3366997f.
rgb() and rgba() functions is the same.
minify_ids, minify_class_names,
minify_custom_properties, minify_animation_names).
#some-id {...} ➔ #a{...}
.some-class {...} ➔ .a{...}
--some-color: #abc ➔ --a:#abc
color: var(--some-color) ➔ color:var(--a)
@keyframes fade-in {...} ➔ @keyframes a{...}
animation-name: fade-in ➔ animation-name:a
input[type="text"] {...} ➔ input[type=text]{...}
from {...} ➔ 0%{...}
100% {...} ➔ to{...}
remove_empty_rules is enabled, empty rules will be removed.
.some-class > img { }
--help
--config-info
--create-config-file
--config-file
./hspp --config-file "/path/to/config/file/hspp.ini"
hspp --config-file "C:\path\to\config\file\hspp.ini"
--stdo
-i
input_working_directory is set, this has to be a relative path.
-o
output_working_directory is set, this has to be a relative path.
--config-info.
--create-config-file argument to the executable.
The configuration file will be created into directory in which the executable file of HSPP is located.
[general] belong to this header, until the
next header or the end of file is reached.
# starts a comment, which ends at the end of line.[general]
css_file_extensions
input_working_directory
output_working_directory
input_path
input_working_directory is set, this has to be a relative path.
output_path
output_working_directory is set, this has to be a relative path.
-i and -o, when used,
will override path settings of the configuration file.
php_id_array_name
php_class_array_name
php_cprop_array_name
php_animation_array_name
create_php_include_file is enabled.
on / off
create_php_include_file
@keyframes animation names.
use_utf8_bom
@charset rules will be removed.
If the @charset rule defines another encoding, HSPP will prompt you to either
remove the @charset rule or not to write UTF-8 BOM.
[css]
comment_terms
remove_comments is enabled.
To remove all comments, this list has to be empty.
on / off
include_external_stylesheets
@import rules with the contents of a file pointed to by the rule.
If the @import rule has a list of media queries, the content in the output
will be wrapped by a @media rule which expressions
contain this media queries.
remove_comments
comment_terms, will not be removed.
minify_numbers
minify_colors
rewrite_angles
use_rgba_hex_notation
#aabbccdd / #abcd
minify_ids
minify_class_names
minify_custom_properties
minify_animation_names
rewrite_functions
hsl() / hsla() functions to rgb() / rgba() functions or hexadecimal color notation.
The generated result depends on option use_rgba_hex_notation.
linear-gradient() function so that it will get shorter without changing the resulting gradient.linear-gradient() functions using percentage color stops are handled.
remove_empty_rules
merge_media_rules
@media rules with same expressions.
create_php_include_file
and at least one of
minify_ids,
minify_class_names,
minify_custom_properties,
minify_animation_names
are enabled, a PHP include file will be created within the output directory.
exec() or shell_exec() functions.