-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
@@ -0,0 +1,40 @@ | |||
--- | |||
title: 'contenteditable attribute' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have short_title
because it has a wordy title
. To decide whether short_title
is needed, imagine title
in a sidebar, under a heading describing what sorts of things these are:
- Global attributes
- contenteditable attribute
- dir attribute
- draggable attribute
...
versus:
- Global attributes
- contenteditable
- dir
- draggable
...
|
||
If this attribute is not set, its default value is inherited from its parent element. | ||
|
||
## Usage notes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the recipe should include prose.overview
after the interactive example, and we should use this "Usage notes" section for it (we've done something similar with the HTML elements, see #55).
Yes, very nicely done! I've tested it in stumptown-renderer and it renders properly, too.
On using the same recipe for element-specific attributes, I've filed #215 and made a rather long comment there. Perhaps we can talk about structuring global attributes independently of that. There seem to be two things that are structured in element-specific attributes, but are not structured in this PR.
? It would be a bit annoying for authors to have to update I think this situation, where we have structured content whose "leaves" are prose, is going to come up a lot - CSS properties might also have values, and function parameters might have something similar. |
I've been going back and forth on this, but I think I should file a PR so we can discuss instead of me thinking this through on my own. So, this is an attempt to introduce a new content type "HTML global attributes". I've kept the PR small, so all it does is adding one global attribute "contenteditable" for now.
I'm interested in hearing if this is the correct way to add a new content type and then I'd like to discuss how stumptownified it is and which way we need to go next.
So, I think this would migrate global attributes into a structure, but it mostly treats the information as prose. That is, if we migrate all the global attributes like this, a data consumer would know which global attributes exists and could do a few queries about them. But:
It doesn't follow a structure for the values. We have this for element specific attributes and I think it would need a bit of refactoring of that code to also make it work for global attributes values. Or is the problem rather that the element specific attributes should follow a recipe (as discussed in the writer's guide PR) and then have global attributes and element specific attributes share that recipe and any code that extracts structured information? I feel like this is an essential question about recipes and information extraction and would like to know what y'all think about it or if I'm just blanking out on how to implement this correctly.