Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Document @title on @class=example #17

Open
halindrome opened this issue Dec 10, 2014 · 5 comments
Open

Document @title on @class=example #17

halindrome opened this issue Dec 10, 2014 · 5 comments

Comments

@halindrome
Copy link
Contributor

From @azaroth42 on November 3, 2014 15:5

Not sure if this belongs here, but it would be great if the use of a title attribute on a section with class="example" to generate a title could be documented.

For example here: http://www.w3.org/respec/guide.html#examples-syntax-highlighting

Copied from original issue: w3c/respec#356

@halindrome
Copy link
Contributor Author

According to the code, if you have an 'example' then a div is created with the class 'example-title'. That div will contain a 'span' with the text "Example N" where N is the example number that is automatically generated. If there is a title attribute on the element, then a colon and the text of the title attribute are appended to the contents of the span. E.g., <pre class='example' title='My Important Example'>some example</pre> will be prepended with <div class='example-title'><span>Example N</span>: My Important Example</div>

Is that the behavior you are seeing? And is that what you would like documented?

@halindrome
Copy link
Contributor Author

From @azaroth42 on November 3, 2014 15:43

Yes, that's exactly what I'm seeing, expecting and would like to be documented in the reference and/or user guide :)

@triblondon
Copy link

The syntax highlighting example anchor referenced in this issue is no longer in the user guide, and there's still not a ton of info on the docs page for the example CSS class. I also had to read the code :-)

I did a very quick update to the wiki page to capture the info I think is missing, and expected to make a PR but it looks like I have permissions to just directly edit :-O. @marcoscaceres you may want to check it!

https://github.com/w3c/respec/wiki/example

@marcoscaceres
Copy link
Member

@triblondon, thanks! looks good. Tested example locally too.

screenshot 2017-02-01 17 40 02

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants