[support] Adding to the CSS of a theme?
Roy Smith
roy at panix.com
Sun Feb 24 04:54:57 UTC 2008
Hmmm. That seems like it's exactly what I'm looking for, but when I
try to use it, it does't seem to see the new css file.
I created /sites/hyc2.org/files/sky.css, and put my additional CSS
rules in it. I also installed and enabled the sitecss module. When
I make "sky" my default theme, the list of CSS files in the generated
HTML doesn't include my site css. This is all I get:
<style type="text/css" media="all">@import "/modules/node/node.css";</
style>
<style type="text/css" media="all">@import "/modules/poll/poll.css";</
style>
<style type="text/css" media="all">@import "/modules/system/
defaults.css";</style>
<style type="text/css" media="all">@import "/modules/system/
system.css";</style>
<style type="text/css" media="all">@import "/modules/user/user.css";</
style>
<style type="text/css" media="all">@import "/./sites/hyc2.org/modules/
calendar/calendar.css";</style>
<style type="text/css" media="all">@import "/sites/hyc2.org/modules/
cck/content.css";</style>
<style type="text/css" media="all">@import "/sites/hyc2.org/modules/
date/date.css";</style>
<style type="text/css" media="all">@import "/sites/hyc2.org/themes/
sky/style.css";</style>
I would have expected another line with "/sites/hyc2.org/files/
sky.css", but it's not there.
On Feb 23, 2008, at 3:19 PM, Zohar Stolar wrote:
> Try http://drupal.org/project/sitecss
>
>
> Roy Smith wrote:
>> How do you augment the CSS style sheet of a theme?
>>
>> My first experiments with modifying a theme (I stated with sky) were
>> to just edit the style.css file in the theme directory. That worked,
>> but is obviously not very maintainable. I'm redoing my site and want
>> to be able to leave the original style.css virgin and just add my
>> stuff in another style sheet (which is, after all, the whole idea
>> of CSS).
>>
>> For example, I want to add:
>>
>> img.keyline {
>> border: 1px solid black;
>> padding: 0;
>> }
>>
>> to an existing theme. Where do I put that? I tried to follow the
>> directions in http://drupal.org/node/11774, namely where it says:
>>
>> "if you only want to alter the CSS of a theme, then just place a new
>> style.css file in a subdirectory of the theme: it will appear as a
>> new
>> theme in Drupal."
>>
>> So, I made a themes/sky/my-sky directory, and put just that little
>> bit
>> of CSS in a "style.css" file there. Sure enough, "my-sky" showed up
>> as a style I could select in the /admin/build/themes page. When I
>> selected it, however, it looked like what I put there *replaced* the
>> style.css from sky, rather than adding to it.
>>
>> What clue am I missing?
>>
>>
>> --
>>
>> roy at panix.com <mailto:roy at panix.com>
>>
>>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
--
roy at panix.com
More information about the support
mailing list