PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Kaervek
Forum Commoner
Posts: 25 Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:
Post
by Kaervek » Mon Mar 19, 2007 6:04 am
Is there a php function/file/class or any other utility that i can put on my domain that will open and read a css file and output samples of all the styles therein?
sort of like a css pallet page, that i can look at and select the style i want.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Mar 19, 2007 9:53 am
I haven't heard of such a thing. Interesting idea though.
Kaervek
Forum Commoner
Posts: 25 Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:
Post
by Kaervek » Mon Mar 19, 2007 10:58 am
isnt it tho...
i thought of writing one the other day but decided to look around the net first... why reinvent the wheel right?
mikeq
Forum Regular
Posts: 512 Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland
Post
by mikeq » Mon Mar 19, 2007 11:19 am
A quick read of my Javascript book shows you can with Javascript
The DOM makes it possible to traverse stylesheets, they are in a stylesheets array. document.styleSheets[]
Code: Select all
//the first style sheet
var ss = document.styleSheets[0];
each rule is in a cssRules[] array
have a look on google
Kaervek
Forum Commoner
Posts: 25 Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:
Post
by Kaervek » Mon Mar 19, 2007 1:17 pm
It is better to be thought a fool and keep silent, than to open your mouth and remove all doubt.
-Mark Twain
mikeq
Forum Regular
Posts: 512 Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland
Post
by mikeq » Tue Mar 20, 2007 3:05 am
Dont know if that is a reply to my post, an insult or just a statement about the quote in my signature