Including one stylesheet inside another

Including one stylesheet inside another

am 02.02.2008 00:09:36 von Chris

I've got a puzzling problem.

We have multiple sites that use the same large css file. I just make a
copy of it for each site. For each site, though, I'd like to customize a
couple small things like link color.

I could just edit each copy of the css file, but that would make it hard
to maintain when I want a change to appear in all sites.

The ideal solution would be to use an in the css file:

my-big-file.css would be:

#mystyle {
whatever:10px;
}


Then for each site, "my-custom-css.css" could be different.

The obvious solution here is to break it up into two different css files
and include both in every page in every site. This would affect a lot of
pages unnecessarily, though, and would be cumbersome if I ever had to
break it into 2, 3, or 4 small css files. A single include statement in
one file would be a lot cleaner.

Is there some way to do this kind of include?

Re: Including one stylesheet inside another

am 02.02.2008 00:14:35 von Els

Chris wrote:

> I've got a puzzling problem.
>
> We have multiple sites that use the same large css file. I just make a
> copy of it for each site. For each site, though, I'd like to customize a
> couple small things like link color.
>
> I could just edit each copy of the css file, but that would make it hard
> to maintain when I want a change to appear in all sites.
>
> The ideal solution would be to use an in the css file:
>
> my-big-file.css would be:
>
> #mystyle {
> whatever:10px;
> }
>

> Is there some way to do this kind of include?

@import "my-custom-css.css";

--
Els http://locusmeus.com/

Re: Including one stylesheet inside another

am 02.02.2008 00:16:33 von Els

Els wrote:

> Chris wrote:
>
>> I've got a puzzling problem.
>>
>> We have multiple sites that use the same large css file. I just make a
>> copy of it for each site. For each site, though, I'd like to customize a
>> couple small things like link color.
>>
>> I could just edit each copy of the css file, but that would make it hard
>> to maintain when I want a change to appear in all sites.
>>
>> The ideal solution would be to use an in the css file:
>>
>> my-big-file.css would be:
>>
>> #mystyle {
>> whatever:10px;
>> }
>>
>
>> Is there some way to do this kind of include?
>
> @import "my-custom-css.css";

But I'd do it the other way round.
Let each site have its own my-custom-css.css, and have an
@import "my-big-file.css";
in it.

That way you don't have to copy the big file to the different sites
when you make a change to it.

--
Els http://locusmeus.com/

Re: Including one stylesheet inside another

am 02.02.2008 00:34:23 von dorayme

In article <47a3a23a$0$14083$9a6e19ea@news.newshosting.com>,
Chris wrote:

> I've got a puzzling problem.
>
> We have multiple sites that use the same large css file. I just make a
> copy of it for each site. For each site, though, I'd like to customize a
> couple small things like link color.

Nothing easier. You link to the main one on all the sites and you
add underneath another link to another css, the second overriding
a few things you want overridden. Is there some problem you have
for this not to work?




in the head of the html docs on the site where the supplementary
is appropriate.

--
dorayme

Re: Including one stylesheet inside another

am 02.02.2008 00:37:13 von Els

dorayme wrote:

> In article <47a3a23a$0$14083$9a6e19ea@news.newshosting.com>,
> Chris wrote:
>
>> I've got a puzzling problem.
>>
>> We have multiple sites that use the same large css file. I just make a
>> copy of it for each site. For each site, though, I'd like to customize a
>> couple small things like link color.
>
> Nothing easier. You link to the main one on all the sites and you
> add underneath another link to another css, the second overriding
> a few things you want overridden. Is there some problem you have
> for this not to work?
>
>
>
>
> in the head of the html docs on the site where the supplementary
> is appropriate.

From the OP:

The obvious solution here is to break it up into two different css
files and include both in every page in every site. This would affect
a lot of pages unnecessarily, though, and would be cumbersome if I
ever had to break it into 2, 3, or 4 small css files. A single
include statement in one file would be a lot cleaner.


;-)

--
Els http://locusmeus.com/