-
Notifications
You must be signed in to change notification settings - Fork 97
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
Replace the content
class by odoc
#298
Comments
First of all, I'll clarify why I decided to add the
I asked this once already I think, but I don't know (or remember) what's the concrete use case for this. In what circumstances would we want to compose multiple documents? Wouldn't it make sense to use
Hm, unfortunately I find it even more ambiguous than Having said that, I think it would be better to replace What do you think? |
Just realised that your motivation is probably embedding odoc's main content into odig. In which case my suggestion still applies. I think you'd want to extract the On a related note, I also think that having a way to supply a custom document template for odoc would help with this. It was briefly discussed during the fragment PR, if I'm not mistaken. Essentially it would allow to embed odoc's output into existing websites (like ocaml.org). |
You don't care about the tag. You just care about being able to label the subtree that is output by |
Precisely. It's not odoc's responsibility to decide how its content is embedded into other documents. I (personally) was making a suggestion, given that
I would say odoc shouldn't care about the class in the same way it shouldn't care about the tag (see above). In my understanding the intent to label the subtree comes from the fact that the output generated by odoc is being embedded. Which, to me, suggests that the labeling should be done by the tool doing the embedding. Of course having something like |
No I absolutely don't do anything like this in
It's more flexible if you simply output subtrees rather than whole page and let templating occur outside the way your templating engine wishes.
This misses the point. The point is to be able to easily reuse the CSS and target it specifically to the odoc fragment on the page. |
May I ask how it would be more flexible? For example, custom document template could allow both support files and the main content to be injected into the template (not to mention the search bar in the future...). I don't see how that would be done with just content output.
Indeed, you're right. In that case we would need to prefix all odoc-specific CSS selectors with |
It's more flexible because you basically declare that this is not odoc's problem. You don't have to commit to any templating framework. You just let the client input the file hierarchy and document fragments it generated and let it do whathever it wishes with it. In other words: there's no inversion of control and We already went the document template route once a long time ago. Let's not start this again.
Somehow yes. Unless there's an easier way to scope in these beautiful "modern" CSS times. |
Just to be clear this issue is absolutely not urgent, it's really about forward looking |
Feel free to point me to any previous discussions I should be aware of :)
I wouldn't say it's dubious. Many modern website use this convention including, for example, Wikipedia: <div id="content" class="mw-body" role="main">...</div> Regarding scoping: the only issue I see with the I'm curious what @ryyppy thinks about this. |
They may be modern but I really don't see the point of such a generic classification and again the only thing it will bring you is clashes with other "content" if you try to compose, because everyone thinks it has the "contents".
Note that I don't see any |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. The main purpose of this is to keep the issue tracker focused to what is actively being worked on, so that the amount and variety of open yet inactive issues does not overwhelm contributors. An issue closed as stale is not rejected — further discussion is welcome in its closed state, and it can be resurrected at any time. odoc maintainers regularly check issues that were closed as stale in the past, to see if the time is right to reopen and work on them again. PRs addressing issues closed as stale are as welcome as PRs for open issues. They will be given the same review attention, and any other help. |
1. Classify the root odoc tree (currently a `body` element) as `odoc`. This closes ocaml#298 and will help stylesheet management/composition if ocaml#374 ever becomes a reality. 2. Classify toplevel `nav` as `odoc-nav` (new class) 3. Classify module preamble `header` as `odoc-preamble` (new class) 4. Reclassify the toc `nav` from `toc` to `odoc-toc`. 5. Reclassify the content `div` rom `content` to `odoc-content`. Closes ocaml#298.
1. Classify the root odoc tree (currently a `body` element) as `odoc`. This closes ocaml#298 and will help stylesheet management/composition if ocaml#374 ever becomes a reality. 2. Classify toplevel `nav` as `odoc-nav` (new class) 3. Classify module preamble `header` as `odoc-preamble` (new class) 4. Reclassify the toc `nav` from `toc` to `odoc-toc`. 5. Reclassify the content `div` rom `content` to `odoc-content`. Closes ocaml#298.
1. Classify the root odoc tree (currently a `body` element) as `odoc`. This closes #298 and will help stylesheet management/composition if #374 ever becomes a reality. 2. Classify toplevel `nav` as `odoc-nav` (new class) 3. Classify module preamble `header` as `odoc-preamble` (new class) 4. Reclassify the toc `nav` from `toc` to `odoc-toc`. 5. Reclassify the content `div` rom `content` to `odoc-content`. Closes #298.
Currently the main body in the output is classified as
content
which is first pretty meaningless and second, quite bad the day you want to compose the outputs and the css with other documents. I suggest this should beodoc
.The text was updated successfully, but these errors were encountered: