File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
22
33import ScopedSelectors from './ScopedSelectors/ScopedSelectors' ;
4+ import GlobalSelectors from './GlobalSelectors/GlobalSelectors' ;
45import ClassInheritance from './ClassInheritance/ClassInheritance' ;
56import InheritanceOverrides from './InheritanceOverrides/InheritanceOverrides' ;
67import ScopedAnimations from './ScopedAnimations/ScopedAnimations' ;
@@ -34,6 +35,11 @@ export default class App extends Component {
3435 < p > The animation's keyframes are private to the animations module, only exposed publicly via a class which this component inherits from.</ p >
3536 < ScopedAnimations />
3637
38+ < h2 > Global Selectors</ h2 >
39+ < p > Although they should be used as sparingly as possible, < strong > global selectors are still available when required.</ strong > </ p >
40+ < p > The following component styles all < strong > <p></ strong > tags nested inside it.</ p >
41+ < GlobalSelectors />
42+
3743 </ div >
3844 ) ;
3945 }
Original file line number Diff line number Diff line change 1+ .root {
2+ border-width : 2px ;
3+ border-style : solid;
4+ border-color : brown;
5+ padding : 0 20px ;
6+ margin : 0 6px ;
7+ max-width : 400px ;
8+ }
9+
10+ .root : global p {
11+ color : brown;
12+ font-size : 24px ;
13+ font-family : helvetica, arial, sans-serif;
14+ font-weight : 600 ;
15+ }
Original file line number Diff line number Diff line change 1+ import styles from './GlobalSelectors.css' ;
2+
3+ import React , { Component } from 'react' ;
4+
5+ export default class GlobalSelectors extends Component {
6+
7+ render ( ) {
8+ return (
9+ < div className = { styles . root } >
10+ < p > Global Selectors</ p >
11+ </ div >
12+ ) ;
13+ }
14+
15+ } ;
You can’t perform that action at this time.
0 commit comments