-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Subclasser apis | ||
|
||
In order to make it easy for Subclassers to extend our components, we follow a certain set | ||
of best practices naming conventions to make our code predictable. | ||
|
||
## Templates | ||
|
||
### Template naming conventions | ||
|
||
For template, we have the naming convention that every overridable template starts with an | ||
underscore and ends with | ||
|
||
### Seperation of concerns | ||
|
||
Our components should make it possible to override markup and styling, without having to redefine | ||
functionality. | ||
By using the spread directive, we can achieve this. For more info, see: | ||
[https://github.com/ing-bank/lion/issues/591](explanation). | ||
|
||
## Node references | ||
|
||
As a Subclasser, you sometimes need access to a protected node inside the shadow dom. | ||
Most functional nodes have their own getters. A Subclasser can acces those in his extension and | ||
in some cases, override these getters. | ||
|
||
### Node naming conventions | ||
|
||
A node reference will have an underscore prefix and always ends with `Node`. | ||
Examples are `_inputNode` and `_formNode`. |