File tree 1 file changed +10
-22
lines changed
1 file changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -17,35 +17,39 @@ export default class Hello extends React.Component {
17
17
18
18
/* css constructor */
19
19
@css`
20
+ /* π Isolated and co-located */
21
+
22
+ /* π Supports the entirety of CSS */
20
23
font-size: 16px;
21
24
text-align: center;
22
25
23
- /* Use props in your CSS */
26
+ /* π₯ Use props in css */
24
27
color: {this.props.color};
25
28
26
- /* Adds vendor prefixes */
29
+ /* π» Built in vendor prefixing */
27
30
display: flex;
28
31
29
- /* Pseudo selectors */
32
+ /* π Pseudo selectors */
30
33
&:hover {
31
34
color: #FFF;
32
35
}
33
36
34
- /* Nested elements */
37
+ /* πͺ Nested css */
35
38
img {
36
39
border-radius: 50%;
37
40
}
38
41
#handle {
39
42
margin-top: 20px;
40
43
}
41
44
42
- /* Media queries */
45
+ /* π± Media queries support */
43
46
@media (max-width: 600px) {
44
47
& {font-size: 18px;}
45
48
}
46
49
`
47
50
48
51
render () {
52
+ /* πΌ Attaches styles to the highest element in your component */
49
53
return (< div>
50
54
< img src= " https://github.com/siddharthkp.png" / >
51
55
< div id= " handle" > @siddharthkp< / div>
@@ -59,26 +63,10 @@ export default class Hello extends React.Component {
59
63
60
64
--
61
65
62
- ** Features:**
63
-
64
- π Supports the entirety of CSS
65
-
66
- π₯ Use props in css
67
-
68
- πΌ Attaches styles to the highest element in your component
66
+ ** Other features**
69
67
70
68
π Uses classes instead of inline styles
71
69
72
- π Isolated and co-located
73
-
74
- π pseudo selectors
75
-
76
- π± media queries support
77
-
78
- πͺ nested css
79
-
80
- π» built in vendor prefixes
81
-
82
70
π§ Editable in developer tools
83
71
84
72
πΆ Super tiny: only 1.2K gzipped!
You canβt perform that action at this time.
0 commit comments