No.
(Sorry)
CSS has no way of ascending the DOM, this is not how it works - as such any element which is a child of the body
, such as a button, cannot traverse and style the body
using a CSS selector.
There are therefore 2 ways you can do this:
Use javascript to add/alter the styling of the body
on the button click
Have an absolutely positioned, width/height 100% top left:0 div
overlayed on the body, then do, e.g:
HTML
<button>Click me!</button>
<div></div>
CSS
html, body, div {
height:100%;
width:100%;
margin:0;
padding:0;
position:relative;
}
body {
background:grey;
}
div {
display:none;
background:red;
position:absolute;
left:0;
top:0;
}
button {
z-index:1;
position:relative;
}
button:focus + div {
display:block;
z-index:0;
}
However, it is likely this will not work in a production environment due to the various dependencies required to make this work, thus making the first solution preferable.