0

I just want to know if there are any web standards or professional ways for naming conventions in a project. Is there any standards for css and js ?

CSS

  • style.css
  • main.css
  • base.css
  • base.css

JS files

  • script.js
  • index.js
Shahil M
  • 3,614
  • 4
  • 23
  • 43
  • No, it's just a primarily opinion based. Just use the best that fits with your requirements and your workflow. Doesn't matter the name of the files, but it's better if there are a coherence. This should be closed as primarily opinion based. – Marcos Pérez Gude May 12 '16 at 07:35
  • Every company has its own standards, and it depends on application and its size how you structure your css/js files. In fact in most cases you will bundle it anyway and you end up with one js/css file. – cpoDesign May 12 '16 at 07:35

1 Answers1

1

All your provided file name is valid.
You must name your file to represent it's content:

What can I say from file name:
scripts.js - All scripts, not minimized
index.js - Only scripts that will be used in index file.
style.css - All styles for page
main.css - Main set of styles that will be used on page, missing specific parts
base.css - Same as main.css

You have to select name that fits best.

Justinas
  • 37,569
  • 4
  • 61
  • 88