@import

  • Thread starter gimme_this_gimme_that
  • Start date
G

gimme_this_gimme_that

I've seen this include at several sites.

Is this documented somewhere?

Briefly - how does it work?

Thanks.
 
T

Thomas 'PointedEars' Lahn

I've seen this include at several sites.

Which include? Do not assume people can read the Subject header.

Which sites? In which context within the code?
Is this documented somewhere?

Maybe, maybe not.
Briefly - how does it work?

I don't know. The `@' prefix is used in Microsoft JScript, followed by the
keywords `cc_on', `debug', `if', `position' aso. Maybe `@import' is just
another one of those.

RTFM, STFW.


PointedEars
 
G

gimme_this_gimme_that

I was checking out the code at wikipedia.com.

Search for anything - like HTML and the source has code like this:

/*]]>*/
</style> <script type="text/javascript" src="/w/index.php?title=-
&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></
script>
<style type="text/css">/*<![CDATA[*/
@import "/w/index.php?
title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/
css&smaxage=2678400";
@import "/w/index.php?
title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/
css&smaxage=2678400";
@import "/w/index.php?title=-&action=raw&gen=css&maxage=2678400";
/*]]>*/</style>
 
T

Thomas 'PointedEars' Lahn

I was checking out the code at wikipedia.com.

Search for anything - like HTML and the source has code like this:

/*]]>*/
</style> <script type="text/javascript" src="/w/index.php?title=-
&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></
script>

The `script' element ends here.
<style type="text/css">/*<![CDATA[*/
@import "/w/index.php?
title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/
css&smaxage=2678400";
@import "/w/index.php?
title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/
css&smaxage=2678400";
@import "/w/index.php?title=-&action=raw&gen=css&maxage=2678400";
/*]]>*/</style>

On a closer look you will recognize that the @import declarations are part
of the stylesheet, not of the script. This is specified here:

http://www.w3.org/TR/CSS2/cascade.html#x5


PointedEars
 
P

Prisoner at War

I've seen this include at several sites.

Is this documented somewhere?

Briefly - how does it work?

Thanks.


I just found out about it myself...it's a way for one CSS file to
"dial in" another...in the CSS-module school of thought, you would
have different CSS files linked by one "master" CSS file...makes any
debugging easier, among other reasons....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top