-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtricks.css
49 lines (42 loc) · 986 Bytes
/
tricks.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
39
40
41
42
43
44
45
46
47
48
49
/*Attribute targeting*/
/* target all zip files, case insensitive*/
a[href$=".zip" i] { }
/* make google.com links red*/
[href*="google.com"] { color: red; }
/*Multiple backgrounds*/
background: url(example1.png’) no-repeat center 50px, url(‘example2.jpg’) no-repeat bottom top;
/*Styling of the url hash (/#foo) targeted elements*/
/*<a href=”#foo”>Go to Foo</a>*/
#foo:target { color: red; }
/*Open and close quote-marks*/
q:before {
content: open-quote;
}
q:after {
content: close-quote;
}
html[lang=”fr”] q {
Quotes: “«” “»”;
}
/*@supports for checking browser support*/
@supports (display: flex) {
div {
display: flex;
}
}
li + li {
margin-top: 1rem;
}
// vs
li {
margin-bottom: 1rem;
}
li:last-of-type {
margin-bottom: 0;
}
/*Truncate text with an ellipsis “…” ending*/
p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}