]> Git — Sourcephile - haskell/literate-web.git/commitdiff
feat(MIME): add `CSS` media type main
authorJulien Moutinho <julm+literate-web@sourcephile.fr>
Tue, 4 Mar 2025 20:43:39 +0000 (21:43 +0100)
committerJulien Moutinho <julm+literate-web@sourcephile.fr>
Tue, 4 Mar 2025 20:43:43 +0000 (21:43 +0100)
src/Literate/Web/Types/MIME.hs

index 77f7cabe62e31f8b208fead44ceffb15d6ad1d1d..a1546e9205c7a5e1c6c73e413e37ff864822e905 100644 (file)
@@ -68,6 +68,13 @@ charsetUTF8 = (Media./: ("charset", "utf-8"))
 mimeAny :: MediaType
 mimeAny = "*/*"
 
+-- ** Type 'CSS'
+data CSS deriving (Typeable)
+instance MediaTypeFor CSS where
+  mediaTypeFor _t = charsetUTF8 $ "text" Media.// "css"
+instance FileExtension CSS where
+  fileExtension = "css"
+
 -- ** Type 'JSON'
 data JSON deriving (Typeable)
 instance MediaTypeFor JSON where