0

Been reading the Styleguide for AngularJS (Community) aswell as various tutorials and ofcourse the AngularJS Docs.

I can't seem to find almost any reference to .css files anywhere in the app structure and tutorials, why is this? Does .css get less used?

TLDR; Am I missing anything or doesn't it get mentioned because the subject is AngularJS and not CSS.

2 Answers 2

2

No, .css files are still used, although the use of preprocessors like SASS and LESS introduce other file extensions.

It is not my own impression that Angular tutorials etc. leave out .css files because .css files are bad practice; I think they often put the styles in <style> tags just for convenience. How you manage your styles is not Angular specific, that's why they don't discuss the subject. Angular's example app, PhoneCat, uses two .css files.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for making some things straightforward. A full day of exploring AngularJS made me somewhat confused.
1

The style guide really isn't concerned with anything other than structuring and writing your angular applications. Styles are still very important.

As far as directory structure is concerned, many people chose to place their relevant css files next to each file's related controllers / directories.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.