-
Notifications
You must be signed in to change notification settings - Fork 0
/
sassy.sass
72 lines (57 loc) · 1.46 KB
/
sassy.sass
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
// Sassy
// Micro mixin library that I frequently use
// --------------------------------------------------
// Shortcut for easy enabling/disabling of font-smoothing
// @param : $on : toggles font-smoothing
@mixin font-smoothing($value: on)
@if $value == on
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
@else
-webkit-font-smoothing: subpixel-antialiased
-moz-osx-font-smoothing: auto
// Styling of text selection
@mixin selection
::-moz-selection
@content
::selection
@content
// Nicer paragraphs with hyphenation
@mixin word-wrap
word-break: break-word
-webkit-hyphens: auto
-moz-hyphens: auto
hyphens: auto
// Use pseudo element as font-awesome icon
@mixin font-awesome($charcode, $vertical-align: middle)
&:before
display: inline-block
font-family: "FontAwesome"
font-style: normal
font-weight: normal
line-height: 1
content: $charcode
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
vertical-align: $vertical-align
// Apply ‘attention’ styles in one go.
@mixin attention($self: false)
@if $self != false
&,
&:hover,
&:active,
&:focus
@content
@else
&:hover,
&:active,
&:focus
@content
// Create all specified heading styles in one go.
@mixin headings($from: 1, $to: 6)
%base-heading
@content
@if $from >= 1 and $to <= 6
@for $i from $from through $to
h#{$i}
@extend %base-heading