mime_db: add a sniffing rule for css

Just like the one for HTML, we have to do a bit of guessing since there
is no easy structure. We can extend it with more keyowrds or remove some
if we find some problems with other files.

Tested so far with the Be Book and Haiku user guide CSS files.

Fixes #18144.

Change-Id: If04fba18846d17ba0eb28dd0bd12787f1fe32028
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5948
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele <nep@packageloss.eu>
This commit is contained in:
PulkoMandy 2022-12-18 13:17:21 +01:00 committed by waddlesplash
parent 31111d806f
commit 4562b1727c

View File

@ -9,3 +9,5 @@ resource(3, "META:EXTENS") message(234) {
"extensions" = "css",
"type" = "text/css"
};
resource(4, "META:SNIFF_RULE") "0.32 [0:1024](\"\\012html {\" | \"background-color:\" | \"\\012body {\" | \"\\012:root {\" | \"\\012@media: (\" | \"padding-left:\")";