When loading stylesheets via the tag, are the stylesheets loaded asynchronously or synchronously? I have a design with two stylesheets: mura.css and typography.css. They are loaded in the area of the page and typography.css is loaded just before mura.css. For some reason though mura.css attributes are showing in the Chrome Webtools as being overwritten with typography.css.
Asked
Active
Viewed 2,345 times
1 Answers
6
CSS files are loaded in the order they are included in the file.
If something from the first CSS file is overwriting something in the second CSS file, it is most likely due to your selectors being used incorrectly. Double-check your selectors for the elements of the page that are incorporating the style incorrectly.

Michael Irigoyen
- 22,513
- 17
- 89
- 131
-
2To be specific, CSS rules cascade in the order that the files are included, so it shouldn't matter what order they actually load, which is usually asynchronous (although scripts can affect this). – Neil Jan 23 '11 at 21:31
-
8Stylesheets load asynchronously relative to page parsing/DOM preparation, but they are synchronous relative to scripts. That is, if a stylesheet comes before a script, the stylesheet must load before the script will execute. – Zenexer Jul 16 '13 at 00:52