-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent attribute syntax #102
Comments
This is a discussion item, and belongs on talk.commonmark.org, not here. |
So, what is needed before it can be put up officially? Or is this via just directly pulling git request to specs? There seems to already be a consensus about this, or does it need to be more strictly defined and agreed upon? There is currently a #105 request by mb21 on this nature |
There is a consensus, perhaps, among people who have commented on that On Wed, Sep 10, 2014 at 10:02 AM, mofosyne [email protected] wrote:
|
This proposal is to ensure consistency in implementing attributes
{}
as seen in pandoc.This is the attribute format that is in consensus so far in http://talk.commonmark.org/t/consistent-attribute-syntax:
#myId
in html is theid=myId
field of a html tag. This is useful for anchors. There will be no uniqueness checking requirements since it's the writers job to pick unique names not CommonMark..myClass
in html is theclass=myClass
field of a html tag. This is useful for general styling, e.g. syntax highlighting in code fields.key=val key2="val 2"
is treated depending on context. Most of the time, it's just appended to the html tag like #myId and .myClass. It can be thought of as the 'settings' of the CommonMark elements. E.g. width and height of embedded videos.Discussed:
,
when{}
will be visually manageable.Contentious issue:
There is one objection by chrisalley that
{ size: 10, duration: 10, cycle: forever }
is more readable than{ size=10 duration=10 cycle=forever }
Consistent attribute syntax in practice:
Url Links
Embedded Media
assumed to be image if mediaType left blank
syntactic sugar ( content of
()
handled by mediaType handler/extension):is equivalent to typing:
Extension Directives (For extra extensions!):
or
Code:
Shorthand version:
fenced code:
short hand version:
Header:
Block styling
List
The text was updated successfully, but these errors were encountered: