css-inline 0.20.0__tar.gz → 0.20.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {css_inline-0.20.0 → css_inline-0.20.1}/PKG-INFO +1 -1
  2. {css_inline-0.20.0 → css_inline-0.20.1}/bindings/python/CHANGELOG.md +14 -1
  3. {css_inline-0.20.0 → css_inline-0.20.1}/bindings/python/Cargo.lock +95 -96
  4. {css_inline-0.20.0 → css_inline-0.20.1}/bindings/python/Cargo.toml +1 -1
  5. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/Cargo.toml +3 -6
  6. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/README.md +1 -0
  7. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/serializer.rs +16 -5
  8. {css_inline-0.20.0 → css_inline-0.20.1}/LICENSE +0 -0
  9. {css_inline-0.20.0 → css_inline-0.20.1}/README.md +0 -0
  10. {css_inline-0.20.0 → css_inline-0.20.1}/bindings/python/README.md +0 -0
  11. {css_inline-0.20.0 → css_inline-0.20.1}/bindings/python/build.rs +0 -0
  12. {css_inline-0.20.0 → css_inline-0.20.1}/bindings/python/src/lib.rs +0 -0
  13. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/benches/inliner.rs +0 -0
  14. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/rustfmt.toml +0 -0
  15. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/error.rs +0 -0
  16. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/attributes.rs +0 -0
  17. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/document.rs +0 -0
  18. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/element.rs +0 -0
  19. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/iter.rs +0 -0
  20. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/mod.rs +0 -0
  21. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/node.rs +0 -0
  22. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/parser.rs +0 -0
  23. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/attr_value.rs +0 -0
  24. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/local_name.rs +0 -0
  25. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/mod.rs +0 -0
  26. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/parser.rs +0 -0
  27. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/pseudo_classes.rs +0 -0
  28. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/pseudo_elements.rs +0 -0
  29. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/html/selectors/selector_impl.rs +0 -0
  30. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/lib.rs +0 -0
  31. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/main.rs +0 -0
  32. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/parser.rs +0 -0
  33. {css_inline-0.20.0 → css_inline-0.20.1}/css-inline/src/resolver.rs +0 -0
  34. {css_inline-0.20.0 → css_inline-0.20.1}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: css-inline
