Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-03-22 16:35:46

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Adding CSS class to article element is a bad practice ?

Hey Txp users,

A Chris Coyier article about the use of CSS class of the elements of a article (content = stored in the database) and inconvenience it causes.
I find that in the case of a blog is especially true.
Having code of articles clean (no CSS class, no inline CSS) facilitate maintenance and migration of a system/CMS to another.

Source : css-tricks.com/class-up-templates-not-content/

Offline

#2 2016-03-22 18:04:38

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Adding CSS class to article element is a bad practice ?

From the article:

Content in Markdown Helps

Markdown is comfortable to write in, once you get the hang of it. But its best feature is that it doesn’t put, or even allow you to put, classes on any of the HTML it generates. Unless you write HTML directly in the Markdown, which always feels a little dirty (as it should).

The same could be said of Textile.

I have an old blog that I wanted to reuse the domain but still keep the content online so I set it up as a free Wordpress.com blog. The problem is that all the entries are in Textile (the original blog was Movable Type around 12 years ago). So I have been using navigating to each entry, copy them into Textpattern, viewing and copying the HTML preview, and then pasting them back into the Wordpress.com interface. Time-consuming but it works.

Honestly, though, I am disappointed that neither of them has quite caught on quite the way we all hoped.

p.s. I never hard learned Markdown beyond a couple of simple things you can do in Google+.

Offline

Board footer

Powered by FluxBB