mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user