Brandon, the order in which you specify the stylesheets does matter!I think link is the better choice because it's clean and nice and the order doesn't matter.
I guess either the article was wrong, or i misinterpreted itBrandon, the order in which you specify the stylesheets does matter.
The rules specified in stylesheets linked later in the webpage take precedence over the rules in stylesheets linked earlier (unless you break this precedence by using !important). That's the whole point of 'C' in css: Cascade![]()
A STYLE block can contain multiple @import rules, but @import rules must precede all
other rules.I’ve seen cases where this is overlooked, and developers spend time
trying to determine why the stylesheet isn’t loaded from an @import rule.For this
reason, I prefer using the LINK tag (one less thing to keep track of).Beyond the easier
syntax, there are also performance benefits to using LINK instead of @import.The
@import rule causes the blank white screen phenomenon, even if used in the document
HEAD, as shown in the following example
The article is explaining that the @import rules must be specified right at the top of a <style> block or an external stylesheet. So while something like this would work:I guess either the article was wrong, or i misinterpreted itIm going to go with me misinterpreting it. Since import rules must precede all other rules [order matters] and this is a comparison of the two, i assumed the LINK must be the opposite [order doesn't matter]
@import url('style.css');
.foo { font-size: 48px; }
.foo { font-size: 48px; }
@import url('style.css');
All modern browsers support @import.My understanding is that @import is mainly used for importing one style sheet into another. You can use it to hide CSS from browsers that don't support @import.
There is maybe a .05% marketshare for those users.Yes, I'm saying that you can use it on the old ones to make them ignore CSS they can not render properly.
Source?There is maybe a .05% marketshare for those users.
You do realize the browsers that didn't support @import are about 13 (Nearly 14) years old.Source?
That isn't a source but ok.You do realize the browsers that didn't support @import are about 13 (Nearly 14) years old.
The only reason IE6 is still widely used is due to corporate use, due to needing to support legacy programs.
Netscape is long gone, IE5.5 was created for previous OS's (Before XP).
Because I call him out on his random statements that he has yet to backup once.Why did he need a source for something that is practically common knowledge?![]()
We use essential cookies to make this site work, and optional cookies to enhance your experience.