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

Not a Bug Profile Tab not load extra css

Discussion in 'Resolved Bug Reports' started by Nobita.Kun, Jan 29, 2016.

  1. Nobita.Kun

    Nobita.Kun Well-Known Member

    As the title. In my template I have used this code:
    Code:
    <xen:container var="$head.something"><link rel="stylesheet" href="somewhere/somefiles.css"></xen:container>
    
    And it is not loaded when I click into an tab in profile tabs.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    It wouldn't be expected to, I don't think.

    Profile tabs are loaded without the container (by virtue of how they are inserted) so I wouldn't expect the code to work.

    xen:require would work though.
     
    Nobita.Kun likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    Agreed. This isn't something that would be expected.
     
    Nobita.Kun likes this.
  4. Nobita.Kun

    Nobita.Kun Well-Known Member

    Yup. xen:required is work. But I can use for external CSS?
     
  5. James

    James Well-Known Member

    External to your site or external to default XF?

    You should be able to use it fine.
     
    Nobita.Kun likes this.
  6. Chris D

    Chris D XenForo Developer Staff Member

    Assuming you mean an externally hosted CSS file, or indeed a locally hosted CSS file on the filesystem; no. But you could always host the CSS locally in the template system.

    In many ways that's preferable due to it potentially making less HTTP requests and benefitting from any built in optimisations such as CSS minification.
     
    Last edited: Jan 29, 2016
  7. Nobita.Kun

    Nobita.Kun Well-Known Member

    It is located in add-on module. /js/something/somefiles.css

    Well. :D
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    We did a similar thing with the VideoJS library we added for XF 1.5.

    It ships with a CSS file, but for convenience we just copy/pasted it into an XF template. It also makes it easier for users to adjust something in there if they need to, or even allow you to replace some of the styling with style properties/colour palette colours, etc.
     
    Freelancer and Nobita.Kun like this.
  9. Freelancer

    Freelancer Well-Known Member

    (y)(y)(y) everything else is a "PITA" for designers.
     

Share This Page