rhache

Topic: Recommended change to tripoli class convention

To whom it may concern,

I really like Tripoli, but I would make one substitution: change the "content" class name to something else.

The reason I think this would be useful is because content management systems often use that class, which means that Tripoli will sometimes affects/interferes the built-in CMS stylesheets.

My recommendation would be to use a "tripoli" class that one could discreetly add where appropriate. I know that it's easy for me to do a search and replace to the stylesheets provided, but it would be one less step for most CMS users.

Sincerely,
Rene

David

Re: Recommended change to tripoli class convention

Hi rhache!

I really see your point here. I just never thought about it like that, but when you put it that way it actually makes sense. Thank you for your input, I will definitely considerit for the final release.

maniqui

Re: Recommended change to tripoli class convention

Although I can understand rhache's point, I don't totally agree.
Having semantic class name is better than visual class name. "Tripoli" doesn't fit in neither those two groups.
Also, I prefer having an agnostic CSS "framework". If tomorrow I switch from Tripoli (not saying I would wink, I'm enjoying this), I will have to go through my templates/CMS/whatever and remove the "tripoli" class.

I go fo "content", as it is right now.

Which are the CMSs that are collapsing with this convention?

rhache

Re: Recommended change to tripoli class convention

Maniqui/David,

I'd have to say almost all of them (CMS's that use the content class). I tend to use Drupal more than others -- which is easy enough for me to configure, but not necessarily for newbies. I'm not claiming that it's "collapsing" or breaking a CMS -- that's too strong of a word -- but most CMS come with their own stylesheets, and most use a div with a content class (and often in multiple places).

Maybe using a class called "type-tripoli" might be better (or something like that). That indicates the basic function (nice typography defaults) and where the changes are coming from.

There is another advantage to having "tripoli" as part of the class name: it's even more obvious when using a tool like Firebug to know what tripoli is affecting and how at a glance. "Content" as a class name is very generic, and separating what your stylesheet and tripoli's do would be an added bonus. For those that want Tripoli to affect the "content" class/div, you could simply change your div to something like <div class="content type-tripoli">.

As a final point, I want to make it clear that it's no biggie. However, it does make more sense from a development point of view for a CMS, which opens the door to Tripoli being even more popular. If I have to change it manually I will, but I'm an advanced user.

Thanks,
Rene

Last edited by rhache (2008-05-16 21:37:36)

Riley

Re: Recommended change to tripoli class convention

I second the motion.

maniqui

Re: Recommended change to tripoli class convention

Although I'm not totally convinced yet, probably the way to go it's the one suggested by rhache on the first post: to search and replace.

Maybe, this "issue" can be stated on the Tripoli website and on a readme file on the downloaded package. Like:
"If you are currently using a class with the name 'content' and don't want Tripoli styles to mess with them, just do a search and replace '.content' with whatever class name you want"

Some advantages of keeping the class name as "content": it keeps "backward compatibility" with previous Tripoli releases (ok, Tripoli is still in beta, and not too widespread to worry about breaking backward compatibility).
It's more "educative" a class "content" than a class "tripoli", and it certainly look less intrusive (but the same argument can be used for a class name like "tripoli", so this may not be a real "advantage").
It's more semantic than "tripoli" (or whatever).

Ok: "tripoli-content" seems to much. "tripoli" isn't that semantic. "tpl-content" is short, but cryptic...