compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss

38 lines
1.2 KiB
SCSS

@mixin no-link-icon {
background: transparent none !important;
padding: 0 !important;
margin: 0 !important;
}
@mixin link-icon-base {
padding: 2px 22px 2px 0;
margin: -2px 0;
background-repeat: no-repeat;
background-position: right center;
}
@mixin link-icon($name, $include-base: true) {
@if $include-base { @include link-icon-base; }
background-image: image-url("link_icons/#{$name}"); }
@mixin link-icons {
a[href^="http:"],
a[href^="mailto:"],
a[href^="http:"]:visited,
a[href$=".pdf"],
a[href$=".doc"],
a[href$=".xls"],
a[href$=".rss"],
a[href$=".rdf"],
a[href^="aim:"] { @include link-icon-base; }
a[href^="http:"] { @include link-icon("external.png", false); }
a[href^="mailto:"] { @include link-icon("email.png", false); }
a[href^="http:"]:visited { @include link-icon("visited.png", false); }
a[href$=".pdf"] { @include link-icon("pdf.png", false); }
a[href$=".doc"] { @include link-icon("doc.png", false); }
a[href$=".xls"] { @include link-icon("xls.png", false); }
a[href$=".rss"],
a[href$=".rdf"] { @include link-icon("feed.png", false); }
a[href^="aim:"] { @include link-icon("im.png", false); }
}