Add CSS tools to css-examples #45
Merged
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.
@rachelandrew , @Rumyra , I'd love your feedback on this PR.
We currently have a few pages in the CSS docs that are self-contained tools:
I think these are useful pages, but they are implemented as live samples. Live samples are really intended to be example code that can also be executed, so the reader can see the code but also see the result of it. These pages use that mechanism but hide all the code and implement a tool's UI in the live sample code.
This makes them really hard to maintain, because the code is treated like content. For example,
<
has to be escaped, and the code lives in one giant HTML file inside<pre>
blocks.If we want to keep these tools, the best solution I think would be for them to be part of Yari. But as a quicker fix that still helps quite a lot, we could keep them as GitHub pages - then they are more like code, so it should be at least possible to work on them.
I've had this in mind for a while but the final straw was that they are broken in the Markdown conversion (mdn/content#7779). We could perhaps fix it, or leave them as HTML (since they're not very editable anyway), but I thought a better solution would be this. It turned out to be really easy to do.
But I'm not sure how this aligns with the general policy of this repo, so I'd love feedback.
So this PR adds just one of these tools, the border image generator. If you think it makes sense, I'll add the other tools to this PR, and update mdn/content to use
EmbedGHLiveSample
for these pages.