Skip to content

Instantly share code, notes, and snippets.

@Blightwidow
Last active March 13, 2019 16:45
Show Gist options
  • Save Blightwidow/2ac223f128b8c7dc1576caf2dad247e6 to your computer and use it in GitHub Desktop.
Save Blightwidow/2ac223f128b8c7dc1576caf2dad247e6 to your computer and use it in GitHub Desktop.
Extend clickable area via CSS #css #html #integration
<div class="container">
<h1>foo</h1>
<p>bar</p>
<p><a href="#" class="container_link">baz</a></p>
</div>
.container {
position: relative;
&_link {
text-decoration: none;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
&:hover,
&:focus {
text-decoration: underline;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment