SCSS :hocus mixin

/// @name hocus /// @content Styles to include in :focus/:hover /// @example /// a { /// @include hocus() { /// color: darksalmon; /// } /// /// color: salmon; /// } /// @output /// a { /// color: salmon; /// } /// a:hover, a:focus { /// color: darksalmon; /// } @mixin hocus() { &:hover, &:focus { @content; } }
Shortcut to add styles for :focus and :hover states in SCSS

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.