locked
Good Practice for ASP.NET Themes RRS feed

  • Question

  • I am implementing themes in an ASP.NET site I am creating. The layout on each page will remain the same with each theme while only the colors, background pictures, and sometimes fonts will change. Is it good practice to create style sheets outside of the themes folder that contain the layout and then have style sheets in the themes that change those things related to theming? Or is it better to just have the layout repeated in each theme style sheet?

    I realize the former option would mean less repeated code for client-side to download; I am just wondering if there are some pitfalls with this method.
    Saturday, January 3, 2009 4:42 PM

Answers

  • I'd say it was better to separate the layout from the main styles, then you need only change it in one place if you need to. It's a practice I normally follow.

    Ian

    http://www.ew-resource.co.uk
    http://www.fp-resource.co.uk


    Ian Haynes
    Saturday, January 3, 2009 5:10 PM
  • I'm with Ian on this. By keeping your layout styling separate from your theme styling, a change in layout requires visiting only one style sheet. If you include the layout styling with each of the theme stylesheets, you have to visit every one of them to implement any desired change in layout.

    cheers,
    scott
    Saturday, January 3, 2009 6:32 PM

All replies

  • I'd say it was better to separate the layout from the main styles, then you need only change it in one place if you need to. It's a practice I normally follow.

    Ian

    http://www.ew-resource.co.uk
    http://www.fp-resource.co.uk


    Ian Haynes
    Saturday, January 3, 2009 5:10 PM
  • I'm with Ian on this. By keeping your layout styling separate from your theme styling, a change in layout requires visiting only one style sheet. If you include the layout styling with each of the theme stylesheets, you have to visit every one of them to implement any desired change in layout.

    cheers,
    scott
    Saturday, January 3, 2009 6:32 PM
  • I have decided to seperate the layout. Thank you for your input.
    Saturday, January 3, 2009 7:32 PM