sdcinvan wrote:What I am wondering is if there are any caveats that I should be aware of when using
@import url('stylesheet2.css');? Specifically...
a) If I am going to edit style sheet parameters within Flare's own style sheet editor, will it recognize the different style sheets for each medium? I'm guessing NOT. Confirmed, Flare does not!
b) Besides really old browsers not supporting @import url, are there any concerns over the newer (more relevant) browsers?
Has anyone successfully used
@import url('stylesheet2.css');?
Yes. I've successfully imported style sheets without issue. Actually, I use some type of the @import command on almost every project I work on.
You'll hear people say that @import is bad for performance if you
use it the wrong way. My @imports are pretty small, for the most part, and I don't use a ton of them in a row. But you should be aware, that this CAN impact performance. If you care about that sort of thing, then you'll want to dig into this issue further.
When you are working in Flare, you do need to remember to open the correct style sheet in the style sheet editor. If you open just the main style sheet with all the @imports, Flare will make the changes IN THAT STYLE SHEET. It won't go into the imported style sheets to make the change. After all, you aren't in the imported style sheet. You are in the main style sheet. Flare is just doing what you told it to do.
I understand that the @import command won't work unless it is at the top of your style sheet before you declare any styles. I haven't verified this to be true, but I've always put the @import command at the top, just to be sure.
Despite my recent posting questioning why somebody would want to break up the style sheet into separate CSS files for each media type, I will admit that I did this at one point. The reason being, I wanted my headings to stick out to the left of the main body of text; in effect, all paragraphs were indented, but the headings were hanging. I did this in PDF by setting the body frame of the page layout to be a specific narrower width, allowing paragraphs to take the whole available width, and adding negative left margin to the headings. This worked great in PDF, but it had the unintended side effect of making it so if somebody printed my HTML output, the headings were cut off the left side of the page. So I created separate CSS files for PDF output.
With really large style sheets, I can see the allure of keeping them separate and then modifying them individually with a common css file that imports all the disparate files into a single location for all your outputs, and I think that generally, you should be just fine using it if you are aware of the potential issues, like you seem to be.