-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.scss
47 lines (40 loc) · 1.2 KB
/
example.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
// Set output types
$output_px: true;
$output_rem: true;
// Set global font size
$global_font_size: 16px;
// Import functions and mixins
@import 'remedy';
// Using function
.using-function {
margin: r(20px auto);
font-size: r(28pt);
border-top: r(7px) solid #f90 !important;
background: r(#fff url('../img/icon.png') 15px 10px no-repeat);
background-size: r(44px auto, 50% 312px);
}
// Using mixin
.using-mixin {
@include remedy(margin, 20px auto);
@include remedy(font-size, 28pt);
@include remedy(border-top, 7px solid #f90 !important);
@include remedy(background, #fff url('../img/icon.png') 15px 10px no-repeat);
@include remedy(background-size, 44px auto, 50% 312px);
// Combine multiple properties
@include remedy((
margin: 20px auto,
border-top: 7px solid #f90 !important,
background-size: (44px auto, 50% 312px),
));
// Automatic rounding where appropriate
@include remedy((
margin: 20.2px auto, // Automatically rounded
font-size: 28.2pt, // Not rounded
));
}
// Explicitly round px before converting to rem
.rounded {
@include remedy_round(margin, 20.3px 8.6px);
padding-left: remedy_round(calc(13px / 3));
border-width: rr(15px * 0.7); // Shortcut!
}