diff --git a/csscompressor/__init__.py b/csscompressor/__init__.py
index 1b41119..1233cd3 100644
--- a/csscompressor/__init__.py
+++ b/csscompressor/__init__.py
@@ -56,9 +56,12 @@ _space_after_re = re.compile(r'([!{}:;>+\(\[,])\s+')
 _semi_re = re.compile(r';+}')
 
 _zero_fmt_spec_re = re.compile(r'''(\s|:|\(|,)(?:0?\.)?0
-                                    (?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|m?s|k?hz)''',
+                                    (?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|k?hz)''',
                                re.I | re.X)
 
+_zero_req_unit_re = re.compile(r'''(\s|:|\(|,)(?:0?\.)?0
+                                    (m?s)''', re.I | re.X)
+
 _bg_pos_re = re.compile(r'''(background-position|webkit-mask-position|transform-origin|
                                 webkit-transform-origin|moz-transform-origin|o-transform-origin|
                                 ms-transform-origin):0(;|})''', re.I | re.X)
@@ -377,6 +380,9 @@ def _compress(css, max_linelen=0):
     # Replace 0(px,em,%) with 0.
     css = _zero_fmt_spec_re.sub(lambda match: match.group(1) + '0', css)
 
+    # Replace 0.0(m,ms) or .0(m,ms) with 0(m,ms)
+    css = _zero_req_unit_re.sub(lambda match: match.group(1) + '0' + match.group(2), css)
+
     # Replace 0 0 0 0; with 0.
     css = _quad_0_re.sub(r':0\1', css)
     css = _trip_0_re.sub(r':0\1', css)

Omitting the unit on a time value is invalid
Input: `csscompressor.compress("transition: background-color 1s linear 0ms;")`
Expected output: `'transition:background-color 1s linear 0ms;'`
Actual output: `'transition:background-color 1s linear 0;'`

According to the [MDN page on \<time>](https://developer.mozilla.org/en-US/docs/Web/CSS/time), omitting the unit is only valid for \<length>, so when I use csscompressor, the declaration containing the 0ms or 0s is ignored by both Firefox and Chrome.

The same case is for `<frequency>`, and probably a few of the other ones, I think. Omitting the unit used to be valid in CSS2, but breaks in CSS3 unfortunately.

This is a fairly simple fix (removing the `m?s` from `_zero_fmt_spec_re`), and I'll create a PR and some tests.
diff --git a/csscompressor/tests/test_yui.py b/csscompressor/tests/test_yui.py
index a0d6715..5d56d24 100644
--- a/csscompressor/tests/test_yui.py
+++ b/csscompressor/tests/test_yui.py
@@ -1458,7 +1458,7 @@ serve! */"""
 
         """
 
-        output = """a{margin:0;_padding-top:0;background-position:0 0;padding:0;transition:opacity 0;transition-delay:0;transform:rotate3d(0,0,0);pitch:0;pitch:0}"""
+        output = """a{margin:0;_padding-top:0;background-position:0 0;padding:0;transition:opacity 0s;transition-delay:0ms;transform:rotate3d(0,0,0);pitch:0;pitch:0}"""
 
         self._test(input, output)
 

pip install -e .
parse_log_pytest
pytest
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/sprymix/csscompressor.git@153ab1bb6cd925dc73a314af74db874a3314010f#egg=csscompressor
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: csscompressor
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
prefix: /opt/conda/envs/csscompressor

csscompressor/tests/test_yui.py::TestYUI::test_yui_zeros
csscompressor/tests/test_yui.py::TestYUI::test_yui_background_position csscompressor/tests/test_yui.py::TestYUI::test_yui_border_none csscompressor/tests/test_yui.py::TestYUI::test_yui_box_model_hack csscompressor/tests/test_yui.py::TestYUI::test_yui_bug2527974 csscompressor/tests/test_yui.py::TestYUI::test_yui_bug2527991 csscompressor/tests/test_yui.py::TestYUI::test_yui_bug2527998 csscompressor/tests/test_yui.py::TestYUI::test_yui_bug2528034 csscompressor/tests/test_yui.py::TestYUI::test_yui_charset_media csscompressor/tests/test_yui.py::TestYUI::test_yui_color_keyword csscompressor/tests/test_yui.py::TestYUI::test_yui_color_simple csscompressor/tests/test_yui.py::TestYUI::test_yui_color csscompressor/tests/test_yui.py::TestYUI::test_yui_comment csscompressor/tests/test_yui.py::TestYUI::test_yui_concat_charset csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_base64_doublequotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_base64_eof csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_base64_linebreakindata csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_base64_noquotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_base64_singlequotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_base64_twourls csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_dbquote_font csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_nonbase64_doublequotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_nonbase64_noquotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_noquote_multiline_font csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_realdata_doublequotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_realdata_noquotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_realdata_singlequotes csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_realdata_yuiapp csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_singlequote_font csscompressor/tests/test_yui.py::TestYUI::test_yui_decimals csscompressor/tests/test_yui.py::TestYUI::test_yui_dollar_header csscompressor/tests/test_yui.py::TestYUI::test_yui_font_face csscompressor/tests/test_yui.py::TestYUI::test_yui_ie5mac csscompressor/tests/test_yui.py::TestYUI::test_yui_lowercasing csscompressor/tests/test_yui.py::TestYUI::test_yui_media_empty_class csscompressor/tests/test_yui.py::TestYUI::test_yui_media_multi csscompressor/tests/test_yui.py::TestYUI::test_yui_media_test csscompressor/tests/test_yui.py::TestYUI::test_yui_old_ie_filter_matrix csscompressor/tests/test_yui.py::TestYUI::test_yui_opacity_filter csscompressor/tests/test_yui.py::TestYUI::test_yui_opera_pixel_ratio csscompressor/tests/test_yui.py::TestYUI::test_yui_preserve_case csscompressor/tests/test_yui.py::TestYUI::test_yui_preserve_important csscompressor/tests/test_yui.py::TestYUI::test_yui_preserve_new_line csscompressor/tests/test_yui.py::TestYUI::test_yui_preserve_strings csscompressor/tests/test_yui.py::TestYUI::test_yui_pseudo_first csscompressor/tests/test_yui.py::TestYUI::test_yui_pseudo csscompressor/tests/test_yui.py::TestYUI::test_yui_special_comments csscompressor/tests/test_yui.py::TestYUI::test_yui_star_underscore_hacks csscompressor/tests/test_yui.py::TestYUI::test_yui_string_in_comment csscompressor/tests/test_yui.py::TestYUI::test_yui_webkit_transform csscompressor/tests/test_yui.py::TestYUI::test_yui_dataurl_nonbase64_singlequotes
csscompressor/__init__.py
csscompressor/__init__.py