htmlcssflaskimportassets

CSS not displaying on html


Today I wanted to start a new project but when i finished my asset-loader and everything and did the first request something very strange happend. My css file is displayed as an "imported" css file in the chrome devtool sources-tab but when i select an element in the devtools elements-tab i dont see my style in the right side where it should be. I really don't know what to do anymore. (Backend is running on flask Py 3.12 btw)

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="assets/css/style.css"/>
</head>
<body>
    <h1>Hello World!</h1>
</body>
</html>
* { color: dodgerblue }

Solution

  • I found a solution: The mimetype my asset-system was giving back in the response was "text/plain".