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

Is it possible to use @primaryLight (or other variations) in an external css file?

Discussion in 'XenForo Development Discussions' started by Dazedndconfused, Jun 3, 2014.

  1. Hi, I was wondering if it was possible to use the @primaryLight for color in a css file within library? If not, how would I utilize a stylesheet from within the acp in an addons <insertwhateverhere>.php?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    No it's not possible as external CSS won't be compiled by the template compiler.

    My suggestion is to not use external style sheets at all. Create a new CSS template in XenForo and copy the contents of the stylesheet into that. You can then use whatever syntax and style properties you like in there.
     
  3. How would I use this in a php file? Sorry I'm quite new to this and I either can't find a solution, or I haven't run accross one that makes sense to me.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Why would you need to use CSS in a PHP file?
     
  5. Because I'm collecting a dynamic array of information and rendering it with php. Which makes it a bit easier and quicker. And styling after that is not an option because certain portions have to be indented more than others depending on the layout of the info gathered.

    For instance if I gathered a, b, c, d, e, f, and g, and a was the parent of b and c, I would want it to look similar to this
    a
    <insert tab here>b
    <insert tab here>c
    d
    e
    f
    g

    (it didnt like my spacing :C)
     
  6. Basically, what I had worked until I added it to my actual forums which has a theme installed. Then some of my information wasn't readable. I wanted to make it versatile so it could be used with different themes (I don't like staying with one thing for too long).
     

Share This Page