I've been working on a simple Flask app, and at some point decided to add custom CSS styling alongside Bootstrap. However, for some reason, this CSS file is rendered as empty file. Whether I open it with http://localhost:5000/static/style.css or inspect with Firebug, the result is the same. bootstrap.min.css is loaded but style.css is empty, although it's actually not empty.
Templates:
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/lib/bootstrap.min.css') }}" >
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}" >
CSS folder path is app_root/static/css/style.css and app_root/static/css/lib/bootstrap.min.css
But as I already mentioned, the files are loaded.
Has anyone had any similar issues?
EDIT:
At first I thought it was a CSS problem so I did a lot of editing. This is what style.css currently looks like:
.navbar {
background-color: #aaa;
}
p {
font: Arial;
}
body {
height: 100%;
}
What I mean by "the file being empty" is that once it's loaded, it's loaded empty. I still don't know why this is happening, but after playing with it for a while, I've noticed that it has something to do with the file name. For example, if I rename style.css to main.css and load that into html everything works fine.
As you can see, both files are loaded. style.css and bootstrap.min.css

Bootstraps content:

style.css content

After renaming style.css to main.css

Recursive directory structure:
project/static/css:
lib/ style.css
project/static/css/lib:
bootstrap-theme.css bootstrap-theme.min.css bootstrap.css bootstrap.min.css
EDIT 2:
Also, I've managed to recreate this identical problem in a separate test project (in a different virtualenv) with a simple app.py module, static and template folders.
EDIT 3: Test app code:
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run()
Folder structure is the same:
test/
./test:
app.py
static/
templates/
./test/static:
css/
./test/static/css:
lib/
main.css
./test/static/css/lib:
bootstrap.min.css
./test/templates:
index.html
And the app is started with:
python app.py