Fork me on GitHub

style.css / styleNN.css  Bottom

  • Forgive me if this is a dumb question, but why does post nuke use two different style sheets?

    style.css
    styleNN.css

    I assume the NN is short for Netscape?
  • Yeah but it's a mis-nomer. Basically, whoever created these didn't know what they are doing. The style.css is accessed only by ie and styleNN.css is accessed by all browsers (including ie.)
  • So style.css can be deleted?
  • Not quite... If your theme references both stylesheets then you'd need to leave style.css as a blank empty file otherwise you'll end up with entries in the server logs referring to the failiure to find this file.

    As Craig as said the files are poorly named but have been that way right since the very begining of PN. Quite what the original thought was i'm not sure. More importantly the biggest mistake is not the name but the duplication of CSS definitions between the files - this is completely uncessary and makes modifiying the theme a lot harder.

    If you using xanthia then you have full control over the header within the theme. On a number of theme ports i'm doing i've stopped using two stylesheets entirely. For other theme types (legacy and AutoTheme) then you'd need to leave both stylesheets even if one is blank.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • So if we do everything with styleNN.css and make style.css blank what happens to the things that refer to style.css?
    Will it just look in styleNN.css?

    If you followed that the first time I am impressed :shock:

    I understand that both may be refereed to and deleting one will result in file not found, but does the templet need the information in both files? I was under the impression that I needed to use both?
  • No, most older themes duplicate the styles across both, only changing the styles Netscape 4 didn't like, or tweak the font size for one browser. At the time, it was basically a choice between NN4 and IE.
    If you check there are no styles in style.css that aren't in styleNN.css, move them across and put a comment or something in the old one (/* comment */). I seem to remember a problem when the file was empty.
    If using a Xanthia template, or if you know how to hack the header, you can replace styleNN.css with style.css just to be tidy, and remove the rule that uses the @import method.
    The original idea was that NN4 was so old, it predates the WWW standards, which was set up in the wake of the browser wars. Sounds like a Star Wars episode, I know. So, NN4 was unaware of the newer @import method, and hence ignored it. So rules that would make it freak out or crash could be put there.
  • So, along these lines (I hope), what is the difference or similarity bewteen the style.css and the color palettes for a theme? I've been starting to mess around with themes, and those I've poked at seem to have both, which is confusing. How does this integration work? Or does it? *cue scary music*
  • jediping

    So, along these lines (I hope), what is the difference or similarity bewteen the style.css and the color palettes for a theme? I've been starting to mess around with themes, and those I've poked at seem to have both, which is confusing. How does this integration work? Or does it? *cue scary music*

    The XTE color palettes are not integrated with the style.css stylesheets.

    On the theme that I am creating, I have moved the color definitions from style.css to style elements in the master.htm and home.htm templates. Then I can access the pnRender variables that are supported by the XTE color palettes.

    Not quite done yet, but when the theme is ready, I will share it with everyone.
  • That sounds pretty cool. Seems like the way to go. :)

    Is there any chance of the stylesheets being made editable with the rest of the templates in general? It's a tad frustrating to be able to do most things in XTE, but have to toddle back to the stylesheet for the rest of the changes.

    Though putting the stylesheet in the template would solve much of that problem, I admit. :)

This list is based on users active over the last 60 minutes.