Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 Abuse adslight Android AntiHarvesting AntiSpam Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs Clicks content CĂN demo docek download Dresses evden eve facebook Fat floor for free Gateway Google Guide herre Home Honeypot HP html5 Human HỘ IP iPhone jQuery List log Loss module modules Monster new newbb news NHÀ online PARK phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Smoking Spam stem Studio support tag tags tdmcreate template The Theme themes User userlog web weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137296

Trudy

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post



#1 Posted on: 2011/1/1 23:29 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?



Thanks!

Rodney

Top

redheadedrod
Home away from home
Home away from home
Joined:
2008/2/26 10:05
From Grand Rapids, MI
Group:
Registered Users
Posts: 1248
(Show More) (Show Less)


#2 Posted on: 2011/1/2 7:54 Re: How many .css sheets are used with xoops and where are they?
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

Top

Tarik
Not too shy to talk
Not too shy to talk
Joined:
2010/2/3 5:02
From Morocco
Group:
Registered Users
Posts: 160
(Show More) (Show Less)


#3 Posted on: 2012/5/25 4:28 Re: How many .css sheets are used with xoops and where are they?
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?

greets

TenLong

Top

TenLong
Just popping in
Just popping in
Joined:
2012/5/3 9:22
From Taiwan
Group:
Registered Users
Posts: 14
(Show More) (Show Less)







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.

[Advanced Search]