-
Notifications
You must be signed in to change notification settings - Fork 1
Vorschlag für ein anderes Modifier-Konzept #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -94,12 +94,15 @@ Varianten und Status einer Komponente werden mit Modifier abgebildet. Sie treten | |
|
||
#### Beispiele | ||
|
||
`.button.primary`, `.text-link.unobtrusive`, `.product-list--entry.sold-out`, `.button.primary.disabled` | ||
* `.button.is-primary`, `.text-link.is-unobtrusive`, `.product-list--entry.is-sold-out`, `.button.primary.is-disabled`, | ||
* `.navigation.has-submenu`, `.button.has-addon` | ||
|
||
#### Eigenschaften des Namens | ||
|
||
* beschreibt einen Zustand oder besonderes Verhalten einer Komponenteninstanz, wodurch eine Variante entsteht | ||
* ist idealerweise ein einfaches Adjektiv | ||
* wenn sich der Modifier auf den Zustand oder das Verhalten einer Komponenteninstanz bezieht, benutzt man das `is`-Prefix und ein einfaches Adjektiv | ||
* falls eine Komponenteninstanz sich auf einen Bestandteil der Komponenteninstanz bezieht, benutzt man das `has`-Prefix und ein einfaches Nomen | ||
* die Prefixe werden benötigt, damit ein Modifier einfach identifiziert werden kann und Zustände abgebildet werden können, für die Adjektive nicht ausreichend sind | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Beispiele machen es klarer. Es gibt noch gar kein Beispiel für has. |
||
* steht nie alleine, sondern ist nur in Verbindung mit der Komponente eindeutig ([Warum?](https://github.com/zweitag/html-css-guidelines/pull/2#discussion_r123475470)) | ||
|
||
### Block, Element, Modifier (BEM) | ||
|
@@ -130,7 +133,7 @@ Die Syntax von BEM finden wir jedoch etwas sperrig und haben uns für ein andere | |
<pre lang="haml"> | ||
%ul.fact-list | ||
%li.fact-list--entry | ||
%li.fact-list--entry.highlighted | ||
%li.fact-list--entry.is-highlighted | ||
</pre> | ||
</td> | ||
</tr> | ||
|
@@ -151,7 +154,7 @@ Die Syntax von BEM finden wir jedoch etwas sperrig und haben uns für ein andere | |
list-style-type: disc | ||
.fact-list--entry | ||
line-height: 1.2 | ||
&.highlighted | ||
&.is-highlighted | ||
font-weight: 700 | ||
</pre> | ||
</td> | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das stimmt ja jetzt nur noch halb. Bitte definieren, wann is (Adjektiv) und wann has (Nomen)