Skip to content

Instantly share code, notes, and snippets.

@ctalau
Created June 2, 2017 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctalau/42299b9d132ab86bf7b53dacbc2cb3e5 to your computer and use it in GitHub Desktop.
Save ctalau/42299b9d132ab86bf7b53dacbc2cb3e5 to your computer and use it in GitHub Desktop.
section:before {
content: oxy_button(action, oxy_action(
name, 'Collapse',
description, 'Collapse section',
operation, 'SetPseudoClassOperation',
arg-name, '-oxy-section-folded'
));
}
section:-oxy-section-folded:before {
content: oxy_button(action, oxy_action(
name, 'Expand',
description, 'Expand section',
operation, 'RemovePseudoClassOperation',
arg-name, '-oxy-section-folded'
));
}
section:-oxy-section-folded > * {
display: none;
}
section:-oxy-section-folded > title {
display: block;
}
section, title, p {
display: block;
white-space: normal;
}
section > title {
font-size: 20px;
}
title {
font-size: 32px;
font-weight: bold;
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="folding.css"?>
<topic id="topic_fb2_ddf_c1b">
<title>Folding</title><body>
<section id="section_prr_ddf_c1b">
<title>Title section 1</title>
<p>Content section 1</p>
</section>
<section id="section_fmz_ddf_c1b">
<title>Title section 2</title>
<p>Content section 2</p>
</section>
</body>
</topic>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment