CSS for disqus

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
7/15/2010 9:40:31 AM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

CSS for disqus

Hi Joe -- not that I think you're the only one, but you do seem to be the only one who answers questions. :)

I have a weird question this time:  I use the Disqus comment system, since I already have an acct with them, but I have noted that there don't seem to be any CSS attribs for Disqus, anywhere in Mojo.  I created a definition for ".cmwrapper" which seems to be the wrapper for the entire Disqus portion of the page, mainly because there are zero margins for this wrapper, pushing it right up against the sidebars, which looks awful -- I created 10px margin and padding on both right and left side, which looks much better -- but, since I create skins, I'm forced to add this attrib to every CSS I create, and I'm wondering if there is some CSS file that will apply to the whole site, regardless of the skin selected -- I have looked for such a critter, and not found it; I have searched for the word "disqus" in the entire site, found quite a few instances of it but no CSS that seems pertinent to it, other than the one .cmwrapper attrib I created.

If there isn't, by default, any particular CSS file that applies to the site regardless of skin, is it possible to create such a file, and if so, how would I go about having it included in the "merge CSS" control thingie?

Thx!

Andria

7/15/2010 10:35:53 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: CSS for disqus

The first thing that comes to my mind is that you could create a separate css file for the Disqus styles you want, and place that in a globally accessible location for all skins. You would then have to reference it in the style.config file for each of your skins (that's the file used by the "merge CSS control thingie" you're referring to).

style.config would end up looking like:

<cssfiles>

...

  <file>style.css</file>
  <file>stylemenu.css</file>
  <file>styletreeview.css</file>
  <file>styleblog.css</file>
  <file>styleforum.css</file>
  <file>stylefeedmanager.css</file>
  <file>styleformwizard.css</file>
  <file>stylewebstore.css</file>
  <file>styleaspcalendar.css</file>
  <file>styledatacalendar.css</file>
  <file>/Data/globalcss/disqus.css</file

 ...

</cssfiles>

Hope that helps!

Jamie

7/15/2010 3:06:37 PM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: CSS for disqus

Hmm.  It doesn't really address the problem, of having to do something to each and every skin I create, in order for the skin to look good at my site.  Whether I make the change to each skin in its style.config or its style.css, still have to add it to each skin.  I'm looking for something that will always be included, no matter what skin is active on a given page.  Other people may not use Disqus, so it seems inappropriate, perhaps even rude, to include CSS they may have no use for -- it will slow down the site if nothing else, and add a bit of complexity that perhaps is unnecessary and might confuse some folks (I've realized that other webmasters are not necessarily as conversant with code, even simple code like CSS, as I am).  Mainly I just want it to be used anytime that .cmwrapper attrib is encountered -- which is anytime Disqus appears on a page.  If those who might like my skins are using Disqus, then it would be a real boon to them to have that CSS, becaue having the Disqus portion smack up against the sidebars is UGLY, but what if they use that other comment system?  I know nothing about it, having never used it, so I could not venture to know what CSS might be necessary for it.

Now, if someone knows, if that .cmwrapper attrib is used to wrap EITHER comment system, then really there is no problem; there actually NEEDS to be some styling applied to that attrib to get it off the sidebars.  But since I use Disqus, not the other one, I have no real way of knowing for sure if that is the case.

Thx!

Andria

7/16/2010 9:08:13 AM
Gravatar
Total Posts 18439

Re: CSS for disqus

Hi Andria,

The div with the class cmwrapper is used to wrap either comment system and is intended to give you a hook to be able to style the container if needed and as needed for your design.

I will go through the included skins that ship with mojoPortal for the next release and add this to put a little margin there to prevent it hitting the edge.

.cmwrapper { margin:10px; }

but anything beyond that should be decided by the designer. I don't think we should globally push any CSS into the skin other than what is defined in style.config. That would be taking control away from the designer.

You can style it in your designs with whatever works for you and it hardly seems like it is much work to add a little CSS to your skins yourself. If you are finding you need the same CSS in all your designs you can define that stuff in a common file as Jamie suggested and include it in your style.config. But for such a small css fragment it seems easy enough to me to just add it to an existing css file instead of a separate one. Typically a new skin uses an existing skin as the starting point so once you have added it to your current skins I don't see how it is any big maintenance problem for your future skins.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.