How can I add CSS file in django - css

django 2.1
Im using django 2.1 and i cant find my css folder in django

Create new file and add .css after the name which is basically your file extension name.
Your css files must be in app > static > appname folder > css > filename
File hierarchy should be like this as django prefers.

Related

How to create css file form sass file in the same directory

I am learning SASS. I am using VS Code as my code editor. I have installed Live SASS Compiler extension to compile SASS file.
I have created a folder. In this folder I have multiple folders. I want to create css file in each folder not main folder.
Check the image:
In SCSS folder there is a folder named "Partials-and-Imports". I want to create the css folder in the "Partials-and-Imports" folder not in main folder(CSS) because I have to create multiple folders in the main folder.
How can I do that?
Just copy and past this block of code in your sass compiler setting - Set your exported CSS Styles, Formats & save location - :)
"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
"savePath": "~/../css/"
}
]

How to Change Default GWTBootstrap3 Theme

I'm trying to change the default GWTBoostrap3 theme without any luck. I found this link. I have done what is explained but I don't see any change. Where must the 'resource' folder be located? I created this folder inside my WAR/nameofmyapp folder, put my theme.css file and modified my .gwt.xml file by adding these lines:
<public path='resource'>
<include name='css/*.css'/>
</public>
<stylesheet src='css/theme.css'/>
I downloaded these CSS theme files with still no changes. What am I doing wrong?
Read about Public Path:
Modules can specify which subpackages are public, causing the named
package and its subpackages to be added to the public path. The public
path is the place in your project where static resources referenced by
your GWT module, such as CSS or images, are stored. When you compile
your application into JavaScript, all the files that can be found on
your public path are copied to the module’s output directory. (...)
When referencing public resources from a Module XML File, just use the
relative path within the public folder, the module’s base URL will be
prepended automatically. (...)
You have specified your public package to be named resource and to include css/*.css files. So you should put the theme.css file to full.path.to.the.package.resource.css package.
In other words, the path attribute of the public tag is relative to the folder where the <module>.gwt.xml file is.

How to add CSS file in Jhipster

I would like to add my own css file into a Jhipster project.
I put those files in src\main\webapp\assets\styles\
The gruntfile.js should be able to add those files into the depencies am I right ?
But they added ... any idea why ?
Thanks
Yes if you put a file into this directory, it will belong to your project (that's kind of obvious, as it's the CSS folder of your project).
I guess that what you want to do is use this file inside your index.html file. The normal grunt wiredep command works only if you use Bower, which is our JavaScript/CSS dependency package manager. In your case, you are just adding the file manually, so you are not using Bower: just add your file inside the index.html file, as would do in a normal project, outside of the Bower tags, and you will be able to use it.

Meteor Sass using base sass from deeper files

I've got a Meteor project with the following file structure:
.meteor
client
dashboard
dashboard.scss
client.scss
My basic sass file is client.scss that resides in client folder.
If I define $flat-button in client.scss. Then I cannot use it in dashboard.css without adding import '../client';. However when I do this in multiple files this causes duplicate entries in the unified css file. If I don't import it then Meteor reports errors due to not finding the variable.
Should I add settings to the sass compiler to get this working?
If you're using the fourseven:scss package to compile the Sass in your Meteor project, you simply need to prefix the filenames of your imported .scss files with an underscore, which is the standard method of naming a partial stylesheet with Sass.
In your case, your folder and file structure should be changed to:
.meteor
client
dashboard
_dashboard.scss
client.scss
And then you should be able to use an #import statement to include _dashboard.scss in client.scss like so:
#import 'dashboard'
If for some reason you don't want to rename your files that way, you can also use the .scssimport extension for the same result.
Hope that helps!

Does Netbeans generate a separate CSS file when saving a SASS file?

I am using Netbeans 8.0 to edit my HTML, PHP, and CSS. Just today I have installed SASS and enabled it within Netbeans. I am developing on Ubuntu, and Ruby and Sass are both available in the repositories, so I installed them and Netbeans found the SASS executable with the click of a button. So, I assume it's all working.
I have created a file called style.scss, and put in some test colour variables and a dummy #test id.
My understanding was that when I saved the .scss file that it would get processed and a .css file with the same name, in this case style.css, would get created. Or updated if it already existed.
Is this not the case? I did see other SASS and .css file generation questions here on Stack Overflow, but I didn't see one specific to Netbeans, so I'm not sure if there's something I haven't set up correctly in my environment. Also, I don't need to upload to a server when saving, I am just testing and developing locally.
How do I actually generate a .css file from my .scss in Netbeans 8.0?
Right click on the project -> Properties -> CSS Preprocessors
You have to set an input folder, for example /scss, and an output folder like /css
And there is a checkbox "Compile Sass files on save".
For Compiler options " --style compact " can be useful.
This was working for me in NB7.4, but in 8, something happened...
The plugin page says, it's currently incompatible with 8.
http://plugins.netbeans.org/plugin/34929
UPDATE: My scss folder was wrong... So it's working in NB8.
Look # the project settings, and separate your .scss and .css files in two folder, the default folders are /scss and it converts files to /css folder

Resources