Skip to content

Pseudo State()

esr360 edited this page Jan 17, 2020 · 4 revisions

This mixin is part of Cell Query

Overview

The pseudo-state() mixin allows you to apply styles to your modules/components when certain pseudo-states are applied (can also be used for generating styles for pseudo-elements).

@include pseudo-state($state);

Parameters

$state

Type String
Description [required] the name of the pseudo-state to apply styles use
Default undefined

State Mixins

  • hover - apply styles to a module/component when it is hovered

Hover

Apply styles to a module/component when it is hovered

@include module('widget') {
  @include hover {
    // hover styles
  }
}

Equivalent to:

@include module('widget') {
  @include pseudo-state('hover') {
    // hover styles
  }
}

Equivalent to:

@include module('widget') {
  &:hover {
    // hover styles
  }
}
Clone this wiki locally