3
- Version: 0.20.0
3
+ Version: 0.20.1
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.20.1] - 2026-03-26
6
+
7
+ ### Changed
8
+
9
+ - Update `html5ever` to `0.39`.
10
+ - Update `selectors` to `0.36`.
11
+
12
+ ### Fixed
13
+
14
+ - `!important` lost when inlining styles onto elements with existing inline `style` attributes. [#682](https://github.com/Stranger6667/css-inline/issues/682)
15
+ - `!important` lost when `minify_css` is enabled due to separator mismatch during property lookup. [#682](https://github.com/Stranger6667/css-inline/issues/682)
16
+
5
17
  ## [0.20.0] - 2026-02-07
6
18
 
7
19
  ### Added
@@ -551,7 +563,8 @@
551
563
 
552
564
  - Initial public release
553
565
 
554
- [Unreleased]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.0...HEAD
566
+ [Unreleased]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.1...HEAD
567
+ [0.20.1]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.0...python-v0.20.1
555
568
  [0.20.0]: https://github.com/Stranger6667/css-inline/compare/python-v0.19.1...python-v0.20.0
556
569
  [0.19.1]: https://github.com/Stranger6667/css-inline/compare/python-v0.19.0...python-v0.19.1
557
570
  [0.19.0]: https://github.com/Stranger6667/css-inline/compare/python-v0.18.0...python-v0.19.0
@@ -37,9 +37,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
37
37
 
38
38
  [[package]]
39
39
  name = "bitflags"
40
- version = "2.10.0"
40
+ version = "2.11.0"
41
41
  source = "registry+https://github.com/rust-lang/crates.io-index"
42
- checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
42
+ checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
43
43
 
44
44
  [[package]]
45
45
  name = "built"
@@ -53,9 +53,9 @@ dependencies = [
53
53
 
54
54
  [[package]]
55
55
  name = "bumpalo"
56
- version = "3.19.1"
56
+ version = "3.20.2"
57
57
  source = "registry+https://github.com/rust-lang/crates.io-index"
58
- checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
58
+ checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
59
59
 
60
60
  [[package]]
61
61
  name = "bytes"
@@ -77,9 +77,9 @@ dependencies = [
77
77
 
78
78
  [[package]]
79
79
  name = "cc"
80
- version = "1.2.55"
80
+ version = "1.2.57"
81
81
  source = "registry+https://github.com/rust-lang/crates.io-index"
82
- checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
82
+ checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"
83
83
  dependencies = [
84
84
  "find-msvc-tools",
85
85
  "shlex",
@@ -99,9 +99,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
99
99
 
100
100
  [[package]]
101
101
  name = "chrono"
102
- version = "0.4.43"
102
+ version = "0.4.44"
103
103
  source = "registry+https://github.com/rust-lang/crates.io-index"
104
- checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118"
104
+ checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
105
105
  dependencies = [
106
106
  "iana-time-zone",
107
107
  "num-traits",
@@ -141,7 +141,7 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
141
141
 
142
142
  [[package]]
143
143
  name = "css-inline"
144
- version = "0.20.0"
144
+ version = "0.20.1"
145
145
  dependencies = [
146
146
  "cssparser",
147
147
  "html5ever",
@@ -157,7 +157,7 @@ dependencies = [
157
157
 
158
158
  [[package]]
159
159
  name = "css-inline-python"
160
- version = "0.20.0"
160
+ version = "0.20.1"
161
161
  dependencies = [
162
162
  "built",
163
163
  "css-inline",
@@ -278,9 +278,9 @@ dependencies = [
278
278
 
279
279
  [[package]]
280
280
  name = "futures-channel"
281
- version = "0.3.31"
281
+ version = "0.3.32"
282
282
  source = "registry+https://github.com/rust-lang/crates.io-index"
283
- checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
283
+ checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
284
284
  dependencies = [
285
285
  "futures-core",
286
286
  "futures-sink",
@@ -288,33 +288,33 @@ dependencies = [
288
288
 
289
289
  [[package]]
290
290
  name = "futures-core"
291
- version = "0.3.31"
291
+ version = "0.3.32"
292
292
  source = "registry+https://github.com/rust-lang/crates.io-index"
293
- checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
293
+ checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
294
294
 
295
295
  [[package]]
296
296
  name = "futures-io"
297
- version = "0.3.31"
297
+ version = "0.3.32"
298
298
  source = "registry+https://github.com/rust-lang/crates.io-index"
299
- checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
299
+ checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
300
300
 
301
301
  [[package]]
302
302
  name = "futures-sink"
303
- version = "0.3.31"
303
+ version = "0.3.32"
304
304
  source = "registry+https://github.com/rust-lang/crates.io-index"
305
- checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
305
+ checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
306
306
 
307
307
  [[package]]
308
308
  name = "futures-task"
309
- version = "0.3.31"
309
+ version = "0.3.32"
310
310
  source = "registry+https://github.com/rust-lang/crates.io-index"
311
- checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
311
+ checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
312
312
 
313
313
  [[package]]
314
314
  name = "futures-util"
315
- version = "0.3.31"
315
+ version = "0.3.32"
316
316
  source = "registry+https://github.com/rust-lang/crates.io-index"
317
- checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
317
+ checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
318
318
  dependencies = [
319
319
  "futures-core",
320
320
  "futures-io",
@@ -322,7 +322,6 @@ dependencies = [
322
322
  "futures-task",
323
323
  "memchr",
324
324
  "pin-project-lite",
325
- "pin-utils",
326
325
  "slab",
327
326
  ]
328
327
 
@@ -372,9 +371,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
372
371
 
373
372
  [[package]]
374
373
  name = "html5ever"
375
- version = "0.38.0"
374
+ version = "0.39.0"
376
375
  source = "registry+https://github.com/rust-lang/crates.io-index"
377
- checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2"
376
+ checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8"
378
377
  dependencies = [
379
378
  "log",
380
379
  "markup5ever",
@@ -618,15 +617,15 @@ dependencies = [
618
617
 
619
618
  [[package]]
620
619
  name = "ipnet"
621
- version = "2.11.0"
620
+ version = "2.12.0"
622
621
  source = "registry+https://github.com/rust-lang/crates.io-index"
623
- checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
622
+ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
624
623
 
625
624
  [[package]]
626
625
  name = "iri-string"
627
- version = "0.7.10"
626
+ version = "0.7.11"
628
627
  source = "registry+https://github.com/rust-lang/crates.io-index"
629
- checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a"
628
+ checksum = "d8e7418f59cc01c88316161279a7f665217ae316b388e58a0d10e29f54f1e5eb"
630
629
  dependencies = [
631
630
  "memchr",
632
631
  "serde",
@@ -634,15 +633,15 @@ dependencies = [
634
633
 
635
634
  [[package]]
636
635
  name = "itoa"
637
- version = "1.0.17"
636
+ version = "1.0.18"
638
637
  source = "registry+https://github.com/rust-lang/crates.io-index"
639
- checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
638
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
640
639
 
641
640
  [[package]]
642
641
  name = "js-sys"
643
- version = "0.3.85"
642
+ version = "0.3.91"
644
643
  source = "registry+https://github.com/rust-lang/crates.io-index"
645
- checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
644
+ checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
646
645
  dependencies = [
647
646
  "once_cell",
648
647
  "wasm-bindgen",
@@ -650,9 +649,9 @@ dependencies = [
650
649
 
651
650
  [[package]]
652
651
  name = "libc"
653
- version = "0.2.180"
652
+ version = "0.2.183"
654
653
  source = "registry+https://github.com/rust-lang/crates.io-index"
655
- checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
654
+ checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
656
655
 
657
656
  [[package]]
658
657
  name = "litemap"
@@ -692,9 +691,9 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
692
691
 
693
692
  [[package]]
694
693
  name = "markup5ever"
695
- version = "0.38.0"
694
+ version = "0.39.0"
696
695
  source = "registry+https://github.com/rust-lang/crates.io-index"
697
- checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862"
696
+ checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de"
698
697
  dependencies = [
699
698
  "log",
700
699
  "tendril",
@@ -735,9 +734,9 @@ dependencies = [
735
734
 
736
735
  [[package]]
737
736
  name = "once_cell"
738
- version = "1.21.3"
737
+ version = "1.21.4"
739
738
  source = "registry+https://github.com/rust-lang/crates.io-index"
740
- checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
739
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
741
740
 
742
741
  [[package]]
743
742
  name = "parking_lot"
@@ -823,9 +822,9 @@ dependencies = [
823
822
 
824
823
  [[package]]
825
824
  name = "pin-project-lite"
826
- version = "0.2.16"
825
+ version = "0.2.17"
827
826
  source = "registry+https://github.com/rust-lang/crates.io-index"
828
- checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
827
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
829
828
 
830
829
  [[package]]
831
830
  name = "pin-utils"
@@ -874,9 +873,9 @@ dependencies = [
874
873
 
875
874
  [[package]]
876
875
  name = "pyo3"
877
- version = "0.28.0"
876
+ version = "0.28.2"
878
877
  source = "registry+https://github.com/rust-lang/crates.io-index"
879
- checksum = "fcf3ccafdf54c050be48a3a086d372f77ba6615f5057211607cd30e5ac5cec6d"
878
+ checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
880
879
  dependencies = [
881
880
  "libc",
882
881
  "once_cell",
@@ -888,9 +887,9 @@ dependencies = [
888
887
 
889
888
  [[package]]
890
889
  name = "pyo3-build-config"
891
- version = "0.28.0"
890
+ version = "0.28.2"
892
891
  source = "registry+https://github.com/rust-lang/crates.io-index"
893
- checksum = "972720a441c91fd9c49f212a1d2d74c6e3803b231ebc8d66c51efbd7ccab11c8"
892
+ checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
894
893
  dependencies = [
895
894
  "target-lexicon",
896
895
  ]
@@ -903,9 +902,9 @@ checksum = "4bf83fcee540452241ba030140f50418b973e840a64727c967b9266660f0a690"
903
902
 
904
903
  [[package]]
905
904
  name = "pyo3-ffi"
906
- version = "0.28.0"
905
+ version = "0.28.2"
907
906
  source = "registry+https://github.com/rust-lang/crates.io-index"
908
- checksum = "5994456d9dab8934d600d3867571b6410f24fbd6002570ad56356733eb54859b"
907
+ checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
909
908
  dependencies = [
910
909
  "libc",
911
910
  "pyo3-build-config",
@@ -913,9 +912,9 @@ dependencies = [
913
912
 
914
913
  [[package]]
915
914
  name = "pyo3-macros"
916
- version = "0.28.0"
915
+ version = "0.28.2"
917
916
  source = "registry+https://github.com/rust-lang/crates.io-index"
918
- checksum = "11ce9cc8d81b3c4969748807604d92b4eef363c5bb82b1a1bdb34ec6f1093a18"
917
+ checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
919
918
  dependencies = [
920
919
  "proc-macro2",
921
920
  "pyo3-macros-backend",
@@ -925,9 +924,9 @@ dependencies = [
925
924
 
926
925
  [[package]]
927
926
  name = "pyo3-macros-backend"
928
- version = "0.28.0"
927
+ version = "0.28.2"
929
928
  source = "registry+https://github.com/rust-lang/crates.io-index"
930
- checksum = "eaf4b60036a154d23282679b658e3cc7d88d3b8c9a40b43824785f232d2e1b98"
929
+ checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
931
930
  dependencies = [
932
931
  "heck",
933
932
  "proc-macro2",
@@ -958,9 +957,9 @@ dependencies = [
958
957
 
959
958
  [[package]]
960
959
  name = "quinn-proto"
961
- version = "0.11.13"
960
+ version = "0.11.14"
962
961
  source = "registry+https://github.com/rust-lang/crates.io-index"
963
- checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31"
962
+ checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
964
963
  dependencies = [
965
964
  "bytes",
966
965
  "getrandom 0.3.4",
@@ -993,9 +992,9 @@ dependencies = [
993
992
 
994
993
  [[package]]
995
994
  name = "quote"
996
- version = "1.0.44"
995
+ version = "1.0.45"
997
996
  source = "registry+https://github.com/rust-lang/crates.io-index"
998
- checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
997
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
999
998
  dependencies = [
1000
999
  "proc-macro2",
1001
1000
  ]
@@ -1135,9 +1134,9 @@ dependencies = [
1135
1134
 
1136
1135
  [[package]]
1137
1136
  name = "rustls"
1138
- version = "0.23.36"
1137
+ version = "0.23.37"
1139
1138
  source = "registry+https://github.com/rust-lang/crates.io-index"
1140
- checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
1139
+ checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
1141
1140
  dependencies = [
1142
1141
  "once_cell",
1143
1142
  "ring",
@@ -1159,9 +1158,9 @@ dependencies = [
1159
1158
 
1160
1159
  [[package]]
1161
1160
  name = "rustls-webpki"
1162
- version = "0.103.9"
1161
+ version = "0.103.10"
1163
1162
  source = "registry+https://github.com/rust-lang/crates.io-index"
1164
- checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
1163
+ checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
1165
1164
  dependencies = [
1166
1165
  "ring",
1167
1166
  "rustls-pki-types",
@@ -1176,9 +1175,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
1176
1175
 
1177
1176
  [[package]]
1178
1177
  name = "ryu"
1179
- version = "1.0.22"
1178
+ version = "1.0.23"
1180
1179
  source = "registry+https://github.com/rust-lang/crates.io-index"
1181
- checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984"
1180
+ checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
1182
1181
 
1183
1182
  [[package]]
1184
1183
  name = "scopeguard"
@@ -1188,9 +1187,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1188
1187
 
1189
1188
  [[package]]
1190
1189
  name = "selectors"
1191
- version = "0.35.0"
1190
+ version = "0.36.1"
1192
1191
  source = "registry+https://github.com/rust-lang/crates.io-index"
1193
- checksum = "93fdfed56cd634f04fe8b9ddf947ae3dc493483e819593d2ba17df9ad05db8b2"
1192
+ checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c"
1194
1193
  dependencies = [
1195
1194
  "bitflags",
1196
1195
  "cssparser",
@@ -1314,12 +1313,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
1314
1313
 
1315
1314
  [[package]]
1316
1315
  name = "socket2"
1317
- version = "0.6.2"
1316
+ version = "0.6.3"
1318
1317
  source = "registry+https://github.com/rust-lang/crates.io-index"
1319
- checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0"
1318
+ checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
1320
1319
  dependencies = [
1321
1320
  "libc",
1322
- "windows-sys 0.60.2",
1321
+ "windows-sys 0.61.2",
1323
1322
  ]
1324
1323
 
1325
1324
  [[package]]
@@ -1360,9 +1359,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
1360
1359
 
1361
1360
  [[package]]
1362
1361
  name = "syn"
1363
- version = "2.0.114"
1362
+ version = "2.0.117"
1364
1363
  source = "registry+https://github.com/rust-lang/crates.io-index"
1365
- checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
1364
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
1366
1365
  dependencies = [
1367
1366
  "proc-macro2",
1368
1367
  "quote",
@@ -1391,9 +1390,9 @@ dependencies = [
1391
1390
 
1392
1391
  [[package]]
1393
1392
  name = "target-lexicon"
1394
- version = "0.13.4"
1393
+ version = "0.13.5"
1395
1394
  source = "registry+https://github.com/rust-lang/crates.io-index"
1396
- checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
1395
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
1397
1396
 
1398
1397
  [[package]]
1399
1398
  name = "tendril"
@@ -1437,9 +1436,9 @@ dependencies = [
1437
1436
 
1438
1437
  [[package]]
1439
1438
  name = "tinyvec"
1440
- version = "1.10.0"
1439
+ version = "1.11.0"
1441
1440
  source = "registry+https://github.com/rust-lang/crates.io-index"
1442
- checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa"
1441
+ checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
1443
1442
  dependencies = [
1444
1443
  "tinyvec_macros",
1445
1444
  ]
@@ -1452,9 +1451,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1452
1451
 
1453
1452
  [[package]]
1454
1453
  name = "tokio"
1455
- version = "1.49.0"
1454
+ version = "1.50.0"
1456
1455
  source = "registry+https://github.com/rust-lang/crates.io-index"
1457
- checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
1456
+ checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d"
1458
1457
  dependencies = [
1459
1458
  "bytes",
1460
1459
  "libc",
@@ -1587,9 +1586,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
1587
1586
 
1588
1587
  [[package]]
1589
1588
  name = "unicode-ident"
1590
- version = "1.0.22"
1589
+ version = "1.0.24"
1591
1590
  source = "registry+https://github.com/rust-lang/crates.io-index"
1592
- checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
1591
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
1593
1592
 
1594
1593
  [[package]]
1595
1594
  name = "untrusted"
@@ -1647,9 +1646,9 @@ dependencies = [
1647
1646
 
1648
1647
  [[package]]
1649
1648
  name = "wasm-bindgen"
1650
- version = "0.2.108"
1649
+ version = "0.2.114"
1651
1650
  source = "registry+https://github.com/rust-lang/crates.io-index"
1652
- checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
1651
+ checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
1653
1652
  dependencies = [
1654
1653
  "cfg-if",
1655
1654
  "once_cell",
@@ -1660,9 +1659,9 @@ dependencies = [
1660
1659
 
1661
1660
  [[package]]
1662
1661
  name = "wasm-bindgen-futures"
1663
- version = "0.4.58"
1662
+ version = "0.4.64"
1664
1663
  source = "registry+https://github.com/rust-lang/crates.io-index"
1665
- checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f"
1664
+ checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8"
1666
1665
  dependencies = [
1667
1666
  "cfg-if",
1668
1667
  "futures-util",
@@ -1674,9 +1673,9 @@ dependencies = [
1674
1673
 
1675
1674
  [[package]]
1676
1675
  name = "wasm-bindgen-macro"
1677
- version = "0.2.108"
1676
+ version = "0.2.114"
1678
1677
  source = "registry+https://github.com/rust-lang/crates.io-index"
1679
- checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
1678
+ checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
1680
1679
  dependencies = [
1681
1680
  "quote",
1682
1681
  "wasm-bindgen-macro-support",
@@ -1684,9 +1683,9 @@ dependencies = [
1684
1683
 
1685
1684
  [[package]]
1686
1685
  name = "wasm-bindgen-macro-support"
1687
- version = "0.2.108"
1686
+ version = "0.2.114"
1688
1687
  source = "registry+https://github.com/rust-lang/crates.io-index"
1689
- checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
1688
+ checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
1690
1689
  dependencies = [
1691
1690
  "bumpalo",
1692
1691
  "proc-macro2",
@@ -1697,18 +1696,18 @@ dependencies = [
1697
1696
 
1698
1697
  [[package]]
1699
1698
  name = "wasm-bindgen-shared"
1700
- version = "0.2.108"
1699
+ version = "0.2.114"
1701
1700
  source = "registry+https://github.com/rust-lang/crates.io-index"
1702
- checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
1701
+ checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
1703
1702
  dependencies = [
1704
1703
  "unicode-ident",
1705
1704
  ]
1706
1705
 
1707
1706
  [[package]]
1708
1707
  name = "web-sys"
1709
- version = "0.3.85"
1708
+ version = "0.3.91"
1710
1709
  source = "registry+https://github.com/rust-lang/crates.io-index"
1711
- checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598"
1710
+ checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9"
1712
1711
  dependencies = [
1713
1712
  "js-sys",
1714
1713
  "wasm-bindgen",
@@ -1962,9 +1961,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
1962
1961
 
1963
1962
  [[package]]
1964
1963
  name = "winnow"
1965
- version = "0.7.14"
1964
+ version = "0.7.15"
1966
1965
  source = "registry+https://github.com/rust-lang/crates.io-index"
1967
- checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
1966
+ checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
1968
1967
  dependencies = [
1969
1968
  "memchr",
1970
1969
  ]
@@ -2006,18 +2005,18 @@ dependencies = [
2006
2005
 
2007
2006
  [[package]]
2008
2007
  name = "zerocopy"
2009
- version = "0.8.39"
2008
+ version = "0.8.47"
2010
2009
  source = "registry+https://github.com/rust-lang/crates.io-index"
2011
- checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a"
2010
+ checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87"
2012
2011
  dependencies = [
2013
2012
  "zerocopy-derive",
2014
2013
  ]
2015
2014
 
2016
2015
  [[package]]
2017
2016
  name = "zerocopy-derive"
2018
- version = "0.8.39"
2017
+ version = "0.8.47"
2019
2018
  source = "registry+https://github.com/rust-lang/crates.io-index"
2020
- checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
2019
+ checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89"
2021
2020
  dependencies = [
2022
2021
  "proc-macro2",
2023
2022
  "quote",
@@ -2086,6 +2085,6 @@ dependencies = [
2086
2085
 
2087
2086
  [[package]]
2088
2087
  name = "zmij"
2089
- version = "1.0.19"
2088
+ version = "1.0.21"
2090
2089
  source = "registry+https://github.com/rust-lang/crates.io-index"
2091
- checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445"
2090
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "css-inline-python"
3
- version = "0.20.0"
3
+ version = "0.20.1"
4
4
  authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
5
5
  edition = "2024"
6
6
  rust-version = "1.85"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "css-inline"
3
- version = "0.20.0"
3
+ version = "0.20.1"
4
4
  authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
5
5
  edition = "2021"
6
6
  license = "MIT"
@@ -18,9 +18,6 @@ exclude = [
18
18
  categories = ["web-programming"]
19
19
  rust-version = "1.80"
20
20
 
21
- [[bin]]
22
- name = "css-inline"
23
-
24
21
  [features]
25
22
  default = ["cli", "http", "file", "stylesheet-cache"]
26
23
  cli = ["rayon"]
@@ -30,14 +27,14 @@ stylesheet-cache = ["lru"]
30
27
 
31
28
  [dependencies]
32
29
  cssparser = "0.36.0"
33
- html5ever = "0.38.0"
30
+ html5ever = "0.39.0"
34
31
  lru = { version = "0.16.0", optional = true }
35
32
  memchr = "2.7"
36
33
  precomputed-hash = "0.1.1"
37
34
  rayon = { version = "1.10", optional = true }
38
35
  reqwest = { version = "0.12.0", optional = true, default-features = false, features = ["rustls-tls", "blocking"] }
39
36
  rustc-hash = "2.0.0"
40
- selectors = "0.35.0"
37
+ selectors = "0.36.1"
41
38
  smallvec = "1"
42
39
  url = "2"
43
40
 
@@ -43,6 +43,7 @@ into:
43
43
  - Works on Linux, Windows, and macOS
44
44
  - Supports HTML5 & CSS3
45
45
  - Bindings for [Python](https://github.com/Stranger6667/css-inline/tree/master/bindings/python), [Ruby](https://github.com/Stranger6667/css-inline/tree/master/bindings/ruby), [JavaScript](https://github.com/Stranger6667/css-inline/tree/master/bindings/javascript), [Java](https://github.com/Stranger6667/css-inline/tree/master/bindings/java), [C](https://github.com/Stranger6667/css-inline/tree/master/bindings/c), [PHP](https://github.com/Stranger6667/css-inline/tree/master/bindings/php), and a [WebAssembly](https://github.com/Stranger6667/css-inline/tree/master/bindings/javascript/wasm) module to run in browsers.
46
+ - [Elixir bindings](https://github.com/knocklabs/css_inline) maintained by [Knock](https://github.com/knocklabs)
46
47
  - Command Line Interface
47
48
 
48
49
  ## Playground
@@ -700,6 +700,11 @@ fn merge_styles<Wr: Write>(
700
700
  let current_declarations_count = parsed_declarations_count;
701
701
  // Next, we iterate over the new styles and merge them into our existing set
702
702
  // New rules will not override old ones unless they are marked as `!important`
703
+ let sep = if minify_css {
704
+ STYLE_SEPARATOR_MIN
705
+ } else {
706
+ STYLE_SEPARATOR
707
+ };
703
708
  for (property, _, value) in new_styles {
704
709
  match (
705
710
  value.trim_end().strip_suffix("!important"),
@@ -708,8 +713,8 @@ fn merge_styles<Wr: Write>(
708
713
  .take(parsed_declarations_count)
709
714
  .find(|style| {
710
715
  style.starts_with(property.as_bytes())
711
- && style.get(property.len()..=property.len().saturating_add(1))
712
- == Some(STYLE_SEPARATOR)
716
+ && style.get(property.len()..property.len().saturating_add(sep.len()))
717
+ == Some(sep)
713
718
  }),
714
719
  ) {
715
720
  // The new rule is `!important` and there's an existing rule with the same name
@@ -717,13 +722,12 @@ fn merge_styles<Wr: Write>(
717
722
  // Per CSS spec: inline `!important` takes precedence over stylesheet `!important`
718
723
  (Some(value), Some(buffer)) => {
719
724
  if !buffer.ends_with(b"!important") {
720
- // We keep the rule name and the colon-space suffix - '<rule>: `
721
- buffer.truncate(property.len().saturating_add(STYLE_SEPARATOR.len()));
725
+ buffer.truncate(property.len().saturating_add(sep.len()));
722
726
  write_declaration_value(buffer, value)?;
727
+ buffer.extend_from_slice(b" !important");
723
728
  }
724
729
  }
725
730
  // There's no existing rule with the same name, but the new rule is `!important`
726
- // In this case, we add the new rule with the `!important` suffix removed
727
731
  (Some(value), None) => {
728
732
  push_or_update!(
729
733
  declarations_buffer,
@@ -732,6 +736,13 @@ fn merge_styles<Wr: Write>(
732
736
  value,
733
737
  minify_css
734
738
  );
739
+ // `push_or_update!` increments `parsed_declarations_count`, so subtract 1
740
+ // to get the slot that was just written and append the `!important` suffix.
741
+ if let Some(buf) =
742
+ declarations_buffer.get_mut(parsed_declarations_count.saturating_sub(1))
743
+ {
744
+ buf.extend_from_slice(b" !important");
745
+ }
735
746
  }
736
747
  // There's no existing rule with the same name, and the new rule is not `!important`
737
748
  // In this case, we just add the new rule as-is
File without changes
File without changes
File without changes