1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom style: no parent vs Default Style as parent - advantages/disadvantages?

Discussion in 'XenForo Questions and Support' started by Dean, Feb 24, 2011.

  1. Dean

    Dean Well-Known Member

    I cannot think of any advantages or disadvantages to having
    • custom style have no parent vs.
    • having the Default style as the parent..
    can you?

    [​IMG]
     
  2. fattony69

    fattony69 Well-Known Member

    Having the default style as the parent, you can have new style with the same template modifications without relying on the old custom style
     
  3. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Depends... as long as you don't change the Default Style then it is exactly the same thing
    When it has no parent, it is really a child of the Master style
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Setting a parent style allows you to create variations on a theme. A common example is when you have two identical styles but one is a fixed width and the other is a fluid width. In that case you would set that style as a parent, create a child style under it, and modify only the width of the child style. The child will be identical to the parent except for the width, because children inherit everything from their parent.

    Of course you can do this without a parent style by having two duplicate styles (no inheritance). But then if you want to make a change to both styles then you need to make that change twice. With inheritance you can just edit the parent and the change will automatically apply to the child.
     
  5. Dean

    Dean Well-Known Member

    This is my understanding as well.

    I understand the advantages of having children of a custom style - the template changes in the top custom style trickle down to the children styles (unless the child style had it's own custom template different from the parent).

    The only difference I can see, is that when a custom style is under the default styles, is the path to images is set to default. But any style can have a image path set to the default or custom image directory, so I'm not sure that makes any difference at all.

    The main reason I started this thread was because of you input.. I don't quite understand what you mean?
    http://xenforo.com/community/threads/how-many-styles-do-you-have-installed.11478/page-2#post-153066
     
  6. fattony69

    fattony69 Well-Known Member

    The meaning behind it is similar to why you have a custom style. I think of it in more of a coding aspect when making a style. The thing is I have the default xenforo style. I don't show it to anyone. It is completely default except for the template modifications on it. I know they work on the default skin. Now, I had my custom style which is default to everyone. It is the only one they can truly see. If some of the template modifications don't work, I know there is an issue as they worked on the default one. Now, as my forum grew older, I tend to change my custom styles. I don't want to rely on the older custom because all the work it is to groom it and fix it when the default one is the one you should care about. Also, this is more for people who sell styles, but if you edit the default with the modifications and leave the child ones that you sell, you don't have to worry about removing them and re-adding them to sell them and stuff. Basically comes down to preference and reliability.
     

Share This Page