Logged Out
Create an Account
Login:
Password:

Forgot your password?
Calendar Styling - 'calsomething' items can't be overridden in CSS

Calendar Styling - 'calsomething' items can't be overridden in CSS
[Back to Index]  [Bottom of Thread]
Thread Tags
Primary: [Tickets]
Secondary: None
It appears that the color for "calsomething" items is emitted into the HTML stream making it almost impossible to override from CSS. Perhaps emit a class and include a CSS file that contains the user's colors?

While we're on the subject, is there a way to control the default color for a calsomething item? I went into the scheduled items and cleared out the color, but that seemed to set it to gray and not to "transparent" like I wanted.

Thanks!

--
Quaiche - Addon Author, Druid, and Guild Leader for Benevolent Thuggery on Dragonblight
I'll second this request!

You, can, however override the styling for all the .calsomething's using !important:

.calsomething {
color: inherit !important;
}


etc

One trick I've found, if you really want a clean slate on these sites (in addition to a browser reset stylesheet) is to do something along the lines of:

* {
color: inherit !important;
font-size: 1em !important;
}


you just have to have an !important on every color: and font-size: declaration you make after that
Interesting. I'll look into this, as this seems to me like a bug.

--
It's all in the reflexes.
Yes, you can use the !important directive in CSS to try to force an override of a later defined style, but some browsers don't behave consistently wrt. that directive.

What works more reliably is to define a <style> tag at the END of the html stream and override it there. Then the rule of "last defined wins" works for you.

--
Quaiche - Addon Author, Druid, and Guild Leader for Benevolent Thuggery on Dragonblight
But back to the original point...

I would love to see all of the style and positioning elements removed from the generated HTML stream and moved into CSS.

This obviously includes emitted style='xxx' content, but also includes things like width="100%" tags on tables and cells, color tags and style, etc. All of these things make good CSS styling difficult, if not impossible.

My first request, though, would be to scan the HTML stream for all occurances of style="xxx" and get rid of them. That would help a lot.

--
Quaiche - Addon Author, Druid, and Guild Leader for Benevolent Thuggery on Dragonblight
Quote by Quaiche
What works more reliably is to define a <style> tag at the END of the html stream and override it there. Then the rule of "last defined wins" works for you.


Oho, I wasn't aware of that trick! I had assumed that html-level styles always had top priority with selectors
Found another one...

The forum tag coloring and font size are set in an emitted style="xxxx" attribute.

E.g:


<span style='color:#ed65d6;font-size:7.5pt'>[Raiding - non specific]</span>


The span is good. No class is bad. Embedded styling is worse.

--
Quaiche - Addon Author, Druid, and Guild Leader for Benevolent Thuggery on Dragonblight
In many of these cases, I can certainly add a class to them, and mostly remove the styling, but with the forum threads, the color styling must remain as the coloring is defined in the admin menu.

--
It's all in the reflexes.
You might be able to get away with some inline stylesheets:

give each tag a unique class. for example, using the above:
<span class="threadtag threadtag_raiding_-_non_specific">[Raiding - non specific]</span>

somewhere in the header of each site (or a "dynamic" css script):
<style type="text/css">
.threadtag_raiding_-_non_specific {
color: <defined color>;
}
etc
</style>
Call me shortsighted. I know it's possible, but I'm wondering why that in particular would be practical. I suppose so that you could REALLY mess with the styling on each thread tag.

I guess I could do that when I implement the forum upgrades.

--
It's all in the reflexes.
Nevir's approach is exactly what I was about to suggest.

Remember, the whole point of all this is to put all the formatting information into CSS where it can be controlled by the designer.

In an ideal XHTML/CSS world, the HTML content is entirely layout and formatting free with the exception of author content markup (like that provided by the rich BBCode editor... bold, italic, , etc.).

All the computer generated code ideally is just <div> and <span> tags with classes and content.

For an amazing example of this, see http://www.csszengarden.com/. I know that is a bit much, but it helps show what can really be done w/ end-user CSS styling.

Keep up the good work.

--
Quaiche - Addon Author, Druid, and Guild Leader for Benevolent Thuggery on Dragonblight


[Back to Index]  [Top of Thread]