Skip to content

Instantly share code, notes, and snippets.

@belozer
Created July 26, 2016 16:50
Show Gist options
  • Save belozer/e55d6c37418ae1e4cf4cb52021bb6e44 to your computer and use it in GitHub Desktop.
Save belozer/e55d6c37418ae1e4cf4cb52021bb6e44 to your computer and use it in GitHub Desktop.
block(menu-item).mod(theme islands)
{
position: relative;
white-space: nowrap;
mod(disabled)
{
opacity: 0.3;
}
block(link).mod(disabled)
{
cursor: text;
}
mod(checked)
{
background: 0 50% no-repeat url(../../theme/_islands/tip.svg);
}
mod(hovered)
{
cursor: pointer;
background-color: #ffeba0;
}
mod(type link)
{
.link /* или block(link) */
{
text-decoration: none;
color: inherit;
outline: none;
// Fit clickable area to `menu-item` size
&:after
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
}
}
}
for sizeVal, i in s m l xl {
.menu_size_{sizeVal}
{
block(menu-item).mod(theme islands)
{
padding: 0 (paddingHor[i])px;
background-size: (tipSize[i])px (tipSize[i])px;
background-position: (paddingHor[i])px 50%;
}
block(menu).elem(group) + block(menu-item).mod(theme islands)
{
margin-top: (paddingVert[i])px;
}
&[class*='menu_mode'] block(menu-item).mod(theme islands),
block(menu).elem(group-title) ~ block(menu-item).mod(theme islands)
{
padding: 0 (paddingLeft[i])px;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment