cheatsheets/_sass/2017/components/page-actions.scss

132 lines
2.0 KiB
SCSS

@mixin action-bar {
& {
height: 32px;
}
& > .link.link > a {
display: inline-block;
height: 32px;
line-height: 32px;
vertical-align: top;
width: auto;
}
& > li {
margin: 0;
padding: 0;
list-style-type: none;
}
& > li > a,
& > li > a:visited {
color: $base-mute;
text-decoration: none;
}
& > li > a:hover,
& > li > a:focus {
color: $base-a;
& > .text {
color: $base-a;
}
}
& > li > a > .text {
@include font-size(-1);
display: none;
}
& > li > a > .text.-visible {
display: inline;
}
}
.page-actions {
& {
@include action-bar;
margin: 0;
padding: 0;
}
& + & {
margin-left: 8px;
}
& > .facebook > a::before,
& > .twitter > a::before,
& > .github > a::before {
content: '';
vertical-align: middle;
}
& > .facebook > a::before {
@include ion-logo-facebook(16px, #334455);
}
& > .twitter > a::before {
@include ion-logo-twitter(16px, #334455);
}
& > .github > a::before {
@include ion-logo-github(16px, #334455);
}
& > .github > a:hover::before {
background-image: ion-logo-github-image(white);
}
& > .facebook > a::before,
& > .twitter > a::before {
width: 32px;
height: 32px;
}
// Compensate alignment
& > .github > a::before {
position: relative;
top: -2px;
}
& > .link.-button > a {
box-shadow: inset 0 0 0 1px $dark-line-color;
border-radius: 2px;
padding: 0 16px;
margin: 0 8px;
transition: all 100ms linear;
& > .text {
margin-left: 4px;
position: relative;
top: -1px;
}
&:hover,
&:focus {
background: $base-a-gradient;
box-shadow: $shadow2;
&,
& > .text {
color: white;
}
}
}
// Space them out in mobile
@media (max-width: 768px) {
& > .link {
margin-left: 16px;
}
}
// Collapse
& > .link:first-child > a {
margin-left: 0;
}
& > .link:last-child > a {
margin-right: 0;
}
}