Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default CSS filename

Tags:

css

for html, we have index.html, the file thats automatically loaded by the webserver if no filenames are specified. Is there an equivalent for css, either from the webserver point of view, or just by convention? surely it's not "index.css" right?

Thanks.

Update: I guess I phrased my question a little poorly. I already knew that css files would not be loaded automatically. I was just wondering if there was a strong convention for default css files. Although there exists no strong convention, there are common names, as listed by the people who answered, some of which are:

  • default.css
  • main.css
  • web.css
  • style.css
  • site.css

Or you can name the css file with the same filename as the html file that uses it.

like image 533
Alan Avatar asked Jan 28 '11 18:01

Alan


People also ask

What is the default CSS file name?

Although there exists no strong convention, there are common names, as listed by the people who answered, some of which are: default. css. main.

What is the file type for CSS?

A CSS file is a cascading style sheet (CSS) file used to format the contents of a webpage. It contains customized global properties for how to display HTML elements. For example, CSS files can define the size, color, font, line spacing, indentation, borders, and location of HTML elements.

Which is the default CSS file available under webapp?

css in the editor you can see the rules that are generated from the scss file. By default, CSS debug information is generated in mysass. css .

What is a CSS folder?

The css folder will contain the CSS files needed to style your web page. Finally, open the css folder you just created. Inside of this folder, create the following: A new file named index. css (use your preferred text editor)


3 Answers

No.

There are common names for the main stylesheet for a site, e.g. site.css or main.css, but no strong (or useful) convention.

like image 165
bdukes Avatar answered Oct 17 '22 02:10

bdukes


The name style.css starts to look odd as soon as you have more than one stylesheet. My 2 cents would be:

  • main.css or myappname.css (e.g. intranet.css) for the app
  • Something like global.css for a stylesheet shared between apps
  • For css for individual pages, create subdirectories named after the pages so that you can easily see which css are shared and which are only used on certain pages

If you can, I'd recommend keeping it short and all lowercase without underscores / hyphens as it is less prone to typos.

like image 23
Cookalino Avatar answered Oct 17 '22 01:10

Cookalino


No there is no such thing. It probably is some "guidelines" to follow when designing templates for e.g. Joomla where you have "template.css" and so on. When I do not have such guidelines I normally name the default css "style.css", but this is a matter of taste.

like image 7
LuckyLuke Avatar answered Oct 17 '22 01:10

LuckyLuke