This of course can easily be achieved with config option upload_allowed_file_types.
So if uses types "file.txt", and error appears "You can only create CSS files"? Besides, what prevents them from first creating "file.css" and then renaming it to "file.txt" afterwards? This is a custom solution that we can't build into Files Gallery interface, because it works like any other file manager, also desktop.
You could edit the index.php
to only accept CSS file. Something like this line 1484
(version 0.8.4):
$name = name_is_allowed(post('name')); // trim and check valid
Add new line below:
$name = name_is_allowed(post('name')); // trim and check valid
if(strtolower(pathinfo($name, PATHINFO_EXTENSION)) !== 'css') json_error('only CSS allowed!');