How many .css sheets are used with xoops and where are they?

Ok, I am curious how the .css structure of xoops is designed?

There is a xoops.css

and most themes at minimum have a style.css.

Been told we can put a style.css in with the module as well.

I am curious how this works and how it all ties together?

How do these all get used?

Is the xoops.css read first then the theme style.css then the module style.css? Then by inheritance they would be read in that order so module style.css would override theme.css which would override xoops.css?



Re: How many .css sheets are used with xoops and where are they?
  • 2011/1/2 13:54

  • Tarik

  • Not too shy to talk

  • Posts: 170

  • Since: 2010/2/3 1

if you open the source code of a website using xoops by using the browser you will see something like this

<!-- Sheet Css -->
link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="http://www.arabxoops.com/xoops.css" />
link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="http://www.arabxoops.com/themes/2010/css/style.css" />
customized header contents -->

the 2 first stylesheet are both called from the file theme.html
so that xoops.css will be the first stylesheet to load containing some css resets concerning some xoops elements (banner,blocks,....)

after that style.css contain the enhancement part (styling with images ..) and because it's after xoops.css it can override some css rules if you change them in style.css

after that come the tough part
<!-- customized header contents -->

here xoops put all css stylesheets called by php or the ones that change depending on some parameters
- like modules, some modules requires some css styling so they can add style sheet just by adding in the php side
$xoTheme->addStylesheet(XOOPS_URL '/modules/yourmodule/style.css');

- like language some langage use right align and rtl so xoops add a style sheet arabic.css or english.css that have a big reset with a lot of !important

that is the big idea behind the magic of xoops css
I hope that you caught the idea

Re: How many .css sheets are used with xoops and where are they?
  • 2012/5/25 9:28

  • TenLong

  • Just popping in

  • Posts: 14

  • Since: 2012/5/3 1

The strange thing is that even though some modules include additional css files, they do not appear in the final webpage if the theme is change. I currently have the problem with wfdownloads.

Can you tell me in which php script the css files added by $xoThemes->addStylesheet(...) are included to the html file in the section
"customized header contents"?

And why is this include successfull for the "default" theme, but fails for others?




Who's Online

91 user(s) are online (65 user(s) are browsing Support Forums)

Members: 0

Guests: 91



Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits