Make focus mode extension more generic (#1026)

Use a generic selector that will hide all the content outside an
<article>.
This commit is contained in:
Sebastian Benz
2023-12-06 17:46:16 +01:00
committed by GitHub
parent dcd08adfe8
commit 655782d8ee

View File

@@ -14,14 +14,23 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
body > .scaffold > :is(top-nav, navigation-rail, side-nav, footer), * {
main > :not(:last-child), display: none!important
main > :last-child > navigation-tree,
main .toc-container {
display: none;
} }
main > :last-child { html,
margin-top: min(10vmax, 10rem); body,
margin-bottom: min(10vmax, 10rem); *:has(article),
article,
article * {
display: revert!important;
}
[role=navigation] {
display: none!important
}
article {
margin: auto;
max-width: 700px;
} }