mirror of
https://github.com/TheTaz25/denis.ergin.git
synced 2025-07-08 07:38:46 +00:00
fix(slides): various style fixes + additional examples for nth-child
This commit is contained in:
parent
0b054ba49d
commit
bd5253f71e
4 changed files with 49 additions and 10 deletions
|
@ -61,6 +61,11 @@
|
||||||
<p class="base-border-wo-style border-dotted">
|
<p class="base-border-wo-style border-dotted">
|
||||||
style: <code>dotted</code>
|
style: <code>dotted</code>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<div class="apply-styles two">
|
||||||
<p class="base-border-wo-style border-inset">
|
<p class="base-border-wo-style border-inset">
|
||||||
style: <code>inset</code>
|
style: <code>inset</code>
|
||||||
</p>
|
</p>
|
||||||
|
@ -189,7 +194,7 @@
|
||||||
<li>border-start-start-radius -> oben links</li>
|
<li>border-start-start-radius -> oben links</li>
|
||||||
<li>border-start-end-radius -> oben rechts</li>
|
<li>border-start-end-radius -> oben rechts</li>
|
||||||
<li>border-end-start-radius -> unten links</li>
|
<li>border-end-start-radius -> unten links</li>
|
||||||
<li>border-end-start-radius -> unten rechts</li>
|
<li>border-end-end-radius -> unten rechts</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<section>
|
<section>
|
||||||
<pre class="css"><code data-trim data-line-numbers is:raw>
|
<pre class="css"><code data-trim data-line-numbers is:raw>
|
||||||
.line-height {
|
.line-height {
|
||||||
line-height: 2rem;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<div class="apply-styles one">
|
<div class="apply-styles one">
|
||||||
|
|
|
@ -139,6 +139,24 @@ import MediaQueries from './media-queries.astro';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container.nth {
|
||||||
|
&.nth-2n .child:nth-child(2n) {
|
||||||
|
background-color: rgb(126, 154, 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.nth-2n\+1 .child:nth-child(2n+1) {
|
||||||
|
background-color: rgb(126, 154, 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.nth-n\+4 .child:nth-child(n+4) {
|
||||||
|
background-color: rgb(126, 154, 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.nth--n\+3 .child:nth-child(-n+3) {
|
||||||
|
background-color: rgba(126, 154, 240);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.not {
|
&.not {
|
||||||
p:not(.important) {
|
p:not(.important) {
|
||||||
background-color: #282;
|
background-color: #282;
|
||||||
|
|
|
@ -162,16 +162,33 @@ import NthBox from "./nth-box.astro"
|
||||||
<p><code>An+B</code>, dabei ist <code>n</code> "gedanklich" eine natürliche Zahl</p>
|
<p><code>An+B</code>, dabei ist <code>n</code> "gedanklich" eine natürliche Zahl</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section class="apply-styles pseudo">
|
||||||
<p>Beispiele:</p>
|
<p>Beispiele:</p>
|
||||||
<hr>
|
|
||||||
<p><code>:nth-child(2n)</code> <br>- Selektiert jedes 2. Element (even)</p>
|
<p><code>:nth-child(2n)</code> <br>- Selektiert jedes 2. Element (even)</p>
|
||||||
<hr>
|
<div class="container nth nth-2n">
|
||||||
|
<NthBox amount={5} />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="apply-styles pseudo">
|
||||||
<p><code>:nth-child(2n + 1)</code> <br>- Selektiert jedes 2. Element, beginnend ab dem 1. Element (odd)</p>
|
<p><code>:nth-child(2n + 1)</code> <br>- Selektiert jedes 2. Element, beginnend ab dem 1. Element (odd)</p>
|
||||||
<hr>
|
<div class="container nth nth-2n+1">
|
||||||
<p><code>(n+7)</code> <br>- Selektiert das 7. und alle darauffolgenden Elemente</p>
|
<NthBox amount={5} />
|
||||||
<hr>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="apply-styles pseudo">
|
||||||
|
<p><code>(n+7)</code> <br>- Selektiert das 4. und alle darauffolgenden Elemente</p>
|
||||||
|
<div class="container nth nth-n+4">
|
||||||
|
<NthBox amount={5} />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="apply-styles pseudo">
|
||||||
<p><code>(-n+3)</code> <br>- Selektiert die ersten drei Elemente</p>
|
<p><code>(-n+3)</code> <br>- Selektiert die ersten drei Elemente</p>
|
||||||
|
<div class="container nth nth--n+3">
|
||||||
|
<NthBox amount={5} />
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
@ -447,13 +464,12 @@ import NthBox from "./nth-box.astro"
|
||||||
<section>
|
<section>
|
||||||
<pre class="css"><code data-trim data-line-numbers is:raw>
|
<pre class="css"><code data-trim data-line-numbers is:raw>
|
||||||
p:where(.test) {
|
p:where(.test) {
|
||||||
background-color: black;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
background-color: #002;
|
background-color: #002;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue