⛏️ index : haiku.git

author PulkoMandy <pulkomandy@pulkomandy.tk> 2022-12-18 13:17:21.0 +01:00:00
committer waddlesplash <waddlesplash@gmail.com> 2022-12-23 1:55:25.0 +00:00:00
commit
771538f0ba968dcfaa5584eee8230dba83b7c125 [patch]
tree
e35cf8376be894fb527b9279453849681ef8ad36
parent
34b77b942e1827a23f0579db0406f73b5fbab0f0
download
771538f0ba968dcfaa5584eee8230dba83b7c125.tar.gz

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>
(cherry picked from commit 4562b1727c5b97861f50af2fcb2f3a884a9e8aa0)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5926
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

Diff

 src/data/mime_db/text/css | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/data/mime_db/text/css b/src/data/mime_db/text/css
index c51ec71..f37d889 100644
--- a/src/data/mime_db/text/css
+++ b/src/data/mime_db/text/css
@@ -9,3 +9,5 @@
	"extensions" = "css",
	"type" = "text/css"
};

resource(4, "META:SNIFF_RULE") "0.32 [0:1024](\"\\012html {\" | \"background-color:\" | \"\\012body {\" | \"\\012:root {\" | \"\\012@media: (\" | \"padding-left:\")";