Skip to content

Instantly share code, notes, and snippets.

@rzahner
Last active December 26, 2015 10:28
Show Gist options
  • Save rzahner/7136540 to your computer and use it in GitHub Desktop.
Save rzahner/7136540 to your computer and use it in GitHub Desktop.
Beispiel zur Verschachtelung von HTML Web Professional - CSS Vertiefung
<dic class="error">
<h1>Fehlermeldung</h1>
<p>
<a href="#irgendwo">Link</a> normaler Text
</p>
</dic>
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$message-color: red;
.error {
color: $message-color;
border: 1px solid $message-color;
> h1 {
border-bottom: 1px solid $message-color;
}
span.special, a {
color: darken($message-color, 25%);
&:hover {
color: lighten($message-color, 20);
}
}
}
.error {
color: red;
border: 1px solid red;
}
.error > h1 {
border-bottom: 1px solid red;
}
.error span.special, .error a {
color: maroon;
}
.error span.special:hover, .error a:hover {
color: #ff6666;
}
<dic class="error">
<h1>Fehlermeldung</h1>
<p>
<a href="#irgendwo">Link</a> normaler Text
</p>
</dic>
@iberti
Copy link

iberti commented Nov 3, 2013

Hallo Reto

Im Code hat sich ein Fehler eingeschlichen:

anstelle von

Fehlermeldung

Link normaler Text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment