Skip to content

Commit e58aae7

Browse files
committed
Rename class inheritance to class composition
1 parent 4d2b17f commit e58aae7

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed
File renamed without changes.

src/components/3-ClassInheritance/StyleVariantA/StyleVariantA.css renamed to src/components/3-ClassComposition/StyleVariantA/StyleVariantA.css

File renamed without changes.

src/components/3-ClassInheritance/StyleVariantA/StyleVariantA.js renamed to src/components/3-ClassComposition/StyleVariantA/StyleVariantA.js

File renamed without changes.

src/components/3-ClassInheritance/StyleVariantB/StyleVariantB.css renamed to src/components/3-ClassComposition/StyleVariantB/StyleVariantB.css

File renamed without changes.

src/components/3-ClassInheritance/StyleVariantB/StyleVariantB.js renamed to src/components/3-ClassComposition/StyleVariantB/StyleVariantB.js

File renamed without changes.

src/components/4-InheritanceOverrides/InheritanceOverrides.css renamed to src/components/4-CompositionOverrides/CompositionOverrides.css

File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var styles = require('./CompositionOverrides.css');
2+
require('insert-css')(styles);
3+
4+
var h = require('hyperscript');
5+
6+
module.exports = h('div', { className: styles.root },
7+
h('p', { className: styles.text }, 'Class Composition with Overrides')
8+
);

src/components/4-InheritanceOverrides/InheritanceOverrides.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/components/App.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ var h = require('hyperscript');
55

66
var ScopedSelectors = require('./1-ScopedSelectors/ScopedSelectors');
77
var GlobalSelectors = require('./2-GlobalSelectors/GlobalSelectors');
8-
var ClassInheritance = require('./3-ClassInheritance/ClassInheritance');
9-
var InheritanceOverrides = require('./4-InheritanceOverrides/InheritanceOverrides');
8+
var ClassComposition = require('./3-ClassComposition/ClassComposition');
9+
var CompositionOverrides = require('./4-CompositionOverrides/CompositionOverrides');
1010
var ScopedAnimations = require('./5-ScopedAnimations/ScopedAnimations');
1111

1212
module.exports = h('div', { className: styles.app }, [
@@ -46,31 +46,31 @@ module.exports = h('div', { className: styles.app }, [
4646

4747
h('hr', { className: styles.hr }),
4848

49-
h('h2', { className: styles.incomplete }, 'Class Inheritance (INCOMPLETE)'),
49+
h('h2', { className: styles.incomplete }, 'Class Composition (INCOMPLETE)'),
5050
h('p', [
5151
'Both of the components below have ',
5252
h('strong', 'locally scoped CSS'),
5353
' that ',
54-
h('strong', 'inherits from a common set of CSS Modules.')
54+
h('strong', 'composes a common set of CSS Modules.')
5555
]),
5656
h('p', [
5757
'Since ',
58-
h('strong', 'CSS Modules can be composed'),
58+
h('strong', 'identifiers from CSS Modules can be composed'),
5959
', the resulting markup is optimised by ',
6060
h('b', 'reusing classes between components.')
6161
]),
62-
ClassInheritance,
62+
ClassComposition,
6363

6464
h('hr', { className: styles.hr }),
6565

66-
h('h2', { className: styles.incomplete }, 'Inheritance Overrides (INCOMPLETE)'),
66+
h('h2', { className: styles.incomplete }, 'Composition Overrides (INCOMPLETE)'),
6767
h('p', [
68-
'When extending classes, ',
69-
h('strong', 'inherited style properties can be overridden'),
68+
'When composing classes, ',
69+
h('strong', ' style properties can be overridden'),
7070
' as you\'d expect.'
7171
]),
72-
h('p', 'The following component extends two different classes, but provides overrides which then take precedence.'),
73-
InheritanceOverrides,
72+
h('p', 'The following component composes two different classes, but provides overrides which then take precedence.'),
73+
CompositionOverrides,
7474

7575
h('hr', { className: styles.hr }),
7676

0 commit comments

Comments
 (0)