| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Annoying CSS Decisions (Default Theme) | |
|---|---|
| Tweet Topic Started: Aug 28 2011, 04:43 PM (760 Views) | |
| James Walter | Aug 28 2011, 04:43 PM Post #1 |
|
Member
![]() ![]() ![]()
|
Alright, I've already created several themes for myself and others, and the frustration I've had with the default ZB CSS has mushroomed to the point where I am now creating my own default CSS/template to use when creating forum skins. This may not be the right place to discuss this, but I know one of the large selling points for ZB is how easy it is to customize yourself, along with the wealth of mods available from the community. My question is... why in the world is something like this in the CSS...
The first time I worked on a skin, that particular line really ruined my day... I was a complete noob with CSS then and got so frustrated trying to figure out why my category and drop menu links refused to listen to the colors I was selecting for them. That particular line of code is almost entirely useless, not to mention redundant and a complete waste of space. I'm still digging through the CSS and finding other small snippets that are similar to the one above... and it makes me wonder WHY? |
![]() |
|
| Kotton | Aug 29 2011, 12:36 AM Post #2 |
![]()
★ Career Criminal ★
![]() ![]() ![]() ![]()
|
I may be wrong, but doesn't that just group all of those items into a singular entity so they all receive white text properties? and if that's the case, I think it's fairly clever vs assigning/defining each item's individual properties Edited by Kotton, Aug 29 2011, 12:37 AM.
|
![]() |
|
| James Walter | Aug 29 2011, 03:28 AM Post #3 |
|
Member
![]() ![]() ![]()
|
No, you're right. The problem stems from the fact that each of those selectors are found multiple times throughout the CSS, which can cause some headaches when trying to do something as simple as change the link color. It wouldn't be so bad if the CSS weren't 1800+ lines long. But with a file that large, there should at least be some logic in which elements are grouped, and where they are placed in the file. |
![]() |
|
| Ben | Aug 29 2011, 09:59 AM Post #4 |
|
Quantum-locked when observed.
![]()
|
Selectors are grouped that way to reduce the number of times we have to assign elements the colour white as their text colour. This is useful when one wants to adjust the colour of all those elements in one go—otherwise, one would have to search through the entire style sheet, find each of those selectors, and change the text colour! I agree that the ZB CSS is somewhat long and perhaps unwieldy, and that's particularly unfortunate for people who are new to CSS. That being said, tinkering with different parts of the style sheet to learn how the rules cascade is part of the learning process—albeit one of the more frustrating parts. I myself, as someone who has been using CSS for years now, still get tripped up by priority all the time. If you use Firefox, I cannot recommend enough that you use Firebug to help you with your development. Firebug will actually show you which rules in the style sheet are taking effect and which rules are being overriden somewhere else, all on an element by element basis. It's invaluable for untangling knots like those you have encountered. Other browsers have similar developer tools. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · ZetaBoards - Theme & Code Support · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)





8:41 PM Jul 10