Katochimoto/xblocks

View on GitHub
src/blocks/menuitem/style/index.styl

Summary

Maintainability
Test Coverage
@require "../../../styl/init"

xb-menuitem
  skin: xb-block

.xb-menuitem
  skin: v3-menu__item (_size large)
  outline: none

  &:hover
    background: inherit

  &._focused
    skin: v3-menu__item_hover

  &._selected:before
    skin: v3-icon_check selecty small
    content: ""
    float: right
    margin: 3px -6px 0 10px

  &._submenu:before
    skin: icon_dropdown selecty small
    content: ""
    margin-top: 0
    transform: scale(0.75) rotate(-45deg) translate(3px, 5px)


  & > ._label:not(:empty) + xb-ico,
  & > xb-ico + ._label:not(:empty)
    margin-left: 0.5 * $islands_s

  & > xb-ico:first-child
    margin-left: -0.5 * $islands_s

  & > xb-ico:last-child
    margin-right: -0.5 * $islands_s