/
_icon.scss
108 lines (91 loc) · 2.25 KB
/
_icon.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
* wet-boew.github.io/wet-boew/License-eng.txt / wet-boew.github.io/wet-boew/Licence-fra.txt
*/
@import "compass/css3/inline-block";
@import "compass/utilities/sprites";
//Inline the sprite if not outputing for IE8
$wb-icon-inline: not $legacy-support-for-ie8;
@import "wb-icon/*.png";
@include all-wb-icon-sprites;
[class*="wb-icon-"] {
width: 16px;
height: 16px;
margin-right: 4px;
@include inline-block(text-top);
}
[href^='mailto:'] {
background: {
image: url(../images/wb-icon/mail.png);
repeat: no-repeat;
}
padding-left: 19px;
}
%grids-icon-download-icon {
background: {
image: url(../images/wb-icon/drive-download.png);
repeat: no-repeat;
}
padding-left: 19px;
}
@each $downloadable-file-type in psd, zip, egret, doc, pdf, xls, rtf, pot, ppt, pps, pptm, docx, xlsx, pptx, pub {
[href$='.#{$downloadable-file-type}'] {
@extend %grids-icon-download-icon;
}
}
// Adds icon to all external links that are outside the header or footer
[rel="external"] {
background: url(../images/wb-icon/external.png) 100% 0 no-repeat;
//gh-2104 fixes overriding background because of increased specificity when wb-main was used
#wb-head &, #wb-foot & {
background: inherit;
}
#wb-main & {
padding-right: 20px;
padding-left: 0;
&.wb-icon-none {
padding-right: 0;
}
}
}
.wb-icon-none {
background-image: none;
padding-left: 0;
display: inline;
margin-right: 0;
}
/* Right to left (RTL) CSS */
[dir="rtl"] {
[class*="wb-icon-"] {
background-position: top right;
}
[href^='mailto:'] {
background-position: 100% 0;
padding-left: 0;
padding-right: 19px;
}
[href$='.psd'], [href$='.zip'], [href$='.doc'], [href$='.pdf'], [href$='.xls'], [href$='.rtf'], [href$='.pot'], [href$='.ppt'], [href$='.pps'], [href$='.pptm'], [href$='.docx'], [href$='.xlsx'], [href$='.pptx'] {
background-position: 100% 0;
padding-left: 0;
padding-right: 19px;
}
[class*=wb-icon-] {
margin-right: auto;
margin-left: 4px;
}
.wb-icon-none {
padding-right: 0;
margin-right: auto;
margin-left: 0;
}
#wb-main {
[rel="external"] {
background-position: left 0;
padding-left: 20px;
padding-right: 0;
&.wb-icon-none {
padding-left: 0;
}
}
}
}