-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpermalink.css
38 lines (35 loc) · 1.09 KB
/
permalink.css
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
/* PERMALINK MARKERS */
/* Style permalink markers in headers. h2-h6 headers. The HTML is assumed to
* look like:
*
* <h2 id="hello">Hello, CSS! <a href="#hello"></a></h1>
*
* Note the space between the </a> and text matters, otherwise it will look bad
* in text browsers.
*/
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
font-size: .7em; /* Doesn't need to be so large. */
line-height: 0; /* Don't affect line-height of header. */
color: #999; /* Use subdued colour, don't need to stand out too much. */
}
h1 a:after, h2 a:after, h3 a:after, h4 a:after, h5 a:after, h6 a:after {
content: "¶"; /* So it won't get copy/pasted. */
/* Alternative:
content: "🔗";
content: "§";
content: "[link]";
*/
}
/* Alternative: put it before the element, in the page margin. Not done for h1
* as that's centre-aligned by default, so it looks weird. */
/*
h2, h3, h4, h5, h6 {
position: relative;
}
h2 a, h3 a, h4 a, h5 a, h6 a {
position: absolute;
left: -1em;
font-size: .8em;
line-height: 1.6em;
}
*/