[WIP] Start transforming documentation toggles into pure css ones#83355
Closed
GuillaumeGomez wants to merge 1 commit intorust-lang:masterfrom
Closed
[WIP] Start transforming documentation toggles into pure css ones#83355GuillaumeGomez wants to merge 1 commit intorust-lang:masterfrom
GuillaumeGomez wants to merge 1 commit intorust-lang:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a first draft of #83332. I precise: this is a work in progress. However, with this we can already see what it'll look like after. I precise: even if incomplete, this is working.
For now, this PR switched the doc blocks toggles for the following parts:
Some explanations on how it works: I used a trick based on checkbox. I hide the checkbox and only print its label, so when you click on the label, you check/uncheck the checkbox. Now, that also brings some downsides too:
divto wrap the function and its documentation. However, I see that as a positive point because we're finally "merging" the items and their documentation.div, alabeland aninputfor each item with documentation.The advantages now:
There are some small display differences too because currently we use
widthon the -/+ sign to make the whole a big larger.Before:
After:
If this seems to be the right way to go, I'll clean up this PR (and finish to remove the remaining JS toggles) so we can finally have toggles 100% non-JS. \o/
r? @Manishearth