-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
With certain parent CSS rules, it is possible to break styling (accidentally).
This can be seen with this Sphinx theme https://github.com/snide/sphinx_rtd_theme.
For example see the template below:
{% extends "!layout.html" %}
{%- block extrahead %}
<script src="/_static/json-schema-view.min.js"></script>
<link rel="stylesheet" href="/_static/json-schema-view.min.css"></script>
<script>
window.addEventListener('load', function () {
var view;
var codeBlocks = document.getElementsByClassName('highlight-jsonschema');
for (var i = 0; i < codeBlocks.length; i++) {
try {
view = new JSONSchemaView(JSON.parse(codeBlocks[i].textContent));
} catch (e) {
console.log(e)
}
codeBlocks[i].parentElement.replaceChild(view.render(), codeBlocks[i]);
}
});
</script>
<style>
.json-schema-view .property,
json-schema-view .property {
display: table-row !important;
}
</style>
{% endblock %}
Metadata
Metadata
Assignees
Labels
No labels