Skip to content

Commit 655782d

Browse files
Make focus mode extension more generic (GoogleChrome#1026)
Use a generic selector that will hide all the content outside an <article>.
1 parent dcd08ad commit 655782d

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

functional-samples/tutorial.focus-mode/focus-mode.css

+17-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
body > .scaffold > :is(top-nav, navigation-rail, side-nav, footer),
18-
main > :not(:last-child),
19-
main > :last-child > navigation-tree,
20-
main .toc-container {
21-
display: none;
17+
* {
18+
display: none!important
2219
}
2320

24-
main > :last-child {
25-
margin-top: min(10vmax, 10rem);
26-
margin-bottom: min(10vmax, 10rem);
21+
html,
22+
body,
23+
*:has(article),
24+
article,
25+
article * {
26+
display: revert!important;
27+
}
28+
29+
[role=navigation] {
30+
display: none!important
31+
}
32+
33+
article {
34+
margin: auto;
35+
max-width: 700px;
2736
}

0 commit comments

Comments
 (0)