Skip to content

Instantly share code, notes, and snippets.

@zanshin
Created September 20, 2011 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zanshin/1228196 to your computer and use it in GitHub Desktop.
Save zanshin/1228196 to your computer and use it in GitHub Desktop.
CSS to expand figure elements on hover
// hover style to expand figures
article { overflow: visible; }
figure:hover { width: 800px; }
@zanshin
Copy link
Author

zanshin commented Sep 20, 2011

Updated code to target only those figures using a role of "code". Here's the new code:

    article { overflow: visible; }
    figure[role="code"]:hover { width: 800px; overflow: inherit; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment