summaryrefslogtreecommitdiff
path: root/xstatic/pkg/roboto_fontface/data/css/roboto-fontface.less
blob: ad8be20543ff57a58d57d4ee3ca9a5d1ba68bc7a (plain)
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
@roboto-font-path: '../fonts';

.roboto-font(@type, @weight, @style) {
    @font-face {
        font-family: 'Roboto';
        src: url('@{roboto-font-path}/Roboto-@{type}.eot');
        src: url('@{roboto-font-path}/Roboto-@{type}.eot?#iefix') format('embedded-opentype'),
             url('@{roboto-font-path}/Roboto-@{type}.woff2') format('woff2'),
             url('@{roboto-font-path}/Roboto-@{type}.woff') format('woff'),
             url('@{roboto-font-path}/Roboto-@{type}.ttf') format('truetype'),
             url('@{roboto-font-path}/Roboto-@{type}.svg#Roboto') format('svg');
        font-weight: @weight;
        font-style: @style;
    }

    @font-face {
        font-family: 'Roboto-@{type}';
        src: url('@{roboto-font-path}/Roboto-@{type}.eot');
        src: url('@{roboto-font-path}/Roboto-@{type}.eot?#iefix') format('embedded-opentype'),
             url('@{roboto-font-path}/Roboto-@{type}.woff2') format('woff2'),
             url('@{roboto-font-path}/Roboto-@{type}.woff') format('woff'),
             url('@{roboto-font-path}/Roboto-@{type}.ttf') format('truetype'),
             url('@{roboto-font-path}/Roboto-@{type}.svg#Roboto') format('svg');
    }
}

.roboto-font-pair(@type, @weight) {
    .roboto-font('@{type}', @weight, normal);
    .roboto-font('@{type}Italic', @weight, italic);
}

.roboto-font-pair('Thin', 100);
.roboto-font-pair('Light', 300);
.roboto-font-pair('Regular', 400);
.roboto-font-pair('Medium', 500);
.roboto-font-pair('Bold', 700);
.roboto-font-pair('Black', 900);