C
Curtis
This looks like a helpful NG.
We're pretty new to CSS and PHP, but we've nevertheless
undertaken the design of a simplified text markup
language--being dedicated free-market advocates, we
naturally call it "Marx." We'll probably open-source it,
though, as a contribution to O-S CMS projects.
Many here will be familiar BBCode, used for forum markup.
Our system is more like a subset of Textile, however, but
with a cleaner syntax. Design considerations are ease of
use, protection from malicious user input, cross-browser
compatibility, with scope of features trailing far in the
rear. It's meant to be a simple markup language, allowing
the basics--and tables, lists, image embedding--not be a
replacement for HTML. The basics are done.
Syntax is like so: *bolds* text, /italicizes/, _underlines_,
+strikes out+, etc. Rather than use an escape character like
\ to type an ordinary asterisk or plus, for example, like so
\* or \+ as some markup schemes do, one simply types the
character twice--after all, your finger is already on the
key!
The syntax is so simple that forum posters can learn it at a
glance. Article writers would require more capabilites, but
five minutes should be sufficient to learn everything. Even
complex entities like tables are a snap. Example:
..th Header1 | Header2 | Header3
.. Data11 | Data 12 | Data13
.. Data21 | Data 22 | Data23
.. Data31 | Data 32 | Data33
Doing this in HTML would easily require *seven times* the
markup keystrokes!
That much of Marx is essentially complete, i.e., simple
syntax that allows basic markup forum posting at one level
(Member), and article markup at a second level (Author),
which may include tables and images. What remains to be
completed is the Editor or Administrator level, where CSS
markup can be written into the page elements.
As it stands, an editor/administrator can style a paragraph
with
..es {color: blue}The paragraph text goes on, but with the
blues, oh yeah...
This embeds the style within the paragraph tag: <p
style="color: blue">The paragraph ...</p>
..cs p {color: blue}
.. table {margin: auto}
creates
<style type="text/css">
p {color: blue}
table {margin: auto}
</style>
Thanks for reading this far--I actually do have some
questions! (Please bear in mind that this text will be
translated into HTML for display--as a /portion/ of a larger
web page.)
1. Do we avoid giving *every* paragraph on the page "the
blues, oh yeah" with the .cs command by encapsulating the
Marxed output HTML with a <div id/class="marx" ...> ...
</div>?
2. (Note I say "id/class"--is there any reason to prefer one
over the other?)
It's easy enough to make this
..cs p {color: blue}
.. table {margin: auto}
come out as
<style type="text/css">
#marx p {color: blue}
#marx table {margin: auto}
</style>
if we use a div=, or if we use class= as
<style type="text/css">
.marx p {color: blue}
.marx table {margin: auto}
</style>
A little easier on the eyes. (The idea of either is to keep
a user from clobbering the whole page with styling
directives meant to be limited to a portion.) So is there a
reason to use one instead of the other in our div wrapper?
As I said, we're new to CSS, so any suggestions or advice as
to pitfalls would be immensely appreciated!
--
Curtis
Visit We the Thinking
www.wethethinking.com
An online magazine/forum
devoted to ideas.
We're pretty new to CSS and PHP, but we've nevertheless
undertaken the design of a simplified text markup
language--being dedicated free-market advocates, we
naturally call it "Marx." We'll probably open-source it,
though, as a contribution to O-S CMS projects.
Many here will be familiar BBCode, used for forum markup.
Our system is more like a subset of Textile, however, but
with a cleaner syntax. Design considerations are ease of
use, protection from malicious user input, cross-browser
compatibility, with scope of features trailing far in the
rear. It's meant to be a simple markup language, allowing
the basics--and tables, lists, image embedding--not be a
replacement for HTML. The basics are done.
Syntax is like so: *bolds* text, /italicizes/, _underlines_,
+strikes out+, etc. Rather than use an escape character like
\ to type an ordinary asterisk or plus, for example, like so
\* or \+ as some markup schemes do, one simply types the
character twice--after all, your finger is already on the
key!
The syntax is so simple that forum posters can learn it at a
glance. Article writers would require more capabilites, but
five minutes should be sufficient to learn everything. Even
complex entities like tables are a snap. Example:
..th Header1 | Header2 | Header3
.. Data11 | Data 12 | Data13
.. Data21 | Data 22 | Data23
.. Data31 | Data 32 | Data33
Doing this in HTML would easily require *seven times* the
markup keystrokes!
That much of Marx is essentially complete, i.e., simple
syntax that allows basic markup forum posting at one level
(Member), and article markup at a second level (Author),
which may include tables and images. What remains to be
completed is the Editor or Administrator level, where CSS
markup can be written into the page elements.
As it stands, an editor/administrator can style a paragraph
with
..es {color: blue}The paragraph text goes on, but with the
blues, oh yeah...
This embeds the style within the paragraph tag: <p
style="color: blue">The paragraph ...</p>
..cs p {color: blue}
.. table {margin: auto}
creates
<style type="text/css">
p {color: blue}
table {margin: auto}
</style>
Thanks for reading this far--I actually do have some
questions! (Please bear in mind that this text will be
translated into HTML for display--as a /portion/ of a larger
web page.)
1. Do we avoid giving *every* paragraph on the page "the
blues, oh yeah" with the .cs command by encapsulating the
Marxed output HTML with a <div id/class="marx" ...> ...
</div>?
2. (Note I say "id/class"--is there any reason to prefer one
over the other?)
It's easy enough to make this
..cs p {color: blue}
.. table {margin: auto}
come out as
<style type="text/css">
#marx p {color: blue}
#marx table {margin: auto}
</style>
if we use a div=, or if we use class= as
<style type="text/css">
.marx p {color: blue}
.marx table {margin: auto}
</style>
A little easier on the eyes. (The idea of either is to keep
a user from clobbering the whole page with styling
directives meant to be limited to a portion.) So is there a
reason to use one instead of the other in our div wrapper?
As I said, we're new to CSS, so any suggestions or advice as
to pitfalls would be immensely appreciated!
--
Curtis
Visit We the Thinking
www.wethethinking.com
An online magazine/forum
devoted to ideas.