<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
  
  <title>maddesigns</title>
  <subtitle>Moderne Webentwicklung – HTML, CSS, JavaScript &amp; Responsive Webdesign</subtitle>
  <link href="https://maddesigns.de/feed.xml" rel="self" />
  <link href="https://maddesigns.de/" />
  <updated>2017-03-14T11:59:07Z</updated>
  <id>https://maddesigns.de/</id>
  <author>
    <name>Sven Wolfermann (maddesigns)</name>
  </author>
  <entry>
    <title>Native CSS Grid Layouts ohne Framework – ein einfaches Beispiel</title>
    <link href="https://maddesigns.de/archiv/css-grid-layout-2764.html" />
    <updated>2017-03-14T11:59:07Z</updated>
    <id>https://maddesigns.de/archiv/css-grid-layout-2764.html</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;Für die Ausgabe 48 des &lt;a href=&quot;https://t3n.de/magazin/&quot;&gt;t3n Magazin&lt;/a&gt; habe ich einen Artikel über CSS Grids geschrieben… hier ein kleiner Ausschnitt daraus.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Eine neue &lt;a href=&quot;https://www.w3.org/TR/css-grid-1/&quot;&gt;CSS Grid Layout Spezifikation&lt;/a&gt; gibt Webworkern nun die Möglichkeit eigene Grids nach den jeweiligen Anforderungen selbst zu definieren. Das ist nicht nur für Seitenlayouts, sondern auch für Modul-Layouts sehr nützlich. Aber zugegeben sind auch sehr viele neue Eigenschaften zu lernen, 17 neue Eigenschaften in Summe.&lt;/p&gt;
&lt;p&gt;Nun wird sich der ein oder andere Entwickler fragen: „ok, aber was ist jetzt der Unterschied zu Flexbox“? Einige Entwickler nutzen bereits Flexbox anstatt „Floats“ als CSS-Technik für Grid-Layouts.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Wenn man Layouts wie gewohnt in 12 Spalten aufbaut und diesen Aufbau nicht verändert, sondern nur die unterliegende CSS-Technik, dann klingt das auch erstmal logisch und einfach Flexbox zu verwenden. Deshalb nutzt &lt;a href=&quot;https://v4-alpha.getbootstrap.com/layout/grid/&quot;&gt;Bootstrap ab Version 4 auch Flexbox-Grids&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Was ist nun der Unterschied zwischen Flexbox und CSS Grids?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;CSS Grids sind zweidimensional, Flexbox ist eindimensional. Flexbox-Grids sind bildlich gesprochen nur 1-zeilig (&lt;code&gt;flex-wrap: wrap&lt;/code&gt; mal ignoriert), also Zelle für Zelle auf einer Zeile ohne Umbruch. Ein CSS Grid-Layout kann man über mehrere „Zeilen“ aufbauen. Man stelle sich vor, dass man ein einfaches Seitenlayout hat. Dort ist eine Spaltigkeit für header und footer festgelegt – dies kann man natürlich auch mit Flexbox abbilden, aber die Zellen haben untereinander keine Verbindung. Mit einem CSS Grid-Layout ist das anders, dort gibt es ein sogenanntes Grid-Template, das für den Bereich gilt.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://maddesigns.de/img/2017/03/grid-vs-flexbox.svg&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; alt=&quot;flexbox vs. grid&quot; width=&quot;1668&quot; height=&quot;737&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aber vielleicht mal ein einfaches Beispiel als Einstieg: ein 3-spaltiges „Komponenten-Layout“. Hier das visuelle Ergebnis, was wir mit CSS Grids aufbauen möchten:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/4ma52HDGcC-750.avif 750w, https://maddesigns.de/img/4ma52HDGcC-1500.avif 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/4ma52HDGcC-750.webp 750w, https://maddesigns.de/img/4ma52HDGcC-1500.webp 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/4ma52HDGcC-750.png&quot; alt=&quot;grid-example-e&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1500&quot; height=&quot;527&quot; srcset=&quot;https://maddesigns.de/img/4ma52HDGcC-750.png 750w, https://maddesigns.de/img/4ma52HDGcC-1500.png 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein Komponentencontainer (.wrapper) und 4 Inhaltscontainer (.box)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;div class=&amp;quot;wrapper&amp;quot;&amp;gt;
	&amp;lt;div class=&amp;quot;box a&amp;quot;&amp;gt;.a&amp;lt;/div&amp;gt;
	&amp;lt;div class=&amp;quot;box b&amp;quot;&amp;gt;.b&amp;lt;/div&amp;gt;
	&amp;lt;div class=&amp;quot;box c&amp;quot;&amp;gt;.c&amp;lt;/div&amp;gt;
	&amp;lt;div class=&amp;quot;box d&amp;quot;&amp;gt;.d&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Für diese Komponente fügen wir nun ein Grid-Layout hinzu.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein neuer Wert für die CSS-Display-Eigenschaft &lt;code&gt;grid&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* grid layout, 3 columns */
.wrapper {
	display: grid; /* display: inline-grid;*/
	grid-template-columns: 1fr 1fr 1fr; /* 3 x 1 fraction */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;display: grid&lt;/code&gt; ist wie &lt;code&gt;display: flex&lt;/code&gt; ein neuer Wert für die Display-Eigenschaft des Container-Elements. Alle direkten Kinder werden dann zu Grid-Elementen. Zu den neuen Layout-Eigenschaften bringt CSS Grids auch eine neue Maßeinheit mit. Gridgrößen können natürlich auch weiterhin mit allen vorhanden Maßeinheiten erstellt werden. Sowohl Prozent-, als auch Pixelwerte, als auch weitere Breiteneinheiten sind möglich. Grid-Zellengrößen können nun in ‚fr‘ (fraction) angegeben werden. Als Beispiel können drei gleich breite Spalten mit &lt;code&gt;grid-template-columns: 1fr 1fr 1fr;&lt;/code&gt; erstellt werden. Ein 2-spaltiges Grid mit einer großen Haupt- und einer Marginalspalte im Verhältnis 2:1 erstellt man wie folgt: &lt;code&gt;grid-template-columns: 2fr 1fr;&lt;/code&gt; – &lt;code&gt;1fr&lt;/code&gt; bedeutet 1 Teil, &lt;code&gt;2fr&lt;/code&gt; bedeutet 2 Teile der Gesamtbreite. Je Spalte wird je ein Wert getrennt mit Leerzeichen geschrieben. Für das letzte Beispiel könnte man auch &lt;code&gt;grid-template-columns: 66.667% 33.334%;&lt;/code&gt; schreiben.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12 gleich breite Spalten, das klassische 12-spaltiges Layout?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Der Aufbau geht natürlich auch mit 12 gleichen Werten, aber der Einfachheit halber gibt es die &lt;code&gt;repeat()&lt;/code&gt;-Funktion: &lt;code&gt;grid-template-columns: repeat(12, 1fr);&lt;/code&gt; – 12 gleiche Spalten, quasi je 1/12 Spaltenbreite. Für zeilenweise Grids gibt es das Pendant &lt;code&gt;grid-template-rows&lt;/code&gt;. Möchte man z.B., dass der Seitenheader und der -footer eine bestimmte Höhe haben, der Inhalt dazwischen aber flexibel ist, kann man &lt;code&gt;auto&lt;/code&gt; als Höhe für den Hauptinhalt angeben, Beispiel: &lt;code&gt;grid-template-rows: 10em auto 10em;&lt;/code&gt;, Seitenheader und -footer sind hier genau &lt;code&gt;10em&lt;/code&gt; hoch. Für unser Beispiel von oben machen wir für die Grid-Zeilen keine Größenvorgaben, dann sind die Gridzellen, wie bei Flexbox, alle gleich hoch und zwar so groß wie die größte Zelle der gesamten Zeile.&lt;/p&gt;
&lt;h2 id=&quot;positionierung-im-css-grid&quot;&gt;Positionierung im CSS-Grid&lt;a class=&quot;header-anchor&quot; href=&quot;#positionierung-im-css-grid&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Historisch bedingt gibt es ähnlich wie bei Flexbox unterschiedliche Schreibweisen um Position und Größe einer Grid-Zelle festzulegen. Die unterschiedlichen Schreibweisen können aber in allen Browsern verwendet werden. Folgende Schreibweisen ergeben alle die gleiche Positionierung:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.a {
	/* starts at col pos 1, spans 2 cols */
	grid-column: 1 / span 2;
	/* starts at row pos 1, spans 1 row */
	grid-row: 1 / span 1;
}

.a {
	grid-column-start: 1;
	grid-column-end: 3;
	grid-row-start: 1;
	grid-row-end: 2;
}

.a {
	/* grid-column-start: 1 / grid-column-end: 3 */
	grid-column: 1 / 3;
	/* grid-row-start: 1 / grid-row-end: 2 */
	grid-row: 1 / 2;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/5luPmR3Gnl-750.avif 750w, https://maddesigns.de/img/5luPmR3Gnl-1500.avif 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/5luPmR3Gnl-750.webp 750w, https://maddesigns.de/img/5luPmR3Gnl-1500.webp 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/5luPmR3Gnl-750.png&quot; alt=&quot;grid-example-c1&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1500&quot; height=&quot;857&quot; srcset=&quot;https://maddesigns.de/img/5luPmR3Gnl-750.png 750w, https://maddesigns.de/img/5luPmR3Gnl-1500.png 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Zwischenstand: Bereich &lt;code&gt;.a&lt;/code&gt; ist zwei Spalten groß, Bereich &lt;code&gt;.b&lt;/code&gt; rutscht automatisch in die nächste Spalte, &lt;code&gt;.c&lt;/code&gt; auf die nächste Zeile&lt;/p&gt;
&lt;p&gt;Die Eigenschaften &lt;code&gt;grid-column/-row&lt;/code&gt; sind für die Positionierung der Zellen im Grid zuständig, wobei &lt;code&gt;grid-column/-row&lt;/code&gt; die Kurzschreibweise für &lt;code&gt;grid-column-start/-end (grid-row-start/-end)&lt;/code&gt; ist. Bei dieser Schreibweise gibt man die Startposition und die Endposition der Zelle an. Die alternative Schreibweise ist, dass man die Startposition angibt und nicht die Endposition, sondern über wie viele Spalten sich die Grid-Zelle aufspannen soll. Die Angabe lautet dabei &lt;code&gt;span anzahl&lt;/code&gt;, also hier im Beispiel &lt;code&gt;span 2&lt;/code&gt;, zwei Spalten vom Grid-Layout nimmt die Gridzelle ein.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.a {
	grid-column: 1 / span 2;
	grid-row: 1 / span 1;
}
.b {
	grid-column: 3 / span 1;
	grid-row: 1 / span 2;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dies ist ebenso für das Überspannen von Zeilen möglich – &lt;code&gt;grid-row: 1 / span 2;&lt;/code&gt; – überspannt zwei Zeilen beginnend ab Zeile 1. Der Default-Fall ist, dass eine Zelle automatisch platziert wird und 1 Spalte breit ist, also in CSS-Code gesprochen: &lt;code&gt;grid-column: auto / span 1;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/Inn1U2J_3m-750.avif 750w, https://maddesigns.de/img/Inn1U2J_3m-1500.avif 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/Inn1U2J_3m-750.webp 750w, https://maddesigns.de/img/Inn1U2J_3m-1500.webp 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/Inn1U2J_3m-750.png&quot; alt=&quot;grid-example-h&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1500&quot; height=&quot;527&quot; srcset=&quot;https://maddesigns.de/img/Inn1U2J_3m-750.png 750w, https://maddesigns.de/img/Inn1U2J_3m-1500.png 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Die Postionen im Grid sind in den aktuellen Firefox Dev-Tools schön visualisiert. Die Endposition ist manchmal nicht so klar, manchmal hilft es, wenn man die Hand zur Hilfe nimmt, die Grid-Spalten sind immer die Zwischenräume zwischen den Finger. So beginnt das Grid dann immer mit dem ersten Finger (Pos. 1) und endet mit der letzten Position, bei einem 3-spaltigen Grid ist das die Position 4.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Für unser Layout brauchen wir im Grunde nur 5 Zeilen CSS:&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-gap: 12px;
}

.a {
	grid-column: auto / span 2;
}

.b {
	grid-row: auto / span 2;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Code-Beispiel (für Browser die Grids unterstützen ohne Fallback):&lt;/strong&gt;&lt;/p&gt;
&lt;code-demo title=&quot;CSS Grid by example – simple 3 column grid component layout&quot; height=&quot;400&quot;&gt;
&lt;template data-lang=&quot;html&quot;&gt;
&lt;div class=&quot;wrapper&quot;&gt;
  &lt;div class=&quot;box a&quot;&gt;.a&lt;/div&gt;
  &lt;div class=&quot;box b&quot;&gt;.b&lt;/div&gt;
  &lt;div class=&quot;box c&quot;&gt;.c&lt;/div&gt;
  &lt;div class=&quot;box d&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci repudiandae expedita cumque recusandae tempora incidunt, beatae impedit. Nobis maiores numquam libero iure cum quidem vero eius! Obcaecati, et. Reiciendis, vero.&lt;/div&gt;
&lt;/div&gt;
&lt;/template&gt;
&lt;template data-lang=&quot;css&quot;&gt;
.wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 12px;
}
&lt;p&gt;.a {
grid-column: auto / span 2;
}&lt;/p&gt;
&lt;p&gt;.b {
grid-row: auto / span 2;
}&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;full styles if we want to fix positioning&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;.a {
grid-column: 1 / span 2;
}
.b {
grid-column: 3;
grid-row: 1 / span 2;
}
.c {
grid-column: 1;
grid-row: 2;
}
.d {
grid-column: 2;
grid-row: 2;
}
*/&lt;/p&gt;
&lt;p&gt;/* demo &amp;amp; defaults */
.box {
font-family: sans-serif;
background-color: #444;
color: #fff;
padding: 1em;
}&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;{
box-sizing: border-box;
}&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;body {
margin: 2em;
}&lt;/p&gt;
  &lt;/template&gt;
&lt;/code-demo&gt;
&lt;h3 id=&quot;definierte-gridlinien-benennung&quot;&gt;Definierte Gridlinien-Benennung&lt;a class=&quot;header-anchor&quot; href=&quot;#definierte-gridlinien-benennung&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Zudem gibt es die Möglichkeit Gridlinien-Benennung in der Gridvorlage zu vergeben. Dies passiert im &lt;code&gt;grid-template-*&lt;/code&gt;, Liniennamen werden umschlossen mit einer eckigen Klammer deklariert. Unser Beispiel mit benannten Gridlinien:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.wrapper {
	display: grid;
	grid-template-columns: [grid-line1] 1fr [grid-line2] 1fr [grid-line3] 1fr [grid-line4];
}
.a {
	grid-column: grid-line1 / grid-line3;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bei der Benennung kann man natürlich kreativer sein. Mit den Liniennamen können dann auch Positionen im Grid vergeben werden.&lt;/p&gt;
&lt;p&gt;Der Vollständigkeit halber hier der Code für die Zellen &lt;code&gt;.c&lt;/code&gt; und &lt;code&gt;.d&lt;/code&gt;, wenn man die Positionen fixieren möchte. Da sich Gridzellen grundsätzlich im &lt;code&gt;autoflow&lt;/code&gt; verteilen, wäre der Code aber für das erwartete Ergebnis unnötig.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css/9-17&quot;&gt;.a {
  grid-column: 1 / span 2;
}

.b {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.c {
  grid-column: 1;
  grid-row: 2;
}

.d {
  grid-column: 2;
  grid-row: 2;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;p&gt;An dieser Stelle auch der Hinweis, dass sich durch Grid super einfach die visuelle Reihenfolge der Elemente mit CSS manipulieren lässt. Bei Flexbox ist dies mit &lt;code&gt;order&lt;/code&gt; möglich. Bei Grids greift hier die Positionierungslogik, so kann man ganz simpel eine Navigation vom „Header“ in den „Footer“ verschieben, wenn man das möchte. Die Source-Order im HTML bleibt davon unberührt. Hier muss man prüfen, ob das nicht die Barrierefreiheit beeinträchtigt, wenn man es anwendet.&lt;/p&gt;
&lt;/div&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Der Browser-Support bei neuen CSS-Eigenschaften ist immer etwas spezielles, teilweise muss man Jahre warten bis alle Browser die Eigenschaften unterstützen, damit man den Code produktiv einsetzen kann. Bei CSS Grids gibt es eine Besonderheit, alle modernen Browser unterstützen nahezu zeitgleich die Eigenschaft und wer den Internet Explorer oder MS Edge unterstützt, hat Glück, da bereits der IE10 CSS Grids der ersten Spezifikation unterstützt. Microsoft hat die Eigenschaften entwickelt und in den IE10 integriert. Seither haben die anderen Browserhersteller zusammen mit Microsoft an einem W3C-Standard gearbeitet und die überarbeitete Fassung in die Browser implementiert. So ist es mit Autoprefixer möglich einige Eigenschaften automatisch für die alten Internet Explorer zu generieren, allerdings nur für die Eigenschaften, die der IE unterstützt. Eine gute Übersicht hat &lt;a href=&quot;https://rachelandrew.co.uk/archives/2016/11/26/should-i-try-to-use-the-ie-implementation-of-css-grid-layout/&quot;&gt;Rachel Andrew&lt;/a&gt; zusammengestellt. Zu Bedenken ist aber, dass alte Android-Versionen CSS Grids nicht unterstützen. Zudem ist zu empfehlen, dass der Browser-Support mit &lt;code&gt;@support&lt;/code&gt; im CSS zu überprüfen ist und die Grid-Eigenschaften in die At-Rule gekapselt werden. Polyfills gibt es in der Form nicht, da es eine vollkommen neue Layout-Technik ist, die zudem die ganze Seite betreffen kann, was, wenn man mit Javascript das Layout beeinflusst, sehr performance-intensiv sein kann.&lt;/p&gt;
&lt;p&gt;Aktuell unterstützen Firefox 52, Chrome 57 und Safari 10.1 sowie iOS 10.3, Android Chrome sowie Android Firefox die aktuelle Spec. Internet Explorer ab Version 10 (auch mobile) und Microsoft Edge unterstützen grundlegenden Grid-Eigenschaften mit Vendor-Präfix.&lt;/p&gt;
&lt;details class=&quot;baseline-indicator baseline-indicator--widely&quot; open&gt;
  &lt;summary&gt;
    &lt;span class=&quot;baseline-indicator__icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg viewBox=&quot;0 0 36 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M18 8L20 10L18 12L16 10L18 8Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M26 0L28 2L10 20L0 10L2 8L10 16L26 0Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M28 2L26 4L32 10L26 16L22 12L20 14L26 20L36 10L28 2Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M10 0L2 8L4 10L10 4L14 8L16 6L10 0Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__title&quot;&gt;Baseline &lt;span class=&quot;baseline-indicator__year&quot;&gt;2017&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__pill&quot;&gt;Widely available&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__browsers&quot;&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Blink (Chrome &amp;amp; Edge)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--chrome supported&quot; title=&quot;chrome 57&quot; role=&quot;img&quot; aria-label=&quot;chrome 57&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 260 260&quot;&gt;
  &lt;linearGradient id=&quot;a&quot; x1=&quot;145&quot; x2=&quot;34&quot; y1=&quot;253&quot; y2=&quot;61&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#1e8e3e&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#34a853&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;b&quot; x1=&quot;111&quot; x2=&quot;222&quot; y1=&quot;254&quot; y2=&quot;62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#fcc934&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#fbbc04&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;c&quot; x1=&quot;17&quot; x2=&quot;239&quot; y1=&quot;80&quot; y2=&quot;80&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#d93025&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ea4335&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;64&quot; fill=&quot;#fff&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#a)&quot; d=&quot;M96 183.4A63.7 63.7 0 0 1 72.6 160L17.2 64A128 128 0 0 0 128 256l55.4-96A64 64 0 0 1 96 183.4Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;url(#b)&quot; d=&quot;M192 128a63.7 63.7 0 0 1-8.6 32L128 256A128 128 0 0 0 238.9 64h-111a64 64 0 0 1 64 64Z&quot;&gt;&lt;/path&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;52&quot; fill=&quot;#1a73e8&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#c)&quot; d=&quot;M96 72.6a63.7 63.7 0 0 1 32-8.6h110.8a128 128 0 0 0-221.7 0l55.5 96A64 64 0 0 1 96 72.6Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--edge supported&quot; title=&quot;edge 16&quot; role=&quot;img&quot; aria-label=&quot;edge 16&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 256 256&quot;&gt;
	&lt;defs&gt;
		&lt;radialGradient id=&quot;edgeb&quot; cx=&quot;161.8&quot; cy=&quot;68.9&quot; r=&quot;95.4&quot; gradientTransform=&quot;matrix(1 0 0 -.95 0 248.8)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.7&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edged&quot; cx=&quot;-340.3&quot; cy=&quot;63&quot; r=&quot;143.2&quot; gradientTransform=&quot;matrix(.15 -.99 -.8 -.12 176.6 -125.4)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.8&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgee&quot; cx=&quot;113.4&quot; cy=&quot;570.2&quot; r=&quot;202.4&quot; gradientTransform=&quot;matrix(-.04 1 2.13 .08 -1179.5 -106.7)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#35c1f1&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.1&quot; stop-color=&quot;#34c1ed&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#2fc2df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#2bc3d2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#36c752&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgef&quot; cx=&quot;376.5&quot; cy=&quot;568&quot; r=&quot;97.3&quot; gradientTransform=&quot;matrix(.28 .96 .78 -.23 -303.8 -148.5)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#66eb6e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#66eb6e&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;edgea&quot; x1=&quot;63.3&quot; y1=&quot;84&quot; x2=&quot;241.7&quot; y2=&quot;84&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#0c59a4&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#114a8b&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;linearGradient id=&quot;edgec&quot; x1=&quot;157.3&quot; y1=&quot;161.4&quot; x2=&quot;46&quot; y2=&quot;40.1&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#1b9de2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#1595df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#0680d7&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#0078d4&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgea)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;isolation:isolate;opacity:.35;fill:url(#edgeb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgec)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;opacity:.41;fill:url(#edged);isolation:isolate&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgee)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgef)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Gecko (Firefox)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--firefox supported&quot; title=&quot;firefox 52&quot; role=&quot;img&quot; aria-label=&quot;firefox 52&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 512 512&quot;&gt;
	&lt;defs&gt;
		&lt;linearGradient id=&quot;ffa&quot; x1=&quot;446.9&quot; y1=&quot;76.85&quot; x2=&quot;47.94&quot; y2=&quot;461.77&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.05&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.22&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.37&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;radialGradient id=&quot;ffb&quot; cx=&quot;428.46&quot; cy=&quot;55.06&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#ffbd4f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.19&quot; stop-color=&quot;#ffac31&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ff9d17&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff563b&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#ff3750&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.71&quot; stop-color=&quot;#f5156c&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.78&quot; stop-color=&quot;#eb0878&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.86&quot; stop-color=&quot;#e50080&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffc&quot; cx=&quot;245.39&quot; cy=&quot;259.88&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#960e18&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#b11927&quot; stop-opacity=&quot;.74&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.43&quot; stop-color=&quot;#db293d&quot; stop-opacity=&quot;.34&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#f5334b&quot; stop-opacity=&quot;.09&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3750&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffd&quot; cx=&quot;305.8&quot; cy=&quot;-58.64&quot; r=&quot;362.96&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ffdc3e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ff9d12&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffe&quot; cx=&quot;189.98&quot; cy=&quot;390.75&quot; r=&quot;238.55&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#3a8ee6&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#5c79f0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.67&quot; stop-color=&quot;#9059ff&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#c139e6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;fff&quot; cx=&quot;252.16&quot; cy=&quot;201.25&quot; r=&quot;126.48&quot; gradientTransform=&quot;matrix(.97 -.24 .28 1.14 -48.36 31.43)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.21&quot; stop-color=&quot;#9059ff&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#8c4ff3&quot; stop-opacity=&quot;.06&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.75&quot; stop-color=&quot;#7716a8&quot; stop-opacity=&quot;.45&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.97&quot; stop-color=&quot;#6e008b&quot; stop-opacity=&quot;.6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffg&quot; cx=&quot;239.06&quot; cy=&quot;34.56&quot; r=&quot;171.62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#ffe226&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.12&quot; stop-color=&quot;#ffdb27&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ffc82a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#ffa930&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.73&quot; stop-color=&quot;#ff7e37&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.79&quot; stop-color=&quot;#ff7139&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffh&quot; cx=&quot;373.96&quot; cy=&quot;-74.29&quot; r=&quot;732.21&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.62&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.72&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffi&quot; cx=&quot;304.59&quot; cy=&quot;7.07&quot; r=&quot;536.37&quot; gradientTransform=&quot;matrix(.1 .99 -.65 .07 277.32 -296.33)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.06&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.36&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.45&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.57&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.74&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffj&quot; cx=&quot;235.02&quot; cy=&quot;98.12&quot; r=&quot;457.12&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.14&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.48&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.59&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.66&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffk&quot; cx=&quot;355.69&quot; cy=&quot;124.88&quot; r=&quot;500.32&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.09&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.23&quot; stop-color=&quot;#ffe141&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ffaf1e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.63&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;ffl&quot; x1=&quot;442.1&quot; y1=&quot;74.79&quot; x2=&quot;102.64&quot; y2=&quot;414.26&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.8&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.27&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.63&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.49&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.22&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.6&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5A120.27 120.27 0 0 0 182 159.05a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.08 12.7-2.37 15v.53A229.1 229.1 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-277 188.12c1.12.53 2.18 1.12 3.33 1.64l.16.1c-1.15-.56-2.32-1.14-3.48-1.74zm55-144.95zM454.9 179v-.23.26z&quot; fill=&quot;url(#ffa)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffc)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M361.92 194.62c.53.37 1 .74 1.5 1.11a130.49 130.49 0 0 0-22.32-29.12C266.4 91.91 321.52 4.63 330.81.19l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49z&quot; fill=&quot;url(#ffd)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#ffe)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#fff)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M170.83 151.06c1.95 1.26 3.55 2.32 5 3.29a111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71 1.13-.03 35.99-.66 53.52 10.74z&quot; fill=&quot;url(#ffg)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M18.22 261.45C36.77 371 136.1 454.71 248.85 457.91c104.37 2.95 171-57.63 198.58-116.73 17.8-38.21 30.16-100.72 7.48-162.2v-.46c0 .06 0 .14.05.4 8.52 55.67-19.79 109.6-64.05 146.07a7.3 7.3 0 0 0-.13.31c-86.25 70.23-168.78 42.37-185.49 31-1.16-.56-2.33-1.14-3.49-1.74-50.29-24-71.06-69.85-66.61-109.14-42.45 0-56.93-35.82-56.93-35.82s38.12-27.18 88.36-3.54c46.53 21.9 90.23 3.55 90.23 3.54-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7c-1.43-1-3-2-5-3.29-17.53-11.4-52.39-10.77-53.54-10.74h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.19.46-8.74 37.79-4.52 57.15z&quot; fill=&quot;url(#ffh)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M341.1 166.61a130.49 130.49 0 0 1 22.32 29.12 46.36 46.36 0 0 1 3.6 3C421.5 248.89 393 319.9 390.83 325c44.26-36.47 72.57-90.4 64.05-146.07-27.17-67.78-73.25-95.1-110.88-154.57-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09-9.3 4.44-64.42 91.72 10.28 166.42z&quot; fill=&quot;url(#ffi)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M367 198.68a46.36 46.36 0 0 0-3.6-3c-.49-.37-1-.74-1.5-1.11-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c16.71 11.4 99.24 39.26 185.49-31 0 0 .05-.13.13-.31C393 319.9 421.5 248.89 367 198.68z&quot; fill=&quot;url(#ffj)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M148.44 277.48s11.09-41.34 79.43-41.34c7.39 0 28.51-20.62 28.9-26.6s-43.7 18.36-90.23-3.54c-50.24-23.64-88.36 3.54-88.36 3.54s14.48 35.82 56.93 35.82c-4.45 39.29 16.32 85.1 66.61 109.14 1.12.53 2.18 1.12 3.33 1.64-29.35-15.14-53.58-43.84-56.61-78.66z&quot; fill=&quot;url(#ffk)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c-1.16-.56-2.33-1.14-3.49-1.74 1.12.53 2.18 1.12 3.33 1.64-29.41-15.17-53.64-43.87-56.67-78.69 0 0 11.09-41.34 79.43-41.34 7.39 0 28.51-20.62 28.9-26.6-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.49 12.85-2.77 15.15 0 .18 0-.17 0 0A278.84 278.84 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-23.84 12.34v.26z&quot; fill=&quot;url(#ffl)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;WebKit (Safari)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--safari supported&quot; title=&quot;safari 10.1&quot; role=&quot;img&quot; aria-label=&quot;safari 10.1&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 21 21&quot; fill=&quot;none&quot;&gt;&lt;g clip-path=&quot;url(#clip0_1510_9490)&quot;&gt;&lt;path opacity=&quot;0.53&quot; d=&quot;M19.5049 10.5241C19.5049 15.4499 15.2689 19.5325 10.2011 19.5325C5.13327 19.5325 0.897217 15.4499 0.897217 10.5241C0.897217 5.59835 5.13327 1.51575 10.2011 1.51575C15.2689 1.51575 19.5049 5.59835 19.5049 10.5241Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.8586 9.72878C19.8586 14.8543 15.4048 19.44 10.2005 19.44C4.99618 19.44 0.54248 14.8543 0.54248 9.72878C0.54248 4.60325 4.99618 0.0175781 10.2005 0.0175781C15.4048 0.0175781 19.8586 4.60325 19.8586 9.72878Z&quot; fill=&quot;url(#paint0_linear_1510_9490)&quot; stroke=&quot;#CDCDCD&quot; stroke-width=&quot;0.351543&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.1018 9.72868C19.1018 14.4178 15.0334 18.6789 10.2006 18.6789C5.36782 18.6789 1.29932 14.4178 1.29932 9.72868C1.29932 5.03955 5.36782 0.778442 10.2006 0.778442C15.0334 0.778442 19.1018 5.03955 19.1018 9.72868Z&quot; fill=&quot;url(#paint1_radial_1510_9490)&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M10.2004 1.24524C10.1285 1.24524 10.0706 1.30343 10.0706 1.37573V2.88089C10.0706 2.95319 10.1285 3.01138 10.2004 3.01138C10.2723 3.01138 10.3302 2.95319 10.3302 2.88089V1.37573C10.3302 1.30343 10.2723 1.24524 10.2004 1.24524Z&quot; fill=&quot;#F4F2F3&quot;&gt;&lt;/path&gt;&lt;g opacity=&quot;0.409&quot; filter=&quot;url(#filter0_f_1510_9490)&quot;&gt;&lt;path d=&quot;M16.2829 4.50916L9.18266 8.65714L4.69336 15.7635L11.2608 10.8722L16.2829 4.50916Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;path d=&quot;M11.218 10.8003L9.18286 8.65724L16.4024 3.77393L11.218 10.8003Z&quot; fill=&quot;#FF5150&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M11.2181 10.8003L9.18291 8.65723L3.99854 15.6836L11.2181 10.8003Z&quot; fill=&quot;#F1F1F1&quot;&gt;&lt;/path&gt;&lt;path opacity=&quot;0.243&quot; d=&quot;M3.99854 15.6836L11.2181 10.8003L16.4025 3.77393L3.99854 15.6836Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id=&quot;filter0_f_1510_9490&quot; x=&quot;2.14852&quot; y=&quot;1.96432&quot; width=&quot;16.6793&quot; height=&quot;16.3439&quot; filterUnits=&quot;userSpaceOnUse&quot; color-interpolation-filters=&quot;sRGB&quot;&gt;&lt;feFlood flood-opacity=&quot;0&quot; result=&quot;BackgroundImageFix&quot;&gt;&lt;/feFlood&gt;&lt;feBlend mode=&quot;normal&quot; in=&quot;SourceGraphic&quot; in2=&quot;BackgroundImageFix&quot; result=&quot;shape&quot;&gt;&lt;/feBlend&gt;&lt;feGaussianBlur stdDeviation=&quot;1.27242&quot; result=&quot;effect1_foregroundBlur_1510_9490&quot;&gt;&lt;/feGaussianBlur&gt;&lt;/filter&gt;&lt;linearGradient id=&quot;paint0_linear_1510_9490&quot; x1=&quot;10.2002&quot; y1=&quot;19.4398&quot; x2=&quot;10.2002&quot; y2=&quot;0.0175272&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop stop-color=&quot;#BDBDBD&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;white&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;radialGradient id=&quot;paint1_radial_1510_9490&quot; cx=&quot;0&quot; cy=&quot;0&quot; r=&quot;1&quot; gradientUnits=&quot;userSpaceOnUse&quot; gradientTransform=&quot;translate(10.2407 8.42362) scale(9.65803 9.71116)&quot;&gt;&lt;stop stop-color=&quot;#06C2E7&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.25&quot; stop-color=&quot;#0DB8EC&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.5&quot; stop-color=&quot;#12AEF1&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.75&quot; stop-color=&quot;#1F86F9&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#107DDD&quot;&gt;&lt;/stop&gt;&lt;/radialGradient&gt;&lt;clipPath id=&quot;clip0_1510_9490&quot;&gt;&lt;rect width=&quot;20.4&quot; height=&quot;20.4&quot; fill=&quot;white&quot; transform=&quot;translate(0.000488281)&quot;&gt;&lt;/rect&gt;&lt;/clipPath&gt;&lt;/defs&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/summary&gt;
  &lt;div class=&quot;baseline-indicator__body&quot;&gt;
    &lt;p&gt;Grid ist seit 2017 in allen gängigen Browsern verfügbar und gilt als stabil.&lt;/p&gt;
    &lt;a href=&quot;https://webstatus.dev/features/grid&quot; target=&quot;_blank&quot;&gt;Browser-Support auf webstatus.dev&lt;/a&gt;
  &lt;/div&gt;
&lt;/details&gt;
&lt;h3 id=&quot;fazit&quot;&gt;Fazit:&lt;a class=&quot;header-anchor&quot; href=&quot;#fazit&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die neuen Möglichkeiten von CSS Grid Layout sind fantastisch. Endlich ist es möglich sehr viel einfacher eigene Grid-Layouts ohne spezielle Frameworks umzusetzen. Entwickler und Designer werden in Zukunft viel Freude mit den neuen Eigenschaften haben und endlich komplexe Layout-Anforderungen umsetzen können, die bislang nicht, bzw. sehr schwer möglich waren. Ich empfehle jedem Webentwickler mit Grids zu spielen und die Möglichkeiten auszuloten. Auch wenn man Grids aktuell noch nicht in vielen Projekten produktiv einsetzen kann, so ist zumindest der Internet Explorer diesmal nicht der Spielverderber. Dennoch denke ich, das spätestens in einem Jahr mehr und mehr Projekte mit CSS Grid Layouts umgesetzt werden.&lt;/p&gt;
&lt;p&gt;Ich möchte zudem nochmals deutlich machen, dass CSS Grids kein Ersatz für irgendeine bisherige Layout-Technik ist, sondern eine tolle neue Ergänzung zu Flexbox, Float &amp;amp; Co darstellt. Ich bin gespannt welche schönen Ideen Designer haben, jetzt wo sie wissen, dass in modernen Browsern nun technisch viel mehr möglich ist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wer noch mehr Beispiele sehen möchte, wie man vom Bootstrap-Grid zum eigenen Grid gelangt, findet in meiner Präsentation „&lt;a href=&quot;https://maddesigns.de/css-grids&quot;&gt;Grids &amp;amp; Glory&lt;/a&gt;“ weitere Beispiele. Zudem hab ich auf Codepen eine &lt;a href=&quot;https://codepen.io/collection/nrkvQx/&quot;&gt;CSS Grid Collection&lt;/a&gt; meiner Tests zusammen gestellt.&lt;/strong&gt;&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-grids-sass-1883.html&quot;&gt;Individuelle responsive Gridsysteme mit Sass&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Sass Parent Selector – ‚&amp;‘ (ampersand)</title>
    <link href="https://maddesigns.de/archiv/sass-parent-selector-2741.html" />
    <updated>2017-01-09T08:46:01Z</updated>
    <id>https://maddesigns.de/archiv/sass-parent-selector-2741.html</id>
    <content type="html">&lt;p&gt;Für eine Schulung zum Thema „Sass“ habe ich einige Möglichkeiten zum Einsatz des so genannten „Parent Selector“ zusammen gestellt.&lt;/p&gt;
&lt;div class=&quot;tip&quot;&gt;
&lt;p&gt;&lt;em&gt;Kurz notiert – was macht der „Parent Selector“?&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Der „Parent Selector“ referenziert in einer verschachtelten Regel den Eltern-Selektor und verbindet beim Kompilieren die Knoten zum endgültigen Selektor. Das ‚&amp;amp;‘ Ampersand dient als Platzhalter. Hier ein einfaches Beispiel:&lt;/p&gt;
&lt;!--more--&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;a {
	color: blue;

	&amp;amp;:focus,
	&amp;amp;:hover {
		color: red;
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;a {
	color: blue;
}

a:focus,
a:hover {
	color: red;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Weitere Infos in der &lt;a href=&quot;https://sass-lang.com/documentation/file.SASS_REFERENCE.html#parent-selector&quot;&gt;Sass Dokumentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Da seit der Sass-Version 3.3 das ‚&amp;amp;‘ (Ampersand) auch am Anfang von Selektoren verwendet werden kann und ich dahingehend meine Schulungsunterlagen anpassen wollte, habe ich ein paar Tests gemacht. Hier mal eine Zusammenstellung von ein paar Möglichkeiten:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$componentname: &amp;quot;block&amp;quot;;

.#{$componentname} {
	$parent: &amp;amp;;

	// .block.block
	&amp;amp;#{&amp;amp;} {
		color: red;
	}

	// .block + .block
	&amp;amp; + &amp;amp; {
		color: purple;
	}

	// .block__element
	&amp;amp;__element {
		color: green;
	}

	// .block .block__element
	#{&amp;amp;}__element {
		color: maroon;
	}

	// .block--modifier
	&amp;amp;--modifier {
		color: yellow;

		// .block--modifier__element
		&amp;amp;__element {
			color: lime;
		}

		// .block--modifier .block__element
		#{$parent}__element {
			color: blue;

			// .block--modifier .block__element &amp;gt; .block__more
			&amp;gt; #{$parent}__more {
				color: white;
			}
		}
	}

	// .block.block--no-img
	&amp;amp;#{&amp;amp;}--no-img {
		color: teal;
	}

	// div .block
	div &amp;amp; {
		color: aqua;
	}

	// div.block .block
	div#{&amp;amp;} &amp;amp; {
		color: fuchsia;
	}

	// div.block
	@at-root {
		div#{&amp;amp;} {
			color: gray;
		}
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;sassmeister-codepen&quot;&gt;Sassmeister „Codepen“:&lt;a class=&quot;header-anchor&quot; href=&quot;#sassmeister-codepen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p class=&quot;sassmeister&quot; data-gist-id=&quot;7303691216ff25b0734201e7df9561a1&quot; data-height=&quot;480&quot; data-theme=&quot;tomorrow&quot;&gt;
  &lt;a href=&quot;https://www.sassmeister.com/gist/7303691216ff25b0734201e7df9561a1&quot;&gt;Gist on SassMeister.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Die Möglichkeiten für BEM-Klassen-Strukturen sind interessant. Ich möchte auch hier dazu keine Diskussion entfachen, darum geht es hierbei nicht. &lt;em&gt;Ich weiß, dass einige Entwickler es nicht mögen, wenn BEM-Klassen mit ‚&amp;amp;‘, (z.B. &lt;code&gt;&amp;amp;__element&lt;/code&gt;) zusammengesetzt in Sass verwendet werden, da es schwieriger ist bei der Suche im Projekt.&lt;/em&gt; Dennoch sehe ich dabei schon einige Vorteile und Sass wurde genau für das „&lt;a href=&quot;https://de.wikipedia.org/wiki/Don%E2%80%99t_repeat_yourself&quot;&gt;DRY-Prinzip&lt;/a&gt;“ entwickelt.&lt;/p&gt;
&lt;p&gt;Der Clou ist dabei ist, den Parent-Selektor in eine Sass-Variable innerhalb des Block zu referenzieren, also den Scope mitzuschleifen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.block {
	$parent: &amp;amp;;

	&amp;amp;--modifier {
		color: yellow;

		#{$parent}__element {
			color: green;
		}
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das ergibt folgenden Selektor:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.block--modifier .block__element {
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Kennt ihr noch mehr Tricks?&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema Sass:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/postcss-plugins-2692.html&quot;&gt;Nützliche PostCSS-Module&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/styleguide-mit-grunt-2093.html&quot;&gt;Styleguide generieren mit Sass &amp;amp; Grunt&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/mobile-first-ie8-fallback-mit-sass-teil2-2047.html&quot;&gt;Mobile First &amp;amp; IE8 Fallback mit Sass (Teil2)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/mobile-first-ie8-fallback-sass-2008.html&quot;&gt;Mobile First &amp;amp; IE8 Fallback mit Sass&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Nützliche PostCSS-Module</title>
    <link href="https://maddesigns.de/archiv/postcss-plugins-2692.html" />
    <updated>2016-02-14T16:04:56Z</updated>
    <id>https://maddesigns.de/archiv/postcss-plugins-2692.html</id>
    <content type="html">&lt;p&gt;Gibt es die überhaupt, wird sich so mancher denken… und die Antwort ist wie immer – it depends™. Natürlich gibt es nützliche PostCSS-Module, die Entwicklern beim Schreiben von CSS unterstützen, für andere passt es eher nicht in den Workflow. Nur weil es das jetzt gibt, heißt es nicht, dass jeder Webworker es gleich einsetzen muss. Dennoch denke ich, dass bei vielen mindestens ein PostCSS-Modul Einzug in den Build-Prozess gefunden hat, nämlich Autoprefixer.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Aber mal kurz ein Schritt zurück – was macht eigentlich dieses PostCSS? PostCSS-Module verändern das geschriebene CSS, dabei kann das CSS auch vorher durch einen Präprozessor erstellt worden sein, muss es aber auch nicht. PostCSS kann auch SCSS-Dateien verarbeiten bevor es mit Sass kompiliert wird. Wenn man Sass verwendet, ist man ein großes Featureset gewohnt, das bereits enthalten ist. PostCSS ist erstmal nur das Gerüst und kann mit individuellen Plugins bestückt werden. Quasi ein LEGO für CSS-Entwicklung, man kann es nach den eigenen Wünschen zusammenstecken. &amp;lt;meinung&amp;gt;&lt;em&gt;Es gibt Puristen, die Präprozessoren den Rücken gekehrt haben, jetzt aber zig PostCSS-Module einsetzen, die das CSS verwursteln – das soll jetzt besser sein? Na ich weiß nicht.&lt;/em&gt;&amp;lt;/meinung&amp;gt;&lt;/p&gt;
&lt;p&gt;Nichtsdestotrotz gibt es Module, die mir persönlich die Arbeit erleichtern. Und was mir die Arbeit leichter macht, ohne dass ich meinen kompletten Workflow umstellen muss (reicht, wenn man das alle 2–3 Jahre macht), finde ich gut. Ich verwende PostCSS zusätzlich zu Sass, für die Aufgaben, die Sass nicht oder nicht so komfortabel beherrscht. Letztlich soll PostCSS bei der Erstellung von CSS unterstützen. Jeder sollte sich sein eigenes Bild davon machen, ob es für ihn/das Team nützlich ist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hinweis:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ich habe in den Code-Beispielen die Verwendung mit Grunt-PostCSS genutzt (quasi aus dem Gruntfile.js kopiert). Wer andere Build-Tools nutzt muss u.U. andere Konfigurationen angeben. Wie die PostCSS-Plugins eingebunden werden, findet ihr immer in der Plugin-Readme.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;autoprefixer&quot;&gt;Autoprefixer&lt;a class=&quot;header-anchor&quot; href=&quot;#autoprefixer&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Das bekannteste PostCSS-Plugin und in den letzten Jahren auch das nützlichste ist &lt;a href=&quot;https://github.com/postcss/autoprefixer&quot; title=&quot;PostCSS Autoprefixer&quot;&gt;Autoprefixer&lt;/a&gt;. Ihr kennt das – viele neue CSS3-Eigenschaften wurden mit Vendorpräfixe in die Browser gebracht und jeder Hersteller hat fleißig mitgemacht und seine eigenen Präfixe eingeführt. Beliebtes Beispiel war &lt;code&gt;border-radius&lt;/code&gt;. So las man dann oft folgendes Beispiel im Netz:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.rounded-corner {
	-webkit-border-radius: 1em;
	-moz-border-radius: 1em;
	border-radius: 1em;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wir wissen, dass &lt;code&gt;border-radius&lt;/code&gt; schon ewig keine Vendorpräfixe braucht, aber andere Eigenschaften haben heute immer noch welche. Jede neue Eigenschaft doppelt und dreifach schreiben ist bescheuert, war aber nötig. Für Sass gab es Compass, das eine Vielzahl an CSS3-Mixins lieferte, die einem diese Aufgabe abnahm. Man inkludierte 1x das Mixin und Compass schrieb die Vendorpräfixe. Deshalb war Compass sehr beliebt. Das Problem war, dass Compass die Vendorpräfixe immer eingesetzt hat, unabhängig davon, ob die Präfixe noch gebraucht wurden oder nicht.&lt;/p&gt;
&lt;p&gt;Das macht Autoprefixer anders. Hier kann ich einen Browser-Support angeben. Autoprefixer prüft anhand caniuse.com-Daten, ob ein Präfix für die definierten Browser noch notwendig ist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grunt-PostCSS Config für Autoprefixer&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;require(&amp;quot;autoprefixer&amp;quot;)({
	browsers: [&amp;quot;last 2 version&amp;quot;, &amp;quot;ie &amp;gt;= 9&amp;quot;, &amp;quot;Android &amp;gt;= 2.3&amp;quot;, &amp;quot;Firefox ESR&amp;quot;],
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Als Webworker schreibe ich dann standardkonformes CSS und Autoprefixer wandelt das anschließend in CSS um, das alle meine Browser verstehen, die ich unterstützen möchte. Mittlerweile auch so intelligent, dass es die unterschiedlichen Flexbox-Syntaxen und die verschiedenen linear-gradient Schreibweisen einfügt. Also tatsächlich richtig mächtig.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Kleiner Zusatzhinweis:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Anstatt der Caniuse-Daten Browser-Daten kann ich mittlerweile auch eigene Analyse-Daten als Grundlage verwenden. Ich kann angeben, dass ich alle Browser unterstütze, die mehr als 5% Zugriffe auf meine Webseite ausmachen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;require(&amp;quot;autoprefixer&amp;quot;)({
	browsers: [&amp;quot;&amp;gt; 5% in my stats&amp;quot;, { stats: &amp;quot;path/to/the/stats.json&amp;quot; }],
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;doiuse&quot;&gt;doiuse&lt;a class=&quot;header-anchor&quot; href=&quot;#doiuse&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/anandthakker/doiuse&quot; title=&quot;Doiuse PostCSS Plugin&quot;&gt;Doiuse&lt;/a&gt; checkt, ob ich CSS-Eigenschaften einsetze, die Browser in meinem angegebenen Browser-Support nicht verstehen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;require(&amp;quot;doiuse&amp;quot;)({
	browsers: [&amp;quot;last 2 version&amp;quot;, &amp;quot;ie &amp;gt;=9&amp;quot;, &amp;quot;Android &amp;gt;= 4&amp;quot;],
	ignore: [&amp;quot;rem&amp;quot;, &amp;quot;css-boxshadow&amp;quot;, &amp;quot;css-transitions&amp;quot;],
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Zum Beispiel supporte ich in der oberen Config alle IEs ab Version 9. Verwende ich Flexbox-Styles in meinem CSS, würde das Plugin Alarm schlagen, da der IE9 Flexbox nicht versteht.&lt;/p&gt;
&lt;p&gt;Aktuell prüft es das meiner Meinung nach zu gut. ;) Es prüft dabei, ob die Angabe bei Caniuse dunkelgrün ist, also voll unterstützt wird. Ein teilweiser/buggy Support wird als fehlerhaft angezeigt, überprüft aber nicht, ob ich den „buggy“ Fall im CSS überhaupt nutze. Das kann leicht verwirren. Dieses Verhalten soll sich aber in Zukunft ändern, so der Plugin-Autor. Das Plugin soll dann besser kennzeichnen welche Eigenschaft buggy/partial Support hat und welcher Browser die Eigenschaft überhaupt nicht versteht.&lt;/p&gt;
&lt;p&gt;Rundum finde ich das aber ein nützliches Plugin, das zur Codequalität beiträgt.&lt;/p&gt;
&lt;h2 id=&quot;css-next&quot;&gt;CSS Next&lt;a class=&quot;header-anchor&quot; href=&quot;#css-next&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://cssnext.io/&quot;&gt;CSS Next&lt;/a&gt; ist ein Sammelsurium an Plugins, welche mehrere Sachen machen. Man kann mit CSS Next bereits jetzt schon CSS der Zukunft schreiben. Es ermöglicht unter anderem die Benutzung von nativen Variablen (Custom Properties), Custom Media Queries oder wandelt Pixel-Angaben und rem-Werte um. Zudem hat CSS Next Autoprefixer und „Sass-Features“ wie Nesting schon an Board. Es ist quasi das &lt;a href=&quot;https://babeljs.io/&quot;&gt;Babel&lt;/a&gt; des CSS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein Beispiel für Custom Properties&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* custom properties */
:root {
	--heading-color: #ff0000;
}

/* custom selectors */
@custom-selector :--headings h1, h2, h3, h4;

/* usage */
:--headings {
	color: var(--heading-color);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSSNext kompiliert das zu:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;h1,
h2,
h3,
h4 {
	color: #ff0000;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ich denke, dass es nicht viele Entwickler geben wird, die die allerneuesten Features für CSS schon heute verwenden werden. Viele Webworker schrecken ja schon davor zurück Flexbox einzusetzen, weil sie es noch nicht allumfänglich verstehen bzw. Browser-Bugs fürchten oder noch uralte Browser unterstützen müssen. Dennoch spannend zu beobachten, ob es dazu führt, dass mehr Entwickler zukunftsweisendes CSS schreiben.&lt;/p&gt;
&lt;h2 id=&quot;postcss-assets&quot;&gt;postcss-assets&lt;a class=&quot;header-anchor&quot; href=&quot;#postcss-assets&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ich muss sagen, dass ich es praktisch fand, dass Compass Funktionen bereit stellt, die mir die Breite und Höhe einer Datei auslesen können. In einigen Projekten brauchte ich das. Die Funktionalität bietet „&lt;a href=&quot;https://github.com/assetsjs/postcss-assets&quot;&gt;postcss-assets&lt;/a&gt;“ genau so.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel: Breite eines Logo auslesen:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.logo {
	width: width(&amp;quot;logo.svg&amp;quot;);
	height: height(&amp;quot;logo.svg&amp;quot;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Das kompilierte CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.logo {
	width: 100px;
	height: 40px;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Zudem kann man auch Grafiken enkodiert (als background-image), also inline ins CSS ausgeben lassen. Aber dazu im nächsten Kapitel noch ein Plugin, dass das noch umfänglicher macht.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel inline SVG als background-iamge:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.logo {
	background-image: inline(&amp;quot;logo.svg&amp;quot;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Das kompilierte CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;background-image: url(&amp;quot;data:image/svg+xml,%3Csvg…&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Des Weiteren kann ein Cache-Buster aktiviert werden, praktisch besonders bei statischen Seiten.&lt;/p&gt;
&lt;h2 id=&quot;postcss-svg&quot;&gt;postcss-svg&lt;a class=&quot;header-anchor&quot; href=&quot;#postcss-svg&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://pavliko.github.io/postcss-svg/&quot;&gt;PostCSS-SVG&lt;/a&gt; stellt kleine Helferlein für die Arbeit mit SVG bereit. Icon-System hin oder her, &lt;a href=&quot;https://maddesigns.de/archiv/svg-sprites-icon-fonts-2309.html&quot;&gt;Iconfont vs. SVG&lt;/a&gt;, ihr kennt das. Das Thema ignorieren wir hier mal. Es gibt Anforderungen, die außerhalb von Icons liegen. Ich hatte ein Projekt, da ist es erforderlich gewesen, dass eine Box einen unförmigen Hintergrund hat (Sprechblase) – ein Paradebeispiel für SVG als background-image. Nun ist es allerdings so, dass dieser Hintergrund mehrere Farbvarianten hatte, was auf den ersten Blick mehrere Assets mit den jeweiligen Farben bedeuten würde.&lt;/p&gt;
&lt;p&gt;Oder man fügt den SVG-Code als enkodierten String ins CSS ein und tauscht dabei die Füllfarbe aus. Das PostCSS-Plugin postcss-svg macht das für uns.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel Sass&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.svg-bg1 {
	background-image: svg(&amp;quot;path/to/bg-svg&amp;quot;, &amp;quot;[fill]: #{$color-text}&amp;quot;);
}

.svg-bg2 {
	background-image: svg(&amp;quot;path/to/bg-svg&amp;quot;, &amp;quot;[fill]: #{$color-main}&amp;quot;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wenn man Assets enkodiert ins CSS einbindet, muss man unbedingt vorher die Datei so klein schrumpfen wie es nur geht.&lt;/p&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;p&gt;Dateien enkodiert ins CSS aufzunehmen ist immer ein Drahtseilakt… einerseits möchte man das CSS so schlank wie möglich halten, andererseits Requests sparen. Lohnt es sich für 2–3 Dateien ein Sprite zu erstellen oder ist der Request für das Sprite „teurer“? Muss/kann das einzelne Sprite-Element visuell verändert werden? Ist es wartbar? Wenn beim Build-Prozess generiert, sollte das kein Problem sein. Diese Fragen sollten sich Entwickler stellen, wenn sie grafische Elemente einbinden.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In dem besagten Projekt fand ich es die beste Lösung die SVG-Formen als &lt;code&gt;background-image&lt;/code&gt; zu verwenden. Über die PostCSS-Funktion verknüpft und die Füllfarbe zugewiesen, fertig.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ideal wäre für mich, wenn man diese Teile in ein separates Stylesheet auslagern und async nachladen könnte. Aber soweit hab ich den Bauprozess nicht gebracht.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;cssnano&quot;&gt;CSSnano&lt;a class=&quot;header-anchor&quot; href=&quot;#cssnano&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://cssnano.co/&quot;&gt;CSSnano&lt;/a&gt; ist ebenfalls eine Ansammlung kleiner Scripte, die das CSS möglichst klein schrumpfen wollen. Dabei versuchen sie weiter zu gehen, als Minifizierer von Sass &amp;amp; Co. Neben den üblichen „ich entferne alle Whitespaces“, werden auch CSS-Regeln zusammen gezogen, die den gleichen Selektor haben. Da muss man vorsichtig sein, da dabei die Kaskade verändert werden könnte und das Ergebnis nicht mehr das Selbe ist. Auch versucht es z-Indizes zu simplifizieren. Auch das führt manchmal dazu, dass das gewünschte Aussehen im Anschluss nicht mehr passt. Ich empfehle, dass man das ausführlich gegenüber den bisherigen CSS-Minifier testet und vergleicht, ob es einen Vorteil bringt. Dennoch leistet es grundsätzlich eine gute Arbeit beim Minifizieren von CSS-Dateien.&lt;/p&gt;
&lt;p&gt;Natürlich ist die Liste an Plugins lang und es gibt sicherlich für jeden nützliche und unnütze Plugins. Wer einen Präprozessor ersetzen möchte, kann CSSNext oder &lt;a href=&quot;https://github.com/jonathantneal/precss&quot;&gt;PreCSS&lt;/a&gt; verwenden. Wer nicht in die Probleme mit &lt;a href=&quot;https://github.com/philipwalton/flexbugs&quot;&gt;Flexbugs&lt;/a&gt; rennen möchte, kann mit &lt;a href=&quot;https://github.com/luisrudge/postcss-flexbugs-fixes&quot;&gt;postcss-flexbugs-fixes&lt;/a&gt; viele Bugs im Buildtasks elimieren – durchaus praktisch. Auf der Seite &lt;a href=&quot;https://postcss.parts/&quot;&gt;postcss.parts&lt;/a&gt; sind viele PostCSS-Plugins in unterschiedlichen Kategorien aufgeführt.&lt;/p&gt;
&lt;p&gt;Welche nützlichen PostCSS-Plugins habt ihr noch im Einsatz?&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/sass-parent-selector-2741.html&quot;&gt;Sass Parent Selector – ‚&amp;amp;‘ (ampersand)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/styleguide-mit-grunt-2093.html&quot;&gt;Styleguide generieren mit Sass &amp;amp; Grunt&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/mobile-first-ie8-fallback-mit-sass-teil2-2047.html&quot;&gt;Mobile First &amp;amp; IE8 Fallback mit Sass (Teil2)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/mobile-first-ie8-fallback-sass-2008.html&quot;&gt;Mobile First &amp;amp; IE8 Fallback mit Sass&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Flexbox Fallbacks</title>
    <link href="https://maddesigns.de/archiv/flexbox-fallbacks-2670.html" />
    <updated>2016-01-11T20:02:28Z</updated>
    <id>https://maddesigns.de/archiv/flexbox-fallbacks-2670.html</id>
    <content type="html">&lt;p&gt;Aktuell bekomme ich des Öfteren eine Diskussion über den Einsatz von Flexbox in aktuellen Webprojekten mit. Häufiges Thema ist dabei, dass der IE9 Flexbox nicht unterstützt und aus diesem Grund lieber auf Flexbox verzichtet wird. Ich muss zugeben, dass ich seit mehreren Jahren in Mobile- oder Responsive-Projekten arbeite und dort nur äußerst selten noch IE9- oder IE8-Support benötigt wird. Somit kann ich schon länger fast ausschließlich Flexbox verwenden ohne einen Fallback inkludieren zu müssen. Deswegen kann ich die Diskussion vielleicht nicht so nachvollziehen, da Flexbox mittlerweile zu meinen täglichen Tools zählt. In diesem Blog-Post möchte ich mal ein paar typische Flexbox-Fallback-Möglichkeiten skizzieren.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Klar ist – mit CSS Flexbox sind uns Entwicklern neue Möglichkeiten gegeben worden, die bisher nur mit Hacks in CSS zu realisieren waren. Nun können wir verlässlich Inhalte vertikal zentrieren, zueinander ins Verhältnis setzen, visuelle Reihenfolge der Elemente verändern und endlich Boxen mit gleicher Höhe darstellen. Selbst der Browser-Support ist mittlerweile hervorragend (auch Opera-Mini unterstützt nun Flexbox), also kein Grund mehr auf die Vorteile zu verzichten.&lt;/p&gt;
&lt;p&gt;Ein klassisches Beispiel für Flexbox ist eine horizontale Navigation. Die Anforderung: egal wie viele Menüpunkte, sie sollen sich optimal den verfügbaren Platz aufteilen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel HTML&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;nav role=&amp;quot;navigation&amp;quot;&amp;gt;
    &amp;lt;ul class=&amp;quot;the-flextable&amp;quot;&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;Item 5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
&amp;lt;/nav&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Beispiel CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.the-flextable {
    display: table; /* Fallback IE &amp;gt; 9 */
    display: flex;
    width: 100%;
}

.the-flextable &amp;gt; li {
    display: table-cell; /* Fallback IE &amp;gt; 9 */
    flex: 1 1 auto;
    min-width: 1%; /* Fix for Firefox */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;code-demo title=&quot;Flexbox fallback with CSS display: table&quot; height=&quot;400&quot;&gt;
&lt;template data-lang=&quot;css&quot;&gt;
.the-flextable {
    display: table; /* Fallback IE &gt; 9 */
    display: flex;
    width: 100%;
}
&lt;p&gt;.the-flextable &amp;gt; li {
display: table-cell; /* Fallback IE &amp;gt; 9 &lt;em&gt;/
flex: 1 1 auto;
min-width: 1%; /&lt;/em&gt; Fix for Firefox */
}
&lt;/p&gt;&lt;/template&gt;
&lt;/code-demo&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Mit &lt;code&gt;display: table/table-cell;&lt;/code&gt; hat man für diese simple Aufgabe einen guten Fallback für Browser die Flexbox nicht verstehen. Selbst vertikal zentrieren des Textes ist mit &lt;code&gt;table-cell&lt;/code&gt; möglich.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vorteile: &lt;code&gt;display: table&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;vertikales zentrieren und gleiche Höhen&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Nachteil: &lt;code&gt;display: table&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Zwischenräume (margins) können auf table-cell nicht angewendet werden, &lt;code&gt;border-collapse: separate&lt;/code&gt; und &lt;code&gt;border-spacing&lt;/code&gt; als Ersatz ist nicht optimal&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Selbst für Fälle wo &lt;code&gt;flex-wrap&lt;/code&gt; zum Einsatz kommt, kann man mit &lt;code&gt;display: inline-block&lt;/code&gt; oder &lt;code&gt;float&lt;/code&gt; gute Fallbacks erreichen. Nachteil bei &lt;code&gt;inline-block/float&lt;/code&gt; ist leider, dass die Höhe der „Flex-Items“ nicht automatisch gleich hoch ist, hier müsste man sich über &lt;code&gt;min-height&lt;/code&gt; an das gewünschte Aussehen annähern. Für den Fallback mit &lt;code&gt;display: inline-block&lt;/code&gt; ist es zudem notwendig Whitespace, den &lt;code&gt;inline-block&lt;/code&gt; mitbringt, zu eliminieren. Der Blogbeitrag von &lt;a href=&quot;https://css-tricks.com/fighting-the-space-between-inline-block-elements/&quot;&gt;CSS-Tricks&lt;/a&gt; zeigt die unterschiedlichen Möglichkeiten. Ich finde die &lt;code&gt;font-size: 0&lt;/code&gt; Methode oft am praktischsten.&lt;/p&gt;
&lt;p&gt;Hier mal ein einfaches responsive „floating“ flex-wrap Fallback-Beispiel mit &lt;code&gt;inline-block&lt;/code&gt; (hab ich alle buzzwords eingebunden?):&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/JA0CmfezPJ-750.avif 750w, https://maddesigns.de/img/JA0CmfezPJ-1500.avif 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/JA0CmfezPJ-750.webp 750w, https://maddesigns.de/img/JA0CmfezPJ-1500.webp 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/JA0CmfezPJ-750.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1500&quot; height=&quot;394&quot; srcset=&quot;https://maddesigns.de/img/JA0CmfezPJ-750.png 750w, https://maddesigns.de/img/JA0CmfezPJ-1500.png 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;code-demo title=&quot;Flexbox fallback with CSS display: inline-block&quot; height=&quot;200&quot;&gt;
&lt;template data-lang=&quot;html&quot;&gt;
&lt;ul class=&quot;flex-list&quot;&gt;
  &lt;li&gt;Item 1&lt;/li&gt;
  &lt;li&gt;Item 2&lt;/li&gt;
  &lt;li&gt;Item 3&lt;/li&gt;
  &lt;li&gt;Item 4&lt;/li&gt;
&lt;/ul&gt;
&lt;/template&gt;
&lt;template data-lang=&quot;css&quot;&gt;
* { box-sizing: border-box; }
body { font-family: sans-serif; margin: 1em; }
.flex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0; /* remove inline-block whitespace */
  display: flex;
}
.flex-list &gt; li {
  display: inline-block; /* fallback */
  flex: 1 1 auto;
  font-size: 1rem;
  padding: 1em;
  background: #6c8ebf;
  color: #fff;
  text-align: center;
  border-inline-end: 2px solid #fff;
}
&lt;/template&gt;
&lt;/code-demo&gt;
&lt;p&gt;&lt;strong&gt;Vorteile: &lt;code&gt;display: inline-block&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;vertikales Zentrieren&lt;/li&gt;
&lt;li&gt;kein Clearing notwendig&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Nachteile: &lt;code&gt;display: inline-block&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;keine gleichen Höhen&lt;/li&gt;
&lt;li&gt;Whitespace-Foo&lt;/li&gt;
&lt;li&gt;kein Clearing möglich&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Vorteile: &lt;code&gt;float&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verhalten und Anwendung von &lt;code&gt;float&lt;/code&gt; ist den meisten Entwickler vertraut&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Nachteile: &lt;code&gt;float&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clearing&lt;/li&gt;
&lt;li&gt;kein vertikales Zentrieren&lt;/li&gt;
&lt;li&gt;keine gleiche Höhe&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Selbst für einen einfachen Source-Order-Switch kann man auf &lt;code&gt;display: table&lt;/code&gt; als Fallback zurückgreifen. Im Blog-Post: &lt;a href=&quot;https://maddesigns.de/archiv/content-source-order-in-responsive-webdesign-2577.html&quot;&gt;Content-Source Ordering&lt;/a&gt; habe ich eine Möglichkeit für IE8 &amp;amp; Co. skizziert.&lt;/p&gt;
&lt;p&gt;Grundsätzlich bin ich immer ein Freund von &lt;em&gt;mobile first&lt;/em&gt;/&lt;em&gt;semantic first&lt;/em&gt;, also erst die richtige Source-Order von der Logik her erstellen und dann das gewünschte Ergebnis visuell abbilden.&lt;/p&gt;
&lt;p&gt;Ein typisches Beispiel hatte ich letztens im Projekt auch: Ein Kochrezept! Die visuelle Vorgabe für große Viewports (aka Desktop) sah in etwa so aus:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/doN5bJR0P_-750.avif 750w, https://maddesigns.de/img/doN5bJR0P_-1030.avif 1030w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/doN5bJR0P_-750.webp 750w, https://maddesigns.de/img/doN5bJR0P_-1030.webp 1030w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/doN5bJR0P_-750.png&quot; alt=&quot;Flexbox fallback 1&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1030&quot; height=&quot;956&quot; srcset=&quot;https://maddesigns.de/img/doN5bJR0P_-750.png 750w, https://maddesigns.de/img/doN5bJR0P_-1030.png 1030w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/4UB-ZldUoh-494.avif&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/4UB-ZldUoh-494.webp&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/4UB-ZldUoh-494.png&quot; alt=&quot;Flexbox fallback 2&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;494&quot; height=&quot;1367&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Für Schmalscreens und als Struktur entschied ich mich dazu folgenden Wireframe umzusetzen.&lt;/p&gt;
&lt;p&gt;Der Fallback für IE9 (der eigentlich nicht unterstützt wird) ist in dem Fall &lt;code&gt;display: inline-block&lt;/code&gt;, allerdings bleibt die logische Reihenfolge der Elemente unverändert. Ich finde das nicht tragisch, optisch sieht es vollkommen in Ordnung aus.&lt;/p&gt;
&lt;h2 id=&quot;braucht-man-aktuell-noch-alle-flexbox-varianten&quot;&gt;Braucht man aktuell noch alle Flexbox-Varianten?&lt;a class=&quot;header-anchor&quot; href=&quot;#braucht-man-aktuell-noch-alle-flexbox-varianten&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Flexbox hat einige Spezifikationsvarianten durchlebt und Browserhersteller haben unterschiedliche Schreibweisen implementiert, so dass wir teilweise nicht nur Vendor-Präfixe, sondern auch verschiedene Schreibweisen (Eigenschaftsnamen) für den Cross-Browser-Support einbinden müss(t)en. Autoprefixer nimmt uns das glücklicherweise alles ab. Wenn man alte Android-Versionen unterstützt (4.x ist auch alt ;)), dann benötigt man auf jeden Fall die alte Schreibweise. IE10 braucht die Zwischenlösung von 2012.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finale Syntax&lt;/th&gt;
&lt;th&gt;2011 Hybrid Syntax&lt;/th&gt;
&lt;th&gt;2009 Syntax&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;display: flex&lt;/td&gt;
&lt;td&gt;display: flexbox&lt;/td&gt;
&lt;td&gt;display: box&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;flex-direction: row&lt;/td&gt;
&lt;td&gt;box-orient: horizontal&lt;/td&gt;
&lt;td&gt;box-orient: horizontal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;justify-content: flex-start&lt;/td&gt;
&lt;td&gt;box-pack: start&lt;/td&gt;
&lt;td&gt;box-pack: start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;align-items: flex-start&lt;/td&gt;
&lt;td&gt;box-align: start&lt;/td&gt;
&lt;td&gt;box-align: start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;flex: 1&lt;/td&gt;
&lt;td&gt;flex: 1&lt;/td&gt;
&lt;td&gt;box-flex: 1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Mir ist aufgefallen, dass es weniger Probleme gibt, wenn man z.B. mit Modernizr den Support testet und dann dementsprechend die Zuweisung der Eigenschaften macht, heißt also Fallback mit &lt;code&gt;.no-flexbox&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Einen einfacher Test, ob Flexbox (mit Flex-Wrap) verfügbar ist, hat Ethan Marcotte in einem &lt;a href=&quot;https://24ways.org/2015/putting-my-patterns-through-their-paces/&quot;&gt;24ways Artikel&lt;/a&gt; gezeigt:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;var doc = document.body || document.documentElement;
var style = doc.style;
​
if ( style.webkitFlexWrap == &#39;&#39; ||
    style.msFlexWrap == &#39;&#39; ||
    style.flexWrap == &#39;&#39; ) {
  doc.className += &amp;quot; supports-flex&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alle Styles werden dann also mit &lt;code&gt;.supports-flex&lt;/code&gt; gepräfixt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSS-Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.supports-flex .flex-container {
    display: flex;
}

.supports-flex .flex-item {
    flex: 1 1 0%;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wie so oft, ist es auch leider so, dass bei der Implementation der Spezifikation Fehler unterlaufen und so gibt es auch für Flexbox Bugs in Browsern. Auch das führt oft zur Ablehnung der Technik. Philip Walton hat die &lt;a href=&quot;https://github.com/philipwalton/flexbugs&quot;&gt;Flexbugs&lt;/a&gt; mal zusammengeschrieben.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Die entscheidendsten Bugs sind:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In der vertikalen Flexbox-Ausrichtung mit „column“ wird im IE10–11 die gesetzte Mindesthöhe nicht an die Flex-Items vererbt. Besser wäre es eine definierte Höhe zu setzen.&lt;/li&gt;
&lt;li&gt;Chrome, Opera und Safari missachten die per Default vergebene Inhaltsbreite der Flex-Items. Hier empfiehlt es sich den &lt;code&gt;flex-shrink&lt;/code&gt; Wert auf 0 statt dem Defaultwert 1 zu setzen um umgewollte Darstellungen zu vermeiden.&lt;/li&gt;
&lt;li&gt;Flex-Basis sollte man nicht ohne Einheit in der Flex-Shorthand-Notation benutzen, das führt zu Fehlern im IE10 und 11. Besser ist es 0% anstatt 0px zu verwenden, da einige CSS-Minifizierer 0px zu 0 wandeln (0 ohne Einheit ist ja genau das Problem).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ein PostCSS-Script hilft uns beim Flexbugs fixen – &lt;a href=&quot;https://github.com/luisrudge/postcss-flexbugs-fixes&quot;&gt;https://github.com/luisrudge/postcss-flexbugs-fixes&lt;/a&gt;. Es scannt das CSS und ersetzt mögliche Problemstellen mit dem empfohlenen Code.&lt;/p&gt;
&lt;h3 id=&quot;flexbox-polyfill-fur-ie89&quot;&gt;Flexbox-Polyfill für IE8/9&lt;a class=&quot;header-anchor&quot; href=&quot;#flexbox-polyfill-fur-ie89&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Jonathan Neal, der schon den Polyfill „SVG4everybody“ entwickelt hat, hat mit &lt;a href=&quot;https://github.com/10up/flexibility&quot;&gt;Flexibility&lt;/a&gt; einen Flexbox-Polyfill für IE8 und 9 veröffentlicht. Der Polyfill scannt die Seite und das CSS und stellt das Flexbox-Verhalten mit JavaScript nach. Also kein manueller Aufwand für Entwickler. Als Trigger für JavaScript wird in CSS &lt;code&gt;-js-display: flex;&lt;/code&gt; gesetzt.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.foo {
    -js-display: flex;
    display: flex;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Um das noch weiter zu Vereinfachen gibt es auch dafür ein &lt;a href=&quot;https://github.com/7rulnik/postcss-flexibility&quot;&gt;PostCSS-Plugin&lt;/a&gt;, dass das Einfügen des Triggers &lt;code&gt;-js-display: flex&lt;/code&gt; automatisch macht.&lt;/p&gt;
&lt;p&gt;Natürlich sollte man genau überprüfen, ob das gewünschte Ergebnis damit auch erzielt wird bzw. ob es notwendig ist dafür extra JavaScript zu verwenden – oft reicht ja auch ein wenig CSS als Fallback aus. Auch wenn das Ergebnis nicht immer 100%ig das Gleiche ist, so gibt es eine Reihe guter Fallbacks für Flexbox – denn &lt;a href=&quot;https://dowebsitesneedtolookexactlythesameineverybrowser.com/&quot;&gt;müssen Webseiten in jedem Browser gleich aussehen&lt;/a&gt;? &lt;strong&gt;Nein!&lt;/strong&gt;&lt;/p&gt;
&lt;aside class=&quot;w-aside w-aside--note&quot;&gt;
&lt;h3&gt;Update 06.04.2016:&lt;/h3&gt;
&lt;p&gt;Eine sehr schöne Übersicht dazu hat Kenan Yusuf erstellt: &lt;a href=&quot;https://kyusuf.com/post/almost-complete-guide-to-flexbox-without-flexbox&quot;&gt;Almost complete guide to flexbox (without flexbox)&lt;/a&gt;&lt;/p&gt;
&lt;/aside&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/content-source-order-in-responsive-webdesign-2577.html&quot;&gt;Content Source Order in RWD&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Responsive Navigation aus UX-Sicht</title>
    <link href="https://maddesigns.de/archiv/responsive-navigation-ux-2650.html" />
    <updated>2015-11-25T22:16:54Z</updated>
    <id>https://maddesigns.de/archiv/responsive-navigation-ux-2650.html</id>
    <content type="html">&lt;h3 id=&quot;optimierte-navigation-bei-mobilem-webdesign&quot;&gt;Optimierte Navigation bei mobilem Webdesign&lt;a class=&quot;header-anchor&quot; href=&quot;#optimierte-navigation-bei-mobilem-webdesign&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Eines der komplizierteren Themen im Responsive Webdesign ist unbestritten die Navigation, gerade wenn ein Relaunch bestehender Inhalte geplant ist. Wird auf der vorhandenen Webseite eine umfangreiche Navigation (z. B. „Mega Dropdown“) verwendet, ist eine Anpassung auf kleinere Bildschirme eine herausfordernde Aufgabe. Hier gibt es keine Einheitslösung, es muss eine gut durchdachte Lösung gefunden werden. Beim Responsive Re-Design sollte es immer eine Anpassung von Inhalt (Content Strategy) und Navigationsstruktur geben, auch wenn dies sicherlich schwerfällt.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Verfolgt man den „Mobile First“ Ansatz, bei dem man zuerst für mobile Geräte konzipiert und designt, ist es oft leichter sich auf die wesentlichen Kernpunkte der Navigation zu konzentrieren. Demzufolge ist eine simple Navigation zu erstellen mit den wichtigsten Navigationspunkten. Eine Navigation mit sehr vielen Unterebenen ist für Benutzer – gerade auf kleinen Bildschirmen – schwer zu erfassen. Hier muss in der Konzeption darauf geachtet werden, dass die Navigationsstränge für den Besucher schlüssig sind.&lt;/p&gt;
&lt;p&gt;Das direkte Erfassen der Navigationsstruktur bzw. der Kategorien eines Shops hat sich als enorm wichtig herausgestellt. Auch wenn Lösungen wie das „Off-Canvas-Menü“ praktisch sind um bei größeren Menüs Platz im Sichtbereich zu sparen, sind diese doch für unerfahrene Nutzer oft eine Hürde. Studien haben gezeigt, dass Benutzer, die zum ersten Mal auf einer neuen Shop-Homepage landen, sich zuerst durch hoch- und runterscrollen orientieren. Dies geschieht, um für sich zu Erfassen, ob das Gesuchte (die gewünschte Kategorie) auf der Webseite zu finden ist, also ob die Seite thematisch den Erwartungen entspricht. Platzieren Sie zumindest ein paar Hauptmenüpunkte direkt auf der Startseite im Header.&lt;/p&gt;
&lt;p&gt;Ein großer Aufhänger für Meinungsverschiedenheiten ist das sogenannte „Hamburger-Icon“. Das in der Designer- und Entwicklergemeinde bekannte Icon wird mittlerweile häufig verwendet, um ein (Off-Canvas)-Menü zu öffnen. Inzwischen wurde es oft wieder von Webseiten entfernt, da Studien zeigten, dass viele Nutzer das Icon (noch) nicht verstehen. Es ist für den Einsatz des Hamburger-Icons daher abzuwägen, welche Zielgruppe man auf der Webseite hat. Bei einer Seite mit technik-affiner Zielgruppe ist der Einsatz durchaus denkbar, bei einer internetunerfahrenen oder breiten Nutzergruppe ist eher darauf zu verzichten.&lt;/p&gt;
&lt;p&gt;Der Online-Auftritt der britischen Zeitung „The Guardian“ verwendet auf ihrer Seite ein ausgeklügeltes Navigationskonzept. Das sogenannte „Priority“-Konzept zeigt in einer horizontal swipebaren Navigation schon so möglichst viele Navigationspunkte im verfügbaren Sichtbereich. Alle weiteren Punkte sind über einen Menü-Button erreichbar. Je größer das Gerät, umso mehr Menüpunkte können direkt vom User erfasst werden.&lt;/p&gt;
&lt;p&gt;Unbestritten ist es gerade bei Shops mit vielen Kategorien schwierig — wie etwa m.zalando.de oder otto.de — eine einfache Navigationsform zu finden. Aber auch hier wurde versucht, in flachen Hierarchien zu bleiben. Nichts ist schlimmer, als sich immer tiefer in einen Navigationsstrang zu graben, nicht das zu finden, was man sucht und zum Schluss gar nicht mehr zu wissen, wo man sich befindet. Für viele Nutzer ist es um so wichtiger, eine gute Suche und umfangreiche Filtermöglichkeiten zur Verfügung zu stellen.&lt;/p&gt;
&lt;p&gt;Natürlich muss man dann nicht auf eine erweiterte Navigation auf Desktopgröße verzichten. Optimalerweise lädt man die „fehlenden“ Untermenüs dort nach. Technisch gesehen ist dies die bessere Lösung, als zwei verschiedene Menüs in die Seite einzubauen und diese jeweils auf Smartphone- und Desktopscreens ein- bzw. auszublenden.&lt;/p&gt;
&lt;p&gt;Unterschätzt wird gerade bei Shops der Einsatz von Breadcrumb-Pfad-Navigationen. Auch wenn diese in großen verzweigten Kategoriebäumen eher visuell störend empfunden werden, hilft es dem Besucher enorm, wenn er auf einer Produktdetailseite nicht genau das gefunden hat, was er suchte. Viele User gehen dann über die Breadcrumb-Navigation in die übergeordnete Kategorie zurück, um von dort weiterzusuchen.&lt;/p&gt;
&lt;p&gt;Allerdings wird das Thema Navigation im Online-Shop-Bereich manchmal überschätzt. Einige Nutzergruppen (speziell Frauen) gehen eher so vor, dass sie von Übersicht zu Übersicht springen (aka. „bummeln“), bis sie etwas Interessantes entdecken. Sie navigieren also nicht übers Menü. Andere suchen eher ein bestimmtes Produkt und nutzen die Suche oder navigieren durch Empfehlungen.&lt;/p&gt;
&lt;p&gt;Festzuhalten bleibt: Die Navigation sollte simpel gehalten sein und den User unterstützen und ihn nicht verwirren. Denn wie sagte schon der Usability-Guru Steve Krug: „Don’t Make Me Think.“&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Dieser Artikel zum Thema „Responsive Navigation aus UX-Sicht“ erschien zuerst im Newsletter des E-Commerce Dienstleisters &lt;a href=&quot;https://www.dc-solution.de/dc/de/info/news/?collection_id=331&quot;&gt;dynamic commerce GmbH&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-iframes-2417.html&quot;&gt;Responsive iFrames&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-tables-2393.html&quot;&gt;Responsive Tabellen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-svg-logos-2361.html&quot;&gt;Responsive SVG-Logos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html&quot;&gt;”CSS3 &amp;amp; Responsive Web” – CSS3 Adventskalender Tag 3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Assemble – erste Schritte mit dem Static Site Generator für Grunt</title>
    <link href="https://maddesigns.de/archiv/assemble-static-site-generator-grunt-2625.html" />
    <updated>2015-05-21T15:48:25Z</updated>
    <id>https://maddesigns.de/archiv/assemble-static-site-generator-grunt-2625.html</id>
    <content type="html">&lt;p&gt;Wie bereits im Artikel „&lt;a href=&quot;https://maddesigns.de/archiv/static-site-generators-2138.html&quot;&gt;Static Site Generators&lt;/a&gt;“ geschrieben, habe ich mich letztes Jahr projektbedingt mit &lt;a href=&quot;https://assemble.io/&quot;&gt;Assemble&lt;/a&gt; beschäftigt. Assemble ist ein Static Site Generator für Grunt und nutzt Handlebars als Template-Engine.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;tldr-warum-ist-mir-egal-ich-will-code-sehen-hier-klicken&quot;&gt;tl;dr; „Warum ist mir egal, ich will Code sehen” =&amp;gt; &lt;a href=&quot;https://maddesigns.de/archiv/assemble-static-site-generator-grunt-2625.html#installation-von-assemble&quot;&gt;hier klicken&lt;/a&gt;&lt;a class=&quot;header-anchor&quot; href=&quot;#tldr-warum-ist-mir-egal-ich-will-code-sehen-hier-klicken&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mir persönlich nutzt ein Static Site Generator oft bei meinem täglichen Workflow, beim Erstellen von Klickdummys und Templates. Der Vorteil eines „Static Site Generator“ liegt auf der Hand: man nutzt die Dynamik einer Script-Sprache um wiederholende Elemente nicht jedes Mal neu schreiben zu müssen oder Markup mit dynamischen Daten zu vermischen. Man stelle sich vor, man muss bei einer statischen Seite einen Navigationspunkt ändern und das bei vielen Seiten, das ist aufwändig und fehleranfällig.&lt;/p&gt;
&lt;p&gt;OK, jetzt könnte man meinen, dass man doch gleich PHP oder ähnliches nehmen könnte. Ja kann man auch. ;) Aber auch hier wäre es von Vorteil, wenn man das Markup von der Logik entkoppelt, also sowas wie ein MVC-Prinzip. Möchte/Soll man die Template-Schnipsel wieder verwenden können, also sollen die Schnippets möglichst modular wiederverwendbar sein, ist man schnell bei einer Template-Engine, die das unterstützt.&lt;/p&gt;
&lt;p&gt;Ähnlich mit Javascript-Bausteinen. Immer mehr Teile der Website werden mit dynamischen Daten und Markup-Schnipseln in die Seite integriert, bzw. werden ja bereits viele JS-Anwendungen komplett im Browser zusammengebaut… buh! lang lebe semantisches Markup!&lt;/p&gt;
&lt;p&gt;Auch hier gibt es Template-Engines, z.B. Handlebars, die eine klare Trennung von Markup und Logik handle’n ;). Und schwuppdiwupp ist man schon bei einem System, aus dem man auch statische Seiten exportieren könnte. Mit Grunt ein paar Prozesse definiert, fertig. Bonus: die Handlebars-Templates können auch im Javascript verwendet werden.&lt;/p&gt;
&lt;p&gt;Assemble macht das alles und bringt noch ein paar Features mehr mit.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Handlebars (nutzt &lt;a href=&quot;https://mustache.github.io/&quot;&gt;Mustache&lt;/a&gt; Syntax)&lt;/li&gt;
&lt;li&gt;YAML Frontmatter&lt;/li&gt;
&lt;li&gt;Datenverarbeitung aus JSON oder YAML&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;installation-von-assemble&quot;&gt;Installation von Assemble&lt;a class=&quot;header-anchor&quot; href=&quot;#installation-von-assemble&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install assemble --save-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Grunt Beispiel Config&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;assemble: {
    options: {
        flatten: true,
        assets: &#39;assets&#39;,
        helpers: [&#39;templates/helpers/*.js&#39;, &#39;handlebars-helpers&#39;],
        partials: [&#39;templates/partials/**/*.hbs&#39;],
        layout: [&#39;templates/layouts/default.hbs&#39;],
        data: [&#39;templates/data/*.{json,yml}&#39;]
    },
    pages: {
        src: [&#39;templates/pages/**/*.hbs&#39;],
        dest: &#39;dist&#39;
    },
    docs: {
        src: [&#39;templates/docs/**/*.hbs&#39;],
        dest: &#39;dist/docs&#39;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;ein-einfaches-default-layout-mit-partials&quot;&gt;Ein einfaches Default-Layout mit Partials&lt;a class=&quot;header-anchor&quot; href=&quot;#ein-einfaches-default-layout-mit-partials&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ein einfaches HTML5-Dokument als Beispiel für die Haupt-Layout-Datei. Über &lt;code&gt; {{&amp;gt; Name}}&lt;/code&gt; können so genannte Partials integriert werden. In dem Beispiel, Teile des Dokuments, die immer auf der Seite sind (Header, Footer,…).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;layout: default.hbs&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&amp;quot;en&amp;quot; class=&amp;quot;no-js&amp;quot;&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;{{page-title}}&amp;lt;/title&amp;gt;
    {{&amp;gt; head }}
  &amp;lt;/head&amp;gt;
  &amp;lt;body {{#if site-class}} class=&amp;quot;{{site-class}}&amp;quot;{{/if}}&amp;gt;
    {{&amp;gt; header}}
    {{&amp;gt; nav}}
    {{&amp;gt; body}}
    {{&amp;gt; footer}}
    {{&amp;gt; foot }}
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das &lt;code&gt;{{&amp;gt; body }}&lt;/code&gt; Partial ist hier etwas spezieller und wird als Platzhalter für die jeweiligen Seiten verwendet. Es kann im oberen Bereich der Seite eine YAML-Frontmatter-Konfiguration enthalten. Diese YAML-Daten können z.B. auch an das Haupt-Layout-Template (Default.hbs) übergeben werden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;pages: index.hbs (body partial)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
---
page-title: Index Template
site-class: &amp;quot;index&amp;quot;

intro:
  name:
  - the name 1
  - the name 2
  - the name 3
---

&amp;lt;h1&amp;gt;here comes the hotstepper&amp;lt;/h1&amp;gt;

&amp;lt;ul class=&amp;quot;intro&amp;quot;&amp;gt;
  {{#each intro }}
  &amp;lt;li class=&amp;quot;intro_item
    {{#unless @index}}
    is-active
    {{/unless}}&amp;quot;&amp;gt;
    &amp;lt;h3&amp;gt;{{ this.name }}&amp;lt;/h3&amp;gt;
    &amp;lt;img src=&amp;quot;{{ assets }}/img/{{hyphenate this.name }}.jpg&amp;quot; alt=&amp;quot;{{ this.name }}&amp;quot;&amp;gt;
    &amp;lt;p&amp;gt;{{ lorem ipsum.sentence }}&amp;lt;/p&amp;gt;
  &amp;lt;/li&amp;gt;
  {{/each}}
&amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Diese Intro-Section (vielleicht News-Teaser) kann man als Partial auslagern, wenn man dieses HTML-Konstrukt mehrfach nutzen möchte.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;partials: _intro-section.hbs&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
&amp;lt;ul class=&amp;quot;intro&amp;quot;&amp;gt;
  {{#each intro }}
  &amp;lt;li class=&amp;quot;intro_item
    {{#unless @index}}
    is-active
    {{/unless}}&amp;quot;&amp;gt;
    &amp;lt;h3&amp;gt;{{ this.name }}&amp;lt;/h3&amp;gt;
    &amp;lt;img src=&amp;quot;{{ assets }}/img/{{hyphenate this.name }}.jpg&amp;quot; alt=&amp;quot;{{ this.name }}&amp;quot;&amp;gt;
    &amp;lt;p&amp;gt;{{ lorem ipsum.sentence }} &amp;lt;/p&amp;gt;
  &amp;lt;/li&amp;gt;
  {{/each}}
&amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;anderes-page-layouts-innerhalb-pages-verwenden&quot;&gt;Anderes Page-Layouts innerhalb „pages“ verwenden&lt;a class=&quot;header-anchor&quot; href=&quot;#anderes-page-layouts-innerhalb-pages-verwenden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wenn man für bestimmte Seite ein anderes „Page-Layout“ verwenden möchte, kann man das einfach in Kopfbereich (YAML-Frontmatter-Bereich) der Seite angeben.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;pages: test.hbs&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;---
page-title: pages
layout: pages.hbs
---
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Datei ‘pages.hbs’ legt man in das Layout-Verzeichnis, das man in der Grunt-Config angegeben hat. Hier kann man auch das Layout-Verzeichnis mit &lt;code&gt;layoutdir&lt;/code&gt; angeben:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;assemble: {
    options: {
        layout: &#39;default.hbs&#39;,
        layoutdir: &#39;templates/layout/&#39;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dann wird unter ‘layout’ nur noch der Name der Default-Datei angegeben.&lt;/p&gt;
&lt;h3 id=&quot;anders-dateiformat-in-der-ausgabe-generieren&quot;&gt;Anders Dateiformat in der Ausgabe generieren&lt;a class=&quot;header-anchor&quot; href=&quot;#anders-dateiformat-in-der-ausgabe-generieren&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Standardmäßig wird aus den .hbs Dateien eine HTML-Datei generiert. Möchte man ein anderes Dateiformat generieren, kann man dafür eine gesonderte Konfiguration in Grunt angeben. In den ‘options’ kann die ’ext’ention festgelegt werden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;gruntconfig.js&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;assemble: {
  // Build sitemap from JSON and templates
  sitemap: {
    options: { ext: &#39;.xml&#39; },
    files: {
      &#39;.&#39;: [&#39;path/to/sitemap.tmpl&#39; ]
    }
  },
  // Build README from YAML and templates
  readme: {
    options: { ext: &#39;.md&#39;  },
    files: {
      &#39;.&#39;: [&#39;path/to/readme.tmpl&#39; ]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;dynamische-daten-verwenden&quot;&gt;Dynamische Daten verwenden&lt;a class=&quot;header-anchor&quot; href=&quot;#dynamische-daten-verwenden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ein großer Vorteil von Assemble ist es, dass mit Assemble Daten im JSON- oder YAML-Format verarbeitet werden können. Das ist praktisch, wenn man z.B. wiederkehrende Daten hat. Diese Daten legt man das in den Grunt-Options festgelegte Verzeichnis, z.B. in ‘templates/data/’.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;assemble: {
    options: {
        data: [&#39;templates/data/*.{json,yml}&#39;]
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wiederkehrende Daten kann man in ein JSON-Objekt oder in eine YAML-Notation auslagern.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel: site.json&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;{
    &amp;quot;sociallinks&amp;quot;: [
        &amp;quot;facebook&amp;quot;,
        &amp;quot;youtube&amp;quot;,
        &amp;quot;xing&amp;quot;
    ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;sociallinks.hbs partial template&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
&amp;lt;div class=&amp;quot;social-links&amp;quot;&amp;gt;
    {{#each site.sociallinks}}
    &amp;lt;a href=&amp;quot;#linkurl&amp;quot; title=&amp;quot;Link to {{capitalizeEach this }}&amp;quot;&amp;gt;
        {{this}}
    &amp;lt;/a&amp;gt;
    {{/each}}
&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;simple-daten-ubergeben&quot;&gt;simple Daten übergeben&lt;a class=&quot;header-anchor&quot; href=&quot;#simple-daten-ubergeben&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Mit dem Helper &lt;code&gt;parseJSON&lt;/code&gt; kann man einfache Daten bei der Einbindung an ein Partial übergeben.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Einbindung des Partials in page-Template&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
{{#parseJSON &#39;{&amp;quot;teasertext&amp;quot;: false, &amp;quot;limit&amp;quot;: 5}&#39;}}
    {{&amp;gt; _newslist }}
{{/parseJSON}}

&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
### partial code
&amp;lt;ul class=&amp;quot;teaserlist&amp;quot;&amp;gt;
{{#each limit==limit}}
  &amp;lt;li&amp;gt;
    &amp;lt;h3&amp;gt;Teaser Headline&amp;lt;/h3&amp;gt;
    {{#is teasertext true}}
    &amp;lt;p&amp;gt;lorem ipsum&amp;lt;/p&amp;gt;
    {{/is}}
  &amp;lt;/li&amp;gt;
{{/each}}
&amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So kann man ein Partial an anderen Stellen in leicht veränderter Ausgabe verwenden, schön modular. In dem Beispiel wird eine Teaserliste mit 5 Teasern und ohne Teaser-Text ausgegeben.&lt;/p&gt;
&lt;h3 id=&quot;eine-ubersicht-der-generierten-seiten-erstellen-sitemap&quot;&gt;Eine Übersicht der generierten Seiten erstellen (Sitemap)&lt;a class=&quot;header-anchor&quot; href=&quot;#eine-ubersicht-der-generierten-seiten-erstellen-sitemap&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Um eine Link-Liste mit den generierten Seiten als Übersicht zu erstellen, kann man den View-Helper &lt;code&gt;{{#pages}}&lt;/code&gt; verwenden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;
---
title: Overview
---
&amp;lt;ul&amp;gt;
{{#pages}}
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;{{lowercase basename}}{{ext}}&amp;quot;&amp;gt;{{data.title}}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
{{/pages}}
&amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Für die Linkbezeichner wird hier der Wert aus dem YML-Kopfbereich ‘title’ verwendet. Zugriff auf die Daten bekommt man mit ‘data’, also ‘data.title’.&lt;/p&gt;
&lt;h3 id=&quot;weitere-nutzliche-handlebars-helpers&quot;&gt;Weitere nützliche Handlebars-Helpers&lt;a class=&quot;header-anchor&quot; href=&quot;#weitere-nutzliche-handlebars-helpers&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mittlerweile gibt es eine Vielzahl an zusätzlichen Plugins bzw. &lt;a href=&quot;https://github.com/assemble/handlebars-helpers&quot;&gt;Handlebars-Helpers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Nach dem Installieren, die Helper in den Grunt-Options Grunt-Options hinzufügen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;assemble: {
    options: {
        helpers: [&#39;templates/helpers/*.js&#39;, &#39;handlebars-helpers&#39;, &#39;handlebars-partials&#39;],
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Soweit ein kleiner Einblick in Assemble. Letztlich hab ich festgestellt, dass der Artikel mehr zu einer Tipps &amp;amp; Tricks Liste geworden ist… und wieder mal länger als anfangs gedacht.&lt;/p&gt;
&lt;p&gt;Habt ihr weitere Tipps zur Verwendung?&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Responsive iFrames</title>
    <link href="https://maddesigns.de/archiv/responsive-iframes-2417.html" />
    <updated>2015-05-04T07:00:16Z</updated>
    <id>https://maddesigns.de/archiv/responsive-iframes-2417.html</id>
    <content type="html">&lt;h3 id=&quot;responsive-retrofitting-teil-3&quot;&gt;Responsive Retrofitting Teil 3&lt;a class=&quot;header-anchor&quot; href=&quot;#responsive-retrofitting-teil-3&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Ein Blogpost der nunmehr 3 Jahre auf Vollendung wartet, ist jetzt endlich fertig :)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Responsive iFrame? Das klingt schon falsch und ist auch ein schwieriges Pflaster. Grundsätzlich können iFrames responsive sein, Voraussetzung ist natürlich, dass sich deren Inhalt ebenfalls responsive verhält. Es ist ja quasi ein Browserfenster im Browserfenster. Doch die Anpassung der Breite ist nicht das Problem, die Anpassung der Höhe macht es kompliziert.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;prominentes-beispiel-youtube-video-responsive-einbinden&quot;&gt;Prominentes Beispiel: YouTube Video responsive einbinden&lt;a class=&quot;header-anchor&quot; href=&quot;#prominentes-beispiel-youtube-video-responsive-einbinden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Der YouTube-iFrame soll folgendermaßen eingebunden werden:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;iframe
  width=&amp;quot;560&amp;quot; height=&amp;quot;315&amp;quot;
  src=&amp;quot;https://www.youtube.com/embed/9T7eSyo7DRU&amp;quot;
  frameborder=&amp;quot;0&amp;quot; allowfullscreen&amp;gt;
&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Breite des iFrame überschreibt man durch CSS wie auch bei Responsive Images:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;img,
iframe {
  max-width: 100%;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Breite passt sich immer dem Container an. Die Höhe wird leider nicht automatisch angepasst, im Beispiel bleibt die Höhe also bei 315px. Die Regel &lt;code&gt;height: auto;&lt;/code&gt; hat hier leider keinen Einfluss auf unseren iFrame. Das Problem bleib die relationale Höhenanpassung des iFrames, wenn sich die Breite verändert. Für das reponsive iFrame Video behelfen wir uns mit einem bekannten Trick. Den iFrame umschließen wir mit einem Container-DIV und erweitern den Container mit ‚padding-bottom‘ durch die prozentuale Höhe des Seitenverhältnis vom iFrames, genauso wie bei &lt;a href=&quot;https://maddesigns.de/archiv/responsive-images-lazy-loading-2151.html&quot; title=&quot;Responsive Images – width/height-Attribute entfernen, lazy loading &amp;amp; padding-bottom Trick&quot;&gt;Lazy Loading Responsive Images Blogpost&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;div class=&amp;quot;embed-container&amp;quot;&amp;gt;
  &amp;lt;iframe
    width=&amp;quot;560&amp;quot; height=&amp;quot;315&amp;quot;
    src=&amp;quot;https://www.youtube.com/embed/9T7eSyo7DRU&amp;quot;
    frameborder=&amp;quot;0&amp;quot; allowfullscreen&amp;gt;
  &amp;lt;/iframe&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.embed-container {
  position: relative;
  padding-bottom: 56.25%; /* ratio 16x9 */
  height: 0;
  overflow: hidden;
  width: 100%;
  height: auto;
}

.embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ratio 4x3 */
.embed-container.ratio4x3 {
  padding-bottom: 75%;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jetzt wird die Video-Containerhöhe immer relational an die Breite angepasst. Je nach Seitenverhältnis kann man auch weitere Klassen im &lt;code&gt;.embed-container&lt;/code&gt; verwenden, z.B. &lt;code&gt;.ratio4x3&lt;/code&gt; für ein Seitenverhälnis 4:3.&lt;/p&gt;
&lt;p&gt;Bei einem externen Video mit festem Seitenverhältnis ist das recht einfach, schwieriger wird es mit interaktiven Inhalten, die eine dynamische Höhe haben.&lt;/p&gt;
&lt;h3 id=&quot;iframe-interaktion&quot;&gt;iFrame Interaktion&lt;a class=&quot;header-anchor&quot; href=&quot;#iframe-interaktion&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wenn man im iFrame weitere Aktionen durchführen kann (Bestellformular, etc.) und die iFrame-Inhaltsseiten unterschiedlich lang sind, wird unter Umständen ein Scrollbalken angezeigt oder man hat viel Weißraum. Dieses Verhalten ist verständlicherweise nicht gewollt. In einem Projekt sollte die Anwendung (Berechnung einer Versicherung) in Partnerwebseiten eingebunden werden, ohne dass auffällt, dass es eine externe Anwendung (ein externes Produkt) ist.&lt;/p&gt;
&lt;p&gt;Das ist unlängst komplizierter, da iFrames insbesondere von verschiedenen Domains aus Sicherheitsgründen nicht so einfach miteinander kommunizieren dürfen (&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy&quot;&gt;Same-Origin-Policy&lt;/a&gt;).&lt;/p&gt;
&lt;h4 id=&quot;same-origin-iframe&quot;&gt;Same Origin iFrame&lt;a class=&quot;header-anchor&quot; href=&quot;#same-origin-iframe&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Wenn der iFrame von der gleichen Domain aus z.B. mit der ID „responsive-iframe“ eingebunden ist, kann man folgende jQuery-Funktion verwenden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;$(function(){
  $(window).on(&#39;load resize&#39;, adjustIframe);
});

function adjustIframe() {
  $(parent.document.getElementById(&amp;quot;responsive-iframe&amp;quot;)).css(&amp;quot;height&amp;quot;, $(&amp;quot;html&amp;quot;).css(&amp;quot;height&amp;quot;));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Erfolgt die Einbindung unter einer anderen Domain, muss man eine andere Technik verwenden damit die Kommunikation zwischen den Frames gewährleistet ist.&lt;/p&gt;
&lt;h4 id=&quot;cross-origin-iframe&quot;&gt;Cross Origin iFrame&lt;a class=&quot;header-anchor&quot; href=&quot;#cross-origin-iframe&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In HTML5 ist &lt;code&gt;postMessage&lt;/code&gt; eingeführt worden, das eine Kommunikation zwischen Browserfenstern erlaubt. Hiermit ist es möglich die aktuelle Höhe des iFrame-Inhalt an die einbindende Seite zu übermitteln.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;postMessage Definition:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;otherWindow.postMessage(message, targetOrigin, [transfer]);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;javascript-funktion-fur-cross-origin-responsive-iframes&quot;&gt;JavaScript Funktion für Cross-Origin responsive iFrames&lt;a class=&quot;header-anchor&quot; href=&quot;#javascript-funktion-fur-cross-origin-responsive-iframes&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;iframe.html – Sender:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;var rIframe = {};
rIframe.requestAnimFrame = (function(){

  return  window.requestAnimationFrame       ||
          window.webkitRequestAnimationFrame ||
          window.mozRequestAnimationFrame    ||
          window.oRequestAnimationFrame      ||
          window.msRequestAnimationFrame     ||
          function( callback ){
              window.setTimeout(callback, 1000 / 60);
          };
})();
rIframe.windowHeight = 0;
rIframe.htmlElement = document.getElementsByTagName(&#39;html&#39;)[0];
rIframe.targetDomain = &#39;domain.tld&#39;;
rIframe.resizeFrame = function (){
  var windowHeight = document.body ? Math.max(document.body.offsetHeight, rIframe.htmlElement.offsetHeight) : rIframe.htmlElement.offsetHeight ;
  if ( rIframe.windowHeight === windowHeight ) {
      rIframe.requestAnimFrame.call(window, rIframe.resizeFrame);
      return false;
  }
  rIframe.windowHeight = windowHeight;
  try {
      // Same Origin iFrame
      window.frameElement.style.height = windowHeight + &#39;px&#39;;
  }
  catch ( e ) {
      // Cross Origin iFrame
      window.parent.postMessage(&#39;resize:&#39; + windowHeight , rIframe.targetDomain);
  }
  rIframe.requestAnimFrame.call(window, rIframe.resizeFrame);
};
rIframe.requestAnimFrame.call(window, rIframe.resizeFrame);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;index.html – Empfänger:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;function receiveMessage(event) {
    var message = event.data.split(&#39;:&#39;);
    var eventName = message[0];
    var iframes, len, i = 0;

    // only receive messages from this domain
    var senderDomains = [&#39;domain.tld&#39;];

    if ( senderDomains.indexOf(event.origin) !== -1 &amp;amp;&amp;amp; eventName === &#39;resize&#39; ) {
        iframes = document.getElementsByTagName(&#39;iframe&#39;);
        len = iframes.length;

        for (; i &amp;lt; len; i++) {
            if ( ( iframes[i].contentWindow || iframes[i].documentWindow ) == event.source) {
                iframes[i].style.height = message[1] + &amp;quot;px&amp;quot;;
                return;
            }
        }
    }
}

if ( window.addEventListener ) {
    window.addEventListener(&#39;message&#39;, receiveMessage, false);
}
else if (window.attachEvent)  {
    window.attachEvent(&#39;onmessage&#39;, receiveMessage);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Den kompletten Code findet man &lt;a href=&quot;https://github.com/closingtag/super-awesome-responsive-iframe-solution&quot;&gt;hier&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;javascript-plugins&quot;&gt;JavaScript-Plugins&lt;a class=&quot;header-anchor&quot; href=&quot;#javascript-plugins&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;easyxmd&quot;&gt;easyXMD&lt;a class=&quot;header-anchor&quot; href=&quot;#easyxmd&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;easyXDM ist eine Javascript Library, die es Entwicklern ermöglich mit den Limitierung der Same Origin Policy umzugehen und Anwendungen Cross-Domain kommunizieren zu lassen. Im Blogpost auf &lt;a href=&quot;https://easyxdm.net/wp/2010/03/17/resize-iframe-based-on-content/&quot;&gt;https://easyxdm.net/wp/2010/03/17/resize-iframe-based-on-content/&lt;/a&gt; wird gut beschrieben, welche Schritte man unternehmen muss.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://easyxdm.net/wp/&quot;&gt;https://easyxdm.net/wp/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wer im Projekt jQuery verwendet, kann das „responsiveiframe” Plugin von NPR verwenden.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://npr.github.io/responsiveiframe/&quot;&gt;https://npr.github.io/responsiveiframe&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Eine umfangreiche API für iFrame Embeds bietet &lt;strong&gt;iframely&lt;/strong&gt;. Die Basisvariante ist auch auf &lt;a href=&quot;https://github.com/itteco/iframely&quot;&gt;Github verfügbar&lt;/a&gt;. Der Online-Service bietet noch weitere Features, wenn man ein Bezahlmodell wählt.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://iframely.com/&quot;&gt;https://iframely.com/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;performance-tweak&quot;&gt;Performance Tweak&lt;a class=&quot;header-anchor&quot; href=&quot;#performance-tweak&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ein letzter Hinweis, wenn der iFrame onload nicht im Viewport ist, sollte man überlegen, ob man den iFrame mit einer Lazy Loading Technik verzögert lädt. Am Beispiel der &lt;a href=&quot;https://afarkas.github.io/lazysizes/&quot;&gt;lazySizes&lt;/a&gt; Bibliothek von Alex Farkas, ist das sehr einfach zu integrieren.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;iframe
  data-src=&amp;quot;//www.youtube.com/embed/ZfV-aYdU4uE&amp;quot;
  class=&amp;quot;lazyload&amp;quot; frameborder=&amp;quot;0&amp;quot; allowfullscreen&amp;gt;
&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die eigentliche Soure (src) wird durch „data-src“ ersetzt, zusätzlich mit der Klasse „lazyload“ versehen. Das Script lädt dann den iFrame beim Scrollen nach, wenn der iFrame sich den Viewport nähert.&lt;/p&gt;
&lt;p&gt;Das ist aber mehr oder weniger nur ein Zusatzfeature der Bibliothek - das Hauptaugenmerk liegt auf das Lazy Loading von Responsive Images (srcset/picture). Also durchaus eine Script, das man in vielerlei Hinsicht verwenden kann.&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-navigation-ux-2650.html&quot;&gt;Responsive Navigation aus UX-Sicht&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-tables-2393.html&quot;&gt;Responsive Tabellen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-svg-logos-2361.html&quot;&gt;Responsive SVG-Logos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html&quot;&gt;”CSS3 &amp;amp; Responsive Web” – CSS3 Adventskalender Tag 3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Content Source Order in RWD</title>
    <link href="https://maddesigns.de/archiv/content-source-order-in-responsive-webdesign-2577.html" />
    <updated>2015-03-23T07:01:53Z</updated>
    <id>https://maddesigns.de/archiv/content-source-order-in-responsive-webdesign-2577.html</id>
    <content type="html">&lt;h2 id=&quot;responsive-retrofitting-teil-2&quot;&gt;Responsive Retrofitting Teil 2&lt;a class=&quot;header-anchor&quot; href=&quot;#responsive-retrofitting-teil-2&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Diese kleine Serie gibt ein paar Beispiele, wie man ein paar knifflige Aufgaben beim „responsive-fähig-machen” einer Desktop-Seite lösen kann.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Wie schon in &lt;a href=&quot;https://maddesigns.de/archiv/responsive-tables-2393.html&quot; title=&quot;Responsive Tabellen&quot;&gt;Teil 1 zum Thema „Responsive Tabellen“&lt;/a&gt;, nochmals vorab der Hinweis, dass man bei einer umfangreicheren Seite mit neuer Code-Basis im Mobile-First-Modus starten sollte.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Ein häufiges Problem beim sogenannten „Responsive Retro Fitting”, also bestehende Desktop Webseiten „responsivefähig” zu machen, ist die visuelle Neuordnung von Inhalt, wenn man am bestehenden Markup nichts ändern kann/darf.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;strong&gt;Ein kleines Beispiel dafür:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Auf einer Desktopseite ist das User-Login-Formular in der „rechten” Spalte. Linearisiert man jetzt das Layout, so dass die Inhaltscontainer nicht mehr nebeneinander floaten, würde das Login-Formular erst unter dem Hauptinhalt kommen. Das kann ja durchaus so gewollt sein, meist möchte man aber das Login-Formular als ersten Inhaltsbereich auf der Seite sehen, um sich schnell einloggen zu können und nicht erst lange scrollen zu müssen.&lt;/p&gt;
&lt;p&gt;Ein anderes Beispiel: „Aktuelle News” in der rechten Spalte, News-Listenansicht in der „linken Spalte” – die aktuellen Nachrichten erwartet man in der Smartphone-Ansicht eher oberhalb der alten News.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein typisches Markup&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;!-- old desktop --&amp;gt;
&amp;lt;div class=&amp;quot;container&amp;quot;&amp;gt;
    &amp;lt;div class=&amp;quot;col-left&amp;quot;&amp;gt;
        left content
    &amp;lt;/div&amp;gt;
    &amp;lt;div class=&amp;quot;col-right&amp;quot;&amp;gt;
        right content
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Gesetzt den Fall, dass man die Elemente bereits fluide mit prozentualen Breiten ausgestattet hat, könnte man für kleine Bildschirme (wir nehmen hier kleiner als 600px an) folgendes CSS zuweisen um die Reihenfolge der Spalten zu verändern.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media screen and (max-width: 600px) {
  .container {
    display: table;
  }
  .col-left {
    display: table-footer-group;
  }
  .col-right {
    display: table-head-group;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hierbei kommt ein kleiner Trick zum Einsatz, der eigentlich für das Styling von Tabellen gedacht ist, nämlich das Setzen einer Display-Eigenschaft für Table-Head bzw. Table-Foot. Das ist zwar ein wenig dirty, aber es funktioniert.&lt;/p&gt;
&lt;p&gt;Dieser Trick wird von allen modernen Browsern verstanden, selbst der IE8 würde das machen – der bekommt aber normalerweise keine Smartphone-/Tablet-View, da nur auf Desktop-Geräten im Einsatz, wenn er überhaupt noch was bekommt…&lt;/p&gt;
&lt;p&gt;Allerdings begegnet uns hier ein kleines Problem – &lt;code&gt;table-footer-group&lt;/code&gt; nimmt kein &lt;code&gt;padding&lt;/code&gt; an, da es eigentlich nur als Container ohne Eigenschaften agiert.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Eine alternative Variante:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media screen and (max-width: 600px) {
    .container {
        display: table;
    }
    .col-left,.col-right {
        display: table-caption;
        padding: 1em;
    }
    .col-left {
        caption-side: bottom;
    }
    .col-right {
        caption-side: top;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wir nutzen hier wieder CSS-Eigenschaften, die für das Stylen von Datentabellen gedacht waren, &lt;code&gt;caption-side: top/bottom&lt;/code&gt; ist eigentlich für die Anordnung der Tabellenbeschreibung (&lt;code&gt;&amp;lt;caption&amp;gt;&lt;/code&gt;) gedacht. So ist es möglich den Spalten auch ein &lt;code&gt;padding&lt;/code&gt; zuweisen.&lt;/p&gt;
&lt;h2 id=&quot;anordnung-mit-flexbox&quot;&gt;Anordnung mit Flexbox&lt;a class=&quot;header-anchor&quot; href=&quot;#anordnung-mit-flexbox&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Besser geeignet und für solche Anwendungsfälle gedacht, ist die Eigenschaft &lt;code&gt;flex-direction: column-reverse&lt;/code&gt; im Flexbox-Kontext.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flexbox column-reverse Beispiel&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media screen and (max-width: 600px) {
    .container {
        display: flex;
        flex-direction: column-reverse;
    }
    .col-left,.col-right {
        padding: 1em;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hier werden die Elemente, die innerhalb des Container liegen als Spalte in umgekehrter Reihenfolge gestapelt. Die direkten Kindelemente vom Flexbox-Container (&lt;code&gt;display: flex/inline-flex&lt;/code&gt;) werden in ihrer Reihenfolge umgekehrt angezeigt.&lt;/p&gt;
&lt;p&gt;Angenommen man hat mehr als zwei Elemente, ist es ratsam mit der Flexbox-Eigenschaft &lt;code&gt;order&lt;/code&gt; zu arbeiten, um genauer definieren zu können, welche Spalte an welcher Stelle kommt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flexbox Order Beispiel: HTML&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;div class=&amp;quot;container&amp;quot;&amp;gt;
    &amp;lt;div class=&amp;quot;col-left&amp;quot;&amp;gt;
        left content
    &amp;lt;/div&amp;gt;
    &amp;lt;div class=&amp;quot;col-middle&amp;quot;&amp;gt;
        middle content
    &amp;lt;/div&amp;gt;
    &amp;lt;div class=&amp;quot;col-right&amp;quot;&amp;gt;
        right content
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media screen and (max-width: 600px) {
    .container {
        display: flex;
        flex-direction: column;
    }
    .col-left {
        order: 3;
    }
    .col-middle {
        order: 2;
    }
    .col-right {
        order: 1;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mit &lt;code&gt;order&lt;/code&gt; kann man ganz genau bestimmen welches Element wann kommt.&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;details class=&quot;baseline-indicator baseline-indicator--widely&quot; open&gt;
  &lt;summary&gt;
    &lt;span class=&quot;baseline-indicator__icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg viewBox=&quot;0 0 36 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M18 8L20 10L18 12L16 10L18 8Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M26 0L28 2L10 20L0 10L2 8L10 16L26 0Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M28 2L26 4L32 10L26 16L22 12L20 14L26 20L36 10L28 2Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M10 0L2 8L4 10L10 4L14 8L16 6L10 0Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__title&quot;&gt;Baseline &lt;span class=&quot;baseline-indicator__year&quot;&gt;2015&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__pill&quot;&gt;Widely available&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__browsers&quot;&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Blink (Chrome &amp;amp; Edge)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--chrome supported&quot; title=&quot;chrome 29&quot; role=&quot;img&quot; aria-label=&quot;chrome 29&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 260 260&quot;&gt;
  &lt;linearGradient id=&quot;a&quot; x1=&quot;145&quot; x2=&quot;34&quot; y1=&quot;253&quot; y2=&quot;61&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#1e8e3e&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#34a853&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;b&quot; x1=&quot;111&quot; x2=&quot;222&quot; y1=&quot;254&quot; y2=&quot;62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#fcc934&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#fbbc04&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;c&quot; x1=&quot;17&quot; x2=&quot;239&quot; y1=&quot;80&quot; y2=&quot;80&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#d93025&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ea4335&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;64&quot; fill=&quot;#fff&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#a)&quot; d=&quot;M96 183.4A63.7 63.7 0 0 1 72.6 160L17.2 64A128 128 0 0 0 128 256l55.4-96A64 64 0 0 1 96 183.4Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;url(#b)&quot; d=&quot;M192 128a63.7 63.7 0 0 1-8.6 32L128 256A128 128 0 0 0 238.9 64h-111a64 64 0 0 1 64 64Z&quot;&gt;&lt;/path&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;52&quot; fill=&quot;#1a73e8&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#c)&quot; d=&quot;M96 72.6a63.7 63.7 0 0 1 32-8.6h110.8a128 128 0 0 0-221.7 0l55.5 96A64 64 0 0 1 96 72.6Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--edge supported&quot; title=&quot;edge 12&quot; role=&quot;img&quot; aria-label=&quot;edge 12&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 256 256&quot;&gt;
	&lt;defs&gt;
		&lt;radialGradient id=&quot;edgeb&quot; cx=&quot;161.8&quot; cy=&quot;68.9&quot; r=&quot;95.4&quot; gradientTransform=&quot;matrix(1 0 0 -.95 0 248.8)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.7&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edged&quot; cx=&quot;-340.3&quot; cy=&quot;63&quot; r=&quot;143.2&quot; gradientTransform=&quot;matrix(.15 -.99 -.8 -.12 176.6 -125.4)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.8&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgee&quot; cx=&quot;113.4&quot; cy=&quot;570.2&quot; r=&quot;202.4&quot; gradientTransform=&quot;matrix(-.04 1 2.13 .08 -1179.5 -106.7)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#35c1f1&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.1&quot; stop-color=&quot;#34c1ed&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#2fc2df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#2bc3d2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#36c752&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgef&quot; cx=&quot;376.5&quot; cy=&quot;568&quot; r=&quot;97.3&quot; gradientTransform=&quot;matrix(.28 .96 .78 -.23 -303.8 -148.5)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#66eb6e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#66eb6e&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;edgea&quot; x1=&quot;63.3&quot; y1=&quot;84&quot; x2=&quot;241.7&quot; y2=&quot;84&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#0c59a4&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#114a8b&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;linearGradient id=&quot;edgec&quot; x1=&quot;157.3&quot; y1=&quot;161.4&quot; x2=&quot;46&quot; y2=&quot;40.1&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#1b9de2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#1595df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#0680d7&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#0078d4&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgea)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;isolation:isolate;opacity:.35;fill:url(#edgeb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgec)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;opacity:.41;fill:url(#edged);isolation:isolate&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgee)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgef)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Gecko (Firefox)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--firefox supported&quot; title=&quot;firefox 20&quot; role=&quot;img&quot; aria-label=&quot;firefox 20&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 512 512&quot;&gt;
	&lt;defs&gt;
		&lt;linearGradient id=&quot;ffa&quot; x1=&quot;446.9&quot; y1=&quot;76.85&quot; x2=&quot;47.94&quot; y2=&quot;461.77&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.05&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.22&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.37&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;radialGradient id=&quot;ffb&quot; cx=&quot;428.46&quot; cy=&quot;55.06&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#ffbd4f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.19&quot; stop-color=&quot;#ffac31&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ff9d17&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff563b&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#ff3750&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.71&quot; stop-color=&quot;#f5156c&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.78&quot; stop-color=&quot;#eb0878&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.86&quot; stop-color=&quot;#e50080&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffc&quot; cx=&quot;245.39&quot; cy=&quot;259.88&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#960e18&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#b11927&quot; stop-opacity=&quot;.74&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.43&quot; stop-color=&quot;#db293d&quot; stop-opacity=&quot;.34&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#f5334b&quot; stop-opacity=&quot;.09&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3750&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffd&quot; cx=&quot;305.8&quot; cy=&quot;-58.64&quot; r=&quot;362.96&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ffdc3e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ff9d12&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffe&quot; cx=&quot;189.98&quot; cy=&quot;390.75&quot; r=&quot;238.55&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#3a8ee6&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#5c79f0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.67&quot; stop-color=&quot;#9059ff&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#c139e6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;fff&quot; cx=&quot;252.16&quot; cy=&quot;201.25&quot; r=&quot;126.48&quot; gradientTransform=&quot;matrix(.97 -.24 .28 1.14 -48.36 31.43)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.21&quot; stop-color=&quot;#9059ff&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#8c4ff3&quot; stop-opacity=&quot;.06&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.75&quot; stop-color=&quot;#7716a8&quot; stop-opacity=&quot;.45&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.97&quot; stop-color=&quot;#6e008b&quot; stop-opacity=&quot;.6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffg&quot; cx=&quot;239.06&quot; cy=&quot;34.56&quot; r=&quot;171.62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#ffe226&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.12&quot; stop-color=&quot;#ffdb27&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ffc82a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#ffa930&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.73&quot; stop-color=&quot;#ff7e37&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.79&quot; stop-color=&quot;#ff7139&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffh&quot; cx=&quot;373.96&quot; cy=&quot;-74.29&quot; r=&quot;732.21&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.62&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.72&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffi&quot; cx=&quot;304.59&quot; cy=&quot;7.07&quot; r=&quot;536.37&quot; gradientTransform=&quot;matrix(.1 .99 -.65 .07 277.32 -296.33)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.06&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.36&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.45&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.57&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.74&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffj&quot; cx=&quot;235.02&quot; cy=&quot;98.12&quot; r=&quot;457.12&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.14&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.48&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.59&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.66&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffk&quot; cx=&quot;355.69&quot; cy=&quot;124.88&quot; r=&quot;500.32&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.09&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.23&quot; stop-color=&quot;#ffe141&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ffaf1e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.63&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;ffl&quot; x1=&quot;442.1&quot; y1=&quot;74.79&quot; x2=&quot;102.64&quot; y2=&quot;414.26&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.8&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.27&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.63&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.49&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.22&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.6&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5A120.27 120.27 0 0 0 182 159.05a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.08 12.7-2.37 15v.53A229.1 229.1 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-277 188.12c1.12.53 2.18 1.12 3.33 1.64l.16.1c-1.15-.56-2.32-1.14-3.48-1.74zm55-144.95zM454.9 179v-.23.26z&quot; fill=&quot;url(#ffa)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffc)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M361.92 194.62c.53.37 1 .74 1.5 1.11a130.49 130.49 0 0 0-22.32-29.12C266.4 91.91 321.52 4.63 330.81.19l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49z&quot; fill=&quot;url(#ffd)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#ffe)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#fff)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M170.83 151.06c1.95 1.26 3.55 2.32 5 3.29a111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71 1.13-.03 35.99-.66 53.52 10.74z&quot; fill=&quot;url(#ffg)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M18.22 261.45C36.77 371 136.1 454.71 248.85 457.91c104.37 2.95 171-57.63 198.58-116.73 17.8-38.21 30.16-100.72 7.48-162.2v-.46c0 .06 0 .14.05.4 8.52 55.67-19.79 109.6-64.05 146.07a7.3 7.3 0 0 0-.13.31c-86.25 70.23-168.78 42.37-185.49 31-1.16-.56-2.33-1.14-3.49-1.74-50.29-24-71.06-69.85-66.61-109.14-42.45 0-56.93-35.82-56.93-35.82s38.12-27.18 88.36-3.54c46.53 21.9 90.23 3.55 90.23 3.54-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7c-1.43-1-3-2-5-3.29-17.53-11.4-52.39-10.77-53.54-10.74h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.19.46-8.74 37.79-4.52 57.15z&quot; fill=&quot;url(#ffh)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M341.1 166.61a130.49 130.49 0 0 1 22.32 29.12 46.36 46.36 0 0 1 3.6 3C421.5 248.89 393 319.9 390.83 325c44.26-36.47 72.57-90.4 64.05-146.07-27.17-67.78-73.25-95.1-110.88-154.57-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09-9.3 4.44-64.42 91.72 10.28 166.42z&quot; fill=&quot;url(#ffi)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M367 198.68a46.36 46.36 0 0 0-3.6-3c-.49-.37-1-.74-1.5-1.11-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c16.71 11.4 99.24 39.26 185.49-31 0 0 .05-.13.13-.31C393 319.9 421.5 248.89 367 198.68z&quot; fill=&quot;url(#ffj)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M148.44 277.48s11.09-41.34 79.43-41.34c7.39 0 28.51-20.62 28.9-26.6s-43.7 18.36-90.23-3.54c-50.24-23.64-88.36 3.54-88.36 3.54s14.48 35.82 56.93 35.82c-4.45 39.29 16.32 85.1 66.61 109.14 1.12.53 2.18 1.12 3.33 1.64-29.35-15.14-53.58-43.84-56.61-78.66z&quot; fill=&quot;url(#ffk)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c-1.16-.56-2.33-1.14-3.49-1.74 1.12.53 2.18 1.12 3.33 1.64-29.41-15.17-53.64-43.87-56.67-78.69 0 0 11.09-41.34 79.43-41.34 7.39 0 28.51-20.62 28.9-26.6-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.49 12.85-2.77 15.15 0 .18 0-.17 0 0A278.84 278.84 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-23.84 12.34v.26z&quot; fill=&quot;url(#ffl)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;WebKit (Safari)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--safari supported&quot; title=&quot;safari 9&quot; role=&quot;img&quot; aria-label=&quot;safari 9&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 21 21&quot; fill=&quot;none&quot;&gt;&lt;g clip-path=&quot;url(#clip0_1510_9490)&quot;&gt;&lt;path opacity=&quot;0.53&quot; d=&quot;M19.5049 10.5241C19.5049 15.4499 15.2689 19.5325 10.2011 19.5325C5.13327 19.5325 0.897217 15.4499 0.897217 10.5241C0.897217 5.59835 5.13327 1.51575 10.2011 1.51575C15.2689 1.51575 19.5049 5.59835 19.5049 10.5241Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.8586 9.72878C19.8586 14.8543 15.4048 19.44 10.2005 19.44C4.99618 19.44 0.54248 14.8543 0.54248 9.72878C0.54248 4.60325 4.99618 0.0175781 10.2005 0.0175781C15.4048 0.0175781 19.8586 4.60325 19.8586 9.72878Z&quot; fill=&quot;url(#paint0_linear_1510_9490)&quot; stroke=&quot;#CDCDCD&quot; stroke-width=&quot;0.351543&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.1018 9.72868C19.1018 14.4178 15.0334 18.6789 10.2006 18.6789C5.36782 18.6789 1.29932 14.4178 1.29932 9.72868C1.29932 5.03955 5.36782 0.778442 10.2006 0.778442C15.0334 0.778442 19.1018 5.03955 19.1018 9.72868Z&quot; fill=&quot;url(#paint1_radial_1510_9490)&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M10.2004 1.24524C10.1285 1.24524 10.0706 1.30343 10.0706 1.37573V2.88089C10.0706 2.95319 10.1285 3.01138 10.2004 3.01138C10.2723 3.01138 10.3302 2.95319 10.3302 2.88089V1.37573C10.3302 1.30343 10.2723 1.24524 10.2004 1.24524Z&quot; fill=&quot;#F4F2F3&quot;&gt;&lt;/path&gt;&lt;g opacity=&quot;0.409&quot; filter=&quot;url(#filter0_f_1510_9490)&quot;&gt;&lt;path d=&quot;M16.2829 4.50916L9.18266 8.65714L4.69336 15.7635L11.2608 10.8722L16.2829 4.50916Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;path d=&quot;M11.218 10.8003L9.18286 8.65724L16.4024 3.77393L11.218 10.8003Z&quot; fill=&quot;#FF5150&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M11.2181 10.8003L9.18291 8.65723L3.99854 15.6836L11.2181 10.8003Z&quot; fill=&quot;#F1F1F1&quot;&gt;&lt;/path&gt;&lt;path opacity=&quot;0.243&quot; d=&quot;M3.99854 15.6836L11.2181 10.8003L16.4025 3.77393L3.99854 15.6836Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id=&quot;filter0_f_1510_9490&quot; x=&quot;2.14852&quot; y=&quot;1.96432&quot; width=&quot;16.6793&quot; height=&quot;16.3439&quot; filterUnits=&quot;userSpaceOnUse&quot; color-interpolation-filters=&quot;sRGB&quot;&gt;&lt;feFlood flood-opacity=&quot;0&quot; result=&quot;BackgroundImageFix&quot;&gt;&lt;/feFlood&gt;&lt;feBlend mode=&quot;normal&quot; in=&quot;SourceGraphic&quot; in2=&quot;BackgroundImageFix&quot; result=&quot;shape&quot;&gt;&lt;/feBlend&gt;&lt;feGaussianBlur stdDeviation=&quot;1.27242&quot; result=&quot;effect1_foregroundBlur_1510_9490&quot;&gt;&lt;/feGaussianBlur&gt;&lt;/filter&gt;&lt;linearGradient id=&quot;paint0_linear_1510_9490&quot; x1=&quot;10.2002&quot; y1=&quot;19.4398&quot; x2=&quot;10.2002&quot; y2=&quot;0.0175272&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop stop-color=&quot;#BDBDBD&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;white&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;radialGradient id=&quot;paint1_radial_1510_9490&quot; cx=&quot;0&quot; cy=&quot;0&quot; r=&quot;1&quot; gradientUnits=&quot;userSpaceOnUse&quot; gradientTransform=&quot;translate(10.2407 8.42362) scale(9.65803 9.71116)&quot;&gt;&lt;stop stop-color=&quot;#06C2E7&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.25&quot; stop-color=&quot;#0DB8EC&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.5&quot; stop-color=&quot;#12AEF1&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.75&quot; stop-color=&quot;#1F86F9&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#107DDD&quot;&gt;&lt;/stop&gt;&lt;/radialGradient&gt;&lt;clipPath id=&quot;clip0_1510_9490&quot;&gt;&lt;rect width=&quot;20.4&quot; height=&quot;20.4&quot; fill=&quot;white&quot; transform=&quot;translate(0.000488281)&quot;&gt;&lt;/rect&gt;&lt;/clipPath&gt;&lt;/defs&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/summary&gt;
  &lt;div class=&quot;baseline-indicator__body&quot;&gt;
    &lt;p&gt;Flexbox ist seit 2015 in allen gängigen Browsern verfügbar und gilt als stabil.&lt;/p&gt;
    &lt;a href=&quot;https://webstatus.dev/features/flexbox&quot; target=&quot;_blank&quot;&gt;Browser-Support auf webstatus.dev&lt;/a&gt;
  &lt;/div&gt;
&lt;/details&gt;
&lt;p&gt;Der Browser-Support für Flexbox ist mittlerweile sehr gut. Allerdings sollte man für ältere Browser, die eine ältere Spezifikation von Flexbox implementiert haben oder noch Vendor-Prefixe verwenden ( Android, iOS, IE10, … ) und die dementsprechenden Eigenschaften verwenden. Zudem sollte man auf die &lt;a href=&quot;https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs&quot; title=&quot;Flexbox Bugs&quot;&gt;Flexbugs-Liste&lt;/a&gt; ein Auge werfen, ob nicht ein Browser doch noch ein Bug mitliefert.&lt;/p&gt;
&lt;p&gt;Für die Generierung des alten Flexbox-Syntax mit Browser-Prefix empfehle ich &lt;a href=&quot;https://github.com/postcss/autoprefixer&quot; title=&quot;Autoprefixer PostCSS&quot;&gt;Autoprefixer&lt;/a&gt;. Wer Sass verwendet, aber kein Autoprefixer, dem sei das &lt;a href=&quot;https://github.com/mastastealth/sass-flex-mixin&quot; title=&quot;Flexbox Sass Mixin&quot;&gt;Flexbox Mixin&lt;/a&gt; ans Herz gelegt. Besser wäre aber Autoprefixer in seinen Workflow zu integrieren.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Happy Retrofitting!&lt;/em&gt;&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-navigation-ux-2650.html&quot;&gt;Responsive Navigation aus UX-Sicht&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-iframes-2417.html&quot;&gt;Responsive iFrames&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-imagemap-2194.html&quot;&gt;Responsive Imagemap&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-images-lazy-loading-2151.html&quot;&gt;Responsive Images – width/height-Attribute entfernen, lazy loading &amp;amp; padding-bottom Trick&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>CSS clip-path</title>
    <link href="https://maddesigns.de/archiv/css-clip-path-2514.html" />
    <updated>2014-12-01T07:00:22Z</updated>
    <id>https://maddesigns.de/archiv/css-clip-path-2514.html</id>
    <content type="html">&lt;p&gt;&lt;code&gt;clip-path&lt;/code&gt; ist eine neue CSS-Eigenschaft, die wie viele andere CSS3-Eigenschaften ebenfalls den Ursprung in SVG hat. Wie bei &lt;a href=&quot;https://maddesigns.de/archiv/css3-shapes-2451.html&quot; title=&quot;CSS Shapes – neue Formen braucht das Web&quot;&gt;&lt;code&gt;shapes-outside&lt;/code&gt;&lt;/a&gt; kann man &lt;a href=&quot;https://www.w3.org/TR/css-masking-1/#clipping-paths&quot;&gt;&lt;code&gt;clip-path&lt;/code&gt;&lt;/a&gt; über Pfadfunktionen wie &lt;code&gt;circle()&lt;/code&gt;, &lt;code&gt;ellipse()&lt;/code&gt;, &lt;code&gt;inset()&lt;/code&gt; oder &lt;code&gt;polygon()&lt;/code&gt; eine Form zuweisen, die dann das Bild oder den Container in der jeweiligen Form beschneiden. Alles, was außerhalb der definierten Form ist, wird entfernt und der Hintergrund des Elternelements erscheint.&lt;/p&gt;
&lt;p&gt;Die alte Eigenschaft &lt;code&gt;clip&lt;/code&gt; gibt es zwar schon länger in CSS, wurde jetzt aber überarbeitet spezifiziert. Der aktuelle Einsatz von &lt;code&gt;clip&lt;/code&gt; ist sicherlich ein anderer als ursprünglich angedacht. Meist nutzen Webworker &lt;code&gt;clip&lt;/code&gt; für barrierefreies Verstecken von Elementen wie &lt;code&gt;&amp;lt;input type=&amp;quot;radio&amp;quot; /&amp;gt;&lt;/code&gt; um ein Custom-Design zu integrieren und gleichzeitig die Browser-Funktionen zu erhalten. Die &lt;a href=&quot;https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css#L135&quot;&gt;HTML-Boilerplate&lt;/a&gt; nutzt dies in der &lt;code&gt;.visuallyhidden&lt;/code&gt; Definition.&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Ein Beispiel: &lt;a href=&quot;https://codepen.io/maddesigns/pen/jbiDn&quot; title=&quot;codepen clip hide demo&quot;&gt;https://codepen.io/maddesigns/pen/jbiDn&lt;/a&gt; (individuelle Form-Elemente)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Die alte Clip-Eigenschaft:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.clip-me {
	/* old:  absolute or fixed positioning required */
	position: absolute;
	/* deprecated version */
	clip: rect(110px, 160px, 170px, 60px);
	/* reset/default on deprecated version */
	clip: auto;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Diese neuen hilfreiche Funktionen sind nun hinzu gekommen:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.clip-me {
	/* reset/default on current version */
	clip-path: none;
	/* current version */
	clip-path: rect(110px, 160px, 170px, 60px);
	/* rounded rectangle */
	clip-path: inset(10% 10% 10% 10% round 20%, 20%);
	/* circle */
	clip-path: circle(30px at 35px 35px);
	/* ellipse */
	clip-path: ellipse(65px 30px at 125px 40px);
	/* polygon */
	clip-path: polygon(0% 0%, 100% 50%, 0% 100%, 0% 0%);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/pvJJJP&quot;&gt;Simple CSS Shapes demo – Codepen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Zudem können auch die bereits vorhandenen Formenausmaße als Clip-Path verwendet werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;clip-path: fill-box | stroke-box | view-box;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;clip-path-url-svg-vorlage-mit-clippath&quot;&gt;clip-path: url() – SVG-Vorlage mit &amp;lt;clipPath&amp;gt;&lt;a class=&quot;header-anchor&quot; href=&quot;#clip-path-url-svg-vorlage-mit-clippath&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Neben den einfachen Clip-Formen kann man auch umfangreiche Clip-Pfade, die in SVG definiert sind, verwenden. So können auch Bézierkurven verwendet werden, ganze Formen-Gruppen (&lt;code&gt;&amp;lt;rect&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;circle&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; etc.) oder auch Texte.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/SVG/Element/clipPath&quot; title=&quot;MDN-Referenz clipPath&quot;&gt;SVG clipPath MDN-Referenz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Diese definierten Formen können im Anschluss in CSS als URL referenziert werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.element {
	/* referencing path from (inline SVG) &amp;lt;clipPath&amp;gt; */
	clip-path: url(#clipPath);
	/* referencing path from external SVG */
	clip-path: url(img/path.svg#clipPath);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/yyNNbP&quot;&gt;CSS Shapes &amp;amp; responsive clipPath SVG image – Codepen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wenn sich die beschnittenen HTML-Elemente responsive verhalten sollen, muss man auf das in SVG angewendete Koordinatensystem acht geben. Gewöhnlicher Weise wird hier mit absoluten Pixelwerten gearbeitet, so dass sich Schnittmaske nicht mit skaliert. Durch &lt;code&gt;clipPathUnits=&amp;quot;objectBoundingBox&amp;quot;&lt;/code&gt; wird das Koordinatensystem so umgestellt, dass es sich relative zur viewBox verhält. Es ist also ratsam das Bild über &amp;lt;image&amp;gt; in SVG zu definieren und das komplette SVG inline in HTML zu integrieren.&lt;/p&gt;
&lt;h3 id=&quot;svg-mit-text&quot;&gt;SVG mit Text&lt;a class=&quot;header-anchor&quot; href=&quot;#svg-mit-text&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wie schon kurz erwähnt kann auch Text in SVG als Pfad- bzw. Beschnittform dienen. Über CSS @font-face ist es dann natürlich auch möglich den gewünschte Webfont nutzen. Die Positionierung kann manchmal etwas hakelig sein.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/qEddpw&quot;&gt;SVG clipPath text – Codepen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;animated-clip-path&quot;&gt;Animated clip-path&lt;a class=&quot;header-anchor&quot; href=&quot;#animated-clip-path&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die Beschnittpfade können auch animiert sein, bzw. auf Mouse-Aktionen Transitions durchführen. Wichtig ist dabei, dass die Knotenanzahl des Pfades gleich bleibt, sonst funktioniert die Animation nicht. Es ist also nicht möglich von einem Stern-Polygon zu einem Viereck zu animieren, die Knoten müssen alle erhalten bleiben und dementsprechend positioniert werden, dann geht’s.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;img {
	clip-path: polygon(0% 0%, 100% 50%, 0% 100%, 0% 0%);
	transition: clip-path 0.3s 0.1s;

	&amp;amp;:hover {
		clip-path: polygon(0% 0%, 100% 0%, 0% 100%, 0% 0%);
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Eine Animation kann auch direkt in SVG definiert sein. Es gibt aber teilweise große Performance-Unterschiede in den verschiedenen Browsern, also vorsichtig damit experimentieren.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.pencilscoop.com/demos/animating-svg-clipping-masks/&quot; title=&quot;Animated SVG clipping mask&quot;&gt;https://www.pencilscoop.com/demos/animating-svg-clipping-masks/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/xvipD&quot; title=&quot;animated clip path&quot;&gt;https://codepen.io/maddesigns/pen/xvipD&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;tools&quot;&gt;Tools&lt;a class=&quot;header-anchor&quot; href=&quot;#tools&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Um &lt;code&gt;clip-path&lt;/code&gt; zu experimentieren, hat Bennett Feely ein tolles Online-Tool entwickelt. Dort sind mehrere Formen bereits vordefiniert. Die Veränderung der Formen und die Auswirkung auf den CSS-Code ist schön umgesetzt. Ein weiteres Tool stammt von Alex Bylim – der Clip-Path-Generator.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bennettfeely.com/clippy/&quot; title=&quot;Clippy - CSS clip-path online tool&quot;&gt;https://bennettfeely.com/clippy/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://cssplant.com/clip-path-generator&quot; title=&quot;clip-path generator&quot;&gt;https://cssplant.com/clip-path-generator&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wie für CSS-Shapes, kann man auch für &lt;code&gt;clip-path&lt;/code&gt; die &lt;a href=&quot;https://chrome.google.com/webstore/detail/nenndldnbcncjmeacmnondmkkfedmgmp&quot;&gt;Chrome-Browser-Erweiterung&lt;/a&gt; nutzen, um in den Dev-Tools Formen hinzuzufügen oder zu verändern.&lt;/p&gt;
&lt;h4 id=&quot;browser-support&quot;&gt;Browser-Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Der Browser-Support sieht grundsätzlich, mit Abstrichen, ganz gut aus. Aber der aktuelle Standard ist noch nicht in allen Browsern verfügbar. Chrome/Opera und Safari unterstützen die erwähnten Form-Funktionen in &lt;code&gt;clip-path&lt;/code&gt;, allerdings mit -webkit-Präfix. Firefox unterstützt die Form-Funktionen leider noch nicht, aber die Variante mit &lt;code&gt;url(#clipPath)&lt;/code&gt;. Der Internet-Explorer unterstützt leider gar nichts davon. Hier müsste man das zu beschneidende Element (z.B. Bild) direkt in SVG einbinden, darauf anwenden und diesen SVG-Code inline ins HTML einfügen (Beipiel: &lt;a href=&quot;https://codepen.io/maddesigns/pen/kbqzu&quot; title=&quot;Responsive Image SVG clip-path&quot;&gt;https://codepen.io/maddesigns/pen/kbqzu&lt;/a&gt;). Dann funktioniert es auch dort.&lt;/p&gt;
&lt;p&gt;Der komplette Browser-Support:&lt;/p&gt;
&lt;details class=&quot;baseline-indicator baseline-indicator--widely&quot; open&gt;
  &lt;summary&gt;
    &lt;span class=&quot;baseline-indicator__icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg viewBox=&quot;0 0 36 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M18 8L20 10L18 12L16 10L18 8Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M26 0L28 2L10 20L0 10L2 8L10 16L26 0Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M28 2L26 4L32 10L26 16L22 12L20 14L26 20L36 10L28 2Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M10 0L2 8L4 10L10 4L14 8L16 6L10 0Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__title&quot;&gt;Baseline &lt;span class=&quot;baseline-indicator__year&quot;&gt;2021&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__pill&quot;&gt;Widely available&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__browsers&quot;&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Blink (Chrome &amp;amp; Edge)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--chrome supported&quot; title=&quot;chrome 88&quot; role=&quot;img&quot; aria-label=&quot;chrome 88&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 260 260&quot;&gt;
  &lt;linearGradient id=&quot;a&quot; x1=&quot;145&quot; x2=&quot;34&quot; y1=&quot;253&quot; y2=&quot;61&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#1e8e3e&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#34a853&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;b&quot; x1=&quot;111&quot; x2=&quot;222&quot; y1=&quot;254&quot; y2=&quot;62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#fcc934&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#fbbc04&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;c&quot; x1=&quot;17&quot; x2=&quot;239&quot; y1=&quot;80&quot; y2=&quot;80&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#d93025&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ea4335&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;64&quot; fill=&quot;#fff&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#a)&quot; d=&quot;M96 183.4A63.7 63.7 0 0 1 72.6 160L17.2 64A128 128 0 0 0 128 256l55.4-96A64 64 0 0 1 96 183.4Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;url(#b)&quot; d=&quot;M192 128a63.7 63.7 0 0 1-8.6 32L128 256A128 128 0 0 0 238.9 64h-111a64 64 0 0 1 64 64Z&quot;&gt;&lt;/path&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;52&quot; fill=&quot;#1a73e8&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#c)&quot; d=&quot;M96 72.6a63.7 63.7 0 0 1 32-8.6h110.8a128 128 0 0 0-221.7 0l55.5 96A64 64 0 0 1 96 72.6Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--edge supported&quot; title=&quot;edge 88&quot; role=&quot;img&quot; aria-label=&quot;edge 88&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 256 256&quot;&gt;
	&lt;defs&gt;
		&lt;radialGradient id=&quot;edgeb&quot; cx=&quot;161.8&quot; cy=&quot;68.9&quot; r=&quot;95.4&quot; gradientTransform=&quot;matrix(1 0 0 -.95 0 248.8)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.7&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edged&quot; cx=&quot;-340.3&quot; cy=&quot;63&quot; r=&quot;143.2&quot; gradientTransform=&quot;matrix(.15 -.99 -.8 -.12 176.6 -125.4)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.8&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgee&quot; cx=&quot;113.4&quot; cy=&quot;570.2&quot; r=&quot;202.4&quot; gradientTransform=&quot;matrix(-.04 1 2.13 .08 -1179.5 -106.7)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#35c1f1&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.1&quot; stop-color=&quot;#34c1ed&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#2fc2df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#2bc3d2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#36c752&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgef&quot; cx=&quot;376.5&quot; cy=&quot;568&quot; r=&quot;97.3&quot; gradientTransform=&quot;matrix(.28 .96 .78 -.23 -303.8 -148.5)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#66eb6e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#66eb6e&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;edgea&quot; x1=&quot;63.3&quot; y1=&quot;84&quot; x2=&quot;241.7&quot; y2=&quot;84&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#0c59a4&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#114a8b&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;linearGradient id=&quot;edgec&quot; x1=&quot;157.3&quot; y1=&quot;161.4&quot; x2=&quot;46&quot; y2=&quot;40.1&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#1b9de2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#1595df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#0680d7&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#0078d4&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgea)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;isolation:isolate;opacity:.35;fill:url(#edgeb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgec)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;opacity:.41;fill:url(#edged);isolation:isolate&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgee)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgef)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Gecko (Firefox)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--firefox supported&quot; title=&quot;firefox 71&quot; role=&quot;img&quot; aria-label=&quot;firefox 71&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 512 512&quot;&gt;
	&lt;defs&gt;
		&lt;linearGradient id=&quot;ffa&quot; x1=&quot;446.9&quot; y1=&quot;76.85&quot; x2=&quot;47.94&quot; y2=&quot;461.77&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.05&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.22&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.37&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;radialGradient id=&quot;ffb&quot; cx=&quot;428.46&quot; cy=&quot;55.06&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#ffbd4f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.19&quot; stop-color=&quot;#ffac31&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ff9d17&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff563b&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#ff3750&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.71&quot; stop-color=&quot;#f5156c&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.78&quot; stop-color=&quot;#eb0878&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.86&quot; stop-color=&quot;#e50080&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffc&quot; cx=&quot;245.39&quot; cy=&quot;259.88&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#960e18&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#b11927&quot; stop-opacity=&quot;.74&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.43&quot; stop-color=&quot;#db293d&quot; stop-opacity=&quot;.34&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#f5334b&quot; stop-opacity=&quot;.09&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3750&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffd&quot; cx=&quot;305.8&quot; cy=&quot;-58.64&quot; r=&quot;362.96&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ffdc3e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ff9d12&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffe&quot; cx=&quot;189.98&quot; cy=&quot;390.75&quot; r=&quot;238.55&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#3a8ee6&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#5c79f0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.67&quot; stop-color=&quot;#9059ff&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#c139e6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;fff&quot; cx=&quot;252.16&quot; cy=&quot;201.25&quot; r=&quot;126.48&quot; gradientTransform=&quot;matrix(.97 -.24 .28 1.14 -48.36 31.43)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.21&quot; stop-color=&quot;#9059ff&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#8c4ff3&quot; stop-opacity=&quot;.06&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.75&quot; stop-color=&quot;#7716a8&quot; stop-opacity=&quot;.45&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.97&quot; stop-color=&quot;#6e008b&quot; stop-opacity=&quot;.6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffg&quot; cx=&quot;239.06&quot; cy=&quot;34.56&quot; r=&quot;171.62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#ffe226&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.12&quot; stop-color=&quot;#ffdb27&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ffc82a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#ffa930&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.73&quot; stop-color=&quot;#ff7e37&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.79&quot; stop-color=&quot;#ff7139&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffh&quot; cx=&quot;373.96&quot; cy=&quot;-74.29&quot; r=&quot;732.21&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.62&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.72&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffi&quot; cx=&quot;304.59&quot; cy=&quot;7.07&quot; r=&quot;536.37&quot; gradientTransform=&quot;matrix(.1 .99 -.65 .07 277.32 -296.33)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.06&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.36&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.45&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.57&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.74&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffj&quot; cx=&quot;235.02&quot; cy=&quot;98.12&quot; r=&quot;457.12&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.14&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.48&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.59&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.66&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffk&quot; cx=&quot;355.69&quot; cy=&quot;124.88&quot; r=&quot;500.32&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.09&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.23&quot; stop-color=&quot;#ffe141&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ffaf1e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.63&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;ffl&quot; x1=&quot;442.1&quot; y1=&quot;74.79&quot; x2=&quot;102.64&quot; y2=&quot;414.26&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.8&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.27&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.63&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.49&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.22&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.6&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5A120.27 120.27 0 0 0 182 159.05a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.08 12.7-2.37 15v.53A229.1 229.1 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-277 188.12c1.12.53 2.18 1.12 3.33 1.64l.16.1c-1.15-.56-2.32-1.14-3.48-1.74zm55-144.95zM454.9 179v-.23.26z&quot; fill=&quot;url(#ffa)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffc)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M361.92 194.62c.53.37 1 .74 1.5 1.11a130.49 130.49 0 0 0-22.32-29.12C266.4 91.91 321.52 4.63 330.81.19l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49z&quot; fill=&quot;url(#ffd)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#ffe)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#fff)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M170.83 151.06c1.95 1.26 3.55 2.32 5 3.29a111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71 1.13-.03 35.99-.66 53.52 10.74z&quot; fill=&quot;url(#ffg)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M18.22 261.45C36.77 371 136.1 454.71 248.85 457.91c104.37 2.95 171-57.63 198.58-116.73 17.8-38.21 30.16-100.72 7.48-162.2v-.46c0 .06 0 .14.05.4 8.52 55.67-19.79 109.6-64.05 146.07a7.3 7.3 0 0 0-.13.31c-86.25 70.23-168.78 42.37-185.49 31-1.16-.56-2.33-1.14-3.49-1.74-50.29-24-71.06-69.85-66.61-109.14-42.45 0-56.93-35.82-56.93-35.82s38.12-27.18 88.36-3.54c46.53 21.9 90.23 3.55 90.23 3.54-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7c-1.43-1-3-2-5-3.29-17.53-11.4-52.39-10.77-53.54-10.74h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.19.46-8.74 37.79-4.52 57.15z&quot; fill=&quot;url(#ffh)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M341.1 166.61a130.49 130.49 0 0 1 22.32 29.12 46.36 46.36 0 0 1 3.6 3C421.5 248.89 393 319.9 390.83 325c44.26-36.47 72.57-90.4 64.05-146.07-27.17-67.78-73.25-95.1-110.88-154.57-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09-9.3 4.44-64.42 91.72 10.28 166.42z&quot; fill=&quot;url(#ffi)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M367 198.68a46.36 46.36 0 0 0-3.6-3c-.49-.37-1-.74-1.5-1.11-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c16.71 11.4 99.24 39.26 185.49-31 0 0 .05-.13.13-.31C393 319.9 421.5 248.89 367 198.68z&quot; fill=&quot;url(#ffj)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M148.44 277.48s11.09-41.34 79.43-41.34c7.39 0 28.51-20.62 28.9-26.6s-43.7 18.36-90.23-3.54c-50.24-23.64-88.36 3.54-88.36 3.54s14.48 35.82 56.93 35.82c-4.45 39.29 16.32 85.1 66.61 109.14 1.12.53 2.18 1.12 3.33 1.64-29.35-15.14-53.58-43.84-56.61-78.66z&quot; fill=&quot;url(#ffk)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c-1.16-.56-2.33-1.14-3.49-1.74 1.12.53 2.18 1.12 3.33 1.64-29.41-15.17-53.64-43.87-56.67-78.69 0 0 11.09-41.34 79.43-41.34 7.39 0 28.51-20.62 28.9-26.6-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.49 12.85-2.77 15.15 0 .18 0-.17 0 0A278.84 278.84 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-23.84 12.34v.26z&quot; fill=&quot;url(#ffl)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;WebKit (Safari)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--safari supported&quot; title=&quot;safari 13.1&quot; role=&quot;img&quot; aria-label=&quot;safari 13.1&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 21 21&quot; fill=&quot;none&quot;&gt;&lt;g clip-path=&quot;url(#clip0_1510_9490)&quot;&gt;&lt;path opacity=&quot;0.53&quot; d=&quot;M19.5049 10.5241C19.5049 15.4499 15.2689 19.5325 10.2011 19.5325C5.13327 19.5325 0.897217 15.4499 0.897217 10.5241C0.897217 5.59835 5.13327 1.51575 10.2011 1.51575C15.2689 1.51575 19.5049 5.59835 19.5049 10.5241Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.8586 9.72878C19.8586 14.8543 15.4048 19.44 10.2005 19.44C4.99618 19.44 0.54248 14.8543 0.54248 9.72878C0.54248 4.60325 4.99618 0.0175781 10.2005 0.0175781C15.4048 0.0175781 19.8586 4.60325 19.8586 9.72878Z&quot; fill=&quot;url(#paint0_linear_1510_9490)&quot; stroke=&quot;#CDCDCD&quot; stroke-width=&quot;0.351543&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.1018 9.72868C19.1018 14.4178 15.0334 18.6789 10.2006 18.6789C5.36782 18.6789 1.29932 14.4178 1.29932 9.72868C1.29932 5.03955 5.36782 0.778442 10.2006 0.778442C15.0334 0.778442 19.1018 5.03955 19.1018 9.72868Z&quot; fill=&quot;url(#paint1_radial_1510_9490)&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M10.2004 1.24524C10.1285 1.24524 10.0706 1.30343 10.0706 1.37573V2.88089C10.0706 2.95319 10.1285 3.01138 10.2004 3.01138C10.2723 3.01138 10.3302 2.95319 10.3302 2.88089V1.37573C10.3302 1.30343 10.2723 1.24524 10.2004 1.24524Z&quot; fill=&quot;#F4F2F3&quot;&gt;&lt;/path&gt;&lt;g opacity=&quot;0.409&quot; filter=&quot;url(#filter0_f_1510_9490)&quot;&gt;&lt;path d=&quot;M16.2829 4.50916L9.18266 8.65714L4.69336 15.7635L11.2608 10.8722L16.2829 4.50916Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;path d=&quot;M11.218 10.8003L9.18286 8.65724L16.4024 3.77393L11.218 10.8003Z&quot; fill=&quot;#FF5150&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M11.2181 10.8003L9.18291 8.65723L3.99854 15.6836L11.2181 10.8003Z&quot; fill=&quot;#F1F1F1&quot;&gt;&lt;/path&gt;&lt;path opacity=&quot;0.243&quot; d=&quot;M3.99854 15.6836L11.2181 10.8003L16.4025 3.77393L3.99854 15.6836Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id=&quot;filter0_f_1510_9490&quot; x=&quot;2.14852&quot; y=&quot;1.96432&quot; width=&quot;16.6793&quot; height=&quot;16.3439&quot; filterUnits=&quot;userSpaceOnUse&quot; color-interpolation-filters=&quot;sRGB&quot;&gt;&lt;feFlood flood-opacity=&quot;0&quot; result=&quot;BackgroundImageFix&quot;&gt;&lt;/feFlood&gt;&lt;feBlend mode=&quot;normal&quot; in=&quot;SourceGraphic&quot; in2=&quot;BackgroundImageFix&quot; result=&quot;shape&quot;&gt;&lt;/feBlend&gt;&lt;feGaussianBlur stdDeviation=&quot;1.27242&quot; result=&quot;effect1_foregroundBlur_1510_9490&quot;&gt;&lt;/feGaussianBlur&gt;&lt;/filter&gt;&lt;linearGradient id=&quot;paint0_linear_1510_9490&quot; x1=&quot;10.2002&quot; y1=&quot;19.4398&quot; x2=&quot;10.2002&quot; y2=&quot;0.0175272&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop stop-color=&quot;#BDBDBD&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;white&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;radialGradient id=&quot;paint1_radial_1510_9490&quot; cx=&quot;0&quot; cy=&quot;0&quot; r=&quot;1&quot; gradientUnits=&quot;userSpaceOnUse&quot; gradientTransform=&quot;translate(10.2407 8.42362) scale(9.65803 9.71116)&quot;&gt;&lt;stop stop-color=&quot;#06C2E7&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.25&quot; stop-color=&quot;#0DB8EC&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.5&quot; stop-color=&quot;#12AEF1&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.75&quot; stop-color=&quot;#1F86F9&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#107DDD&quot;&gt;&lt;/stop&gt;&lt;/radialGradient&gt;&lt;clipPath id=&quot;clip0_1510_9490&quot;&gt;&lt;rect width=&quot;20.4&quot; height=&quot;20.4&quot; fill=&quot;white&quot; transform=&quot;translate(0.000488281)&quot;&gt;&lt;/rect&gt;&lt;/clipPath&gt;&lt;/defs&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/summary&gt;
  &lt;div class=&quot;baseline-indicator__body&quot;&gt;
    &lt;p&gt;clip-path ist seit 2021 in allen gängigen Browsern verfügbar und gilt als stabil.&lt;/p&gt;
    &lt;a href=&quot;https://webstatus.dev/features/clip-path&quot; target=&quot;_blank&quot;&gt;Browser-Support auf webstatus.dev&lt;/a&gt;
  &lt;/div&gt;
&lt;/details&gt;
&lt;h3 id=&quot;empfohlene-blog-posts&quot;&gt;Empfohlene Blog Posts:&lt;a class=&quot;header-anchor&quot; href=&quot;#empfohlene-blog-posts&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sarasoueidan.com/blog/css-svg-clipping/&quot; title=&quot;CSS SVG Clipping by Sara Soueidan&quot;&gt;https://sarasoueidan.com/blog/css-svg-clipping/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.adobe.com/webplatform/2014/01/16/making-the-web-sweeter/&quot; title=&quot;Adobe making the web sweeter&quot;&gt;https://blogs.adobe.com/webplatform/2014/01/16/making-the-web-sweeter/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Das Schöne ist, das &lt;code&gt;clip-path&lt;/code&gt; auf alle möglichen Elemente angewandt werden kann, z.B. auch &lt;a href=&quot;https://codepen.io/yoksel/pen/oggRwR&quot;&gt;Videos&lt;/a&gt; oder Textblöcke, nicht nur Bilder. Zudem sind die Beschnittpfade animierbar und können dynamisch über JavaScript generiert werden. Mit den zusätzlichen Möglichkeiten von SVG, bleibt kaum ein Wunsch an Gestaltungsmöglichkeiten offen. Wenn jetzt nur noch der Browser-Support insgesamt besser würde…&lt;/p&gt;
&lt;h2 id=&quot;bonus-mask&quot;&gt;Bonus: Mask&lt;a class=&quot;header-anchor&quot; href=&quot;#bonus-mask&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Eine ähnliche Eigenschaft wie &lt;code&gt;clip-path&lt;/code&gt; ist &lt;code&gt;mask&lt;/code&gt;, was ebenfalls aus der SVG-Spezifikation her rührt. Neu ist die CSS-Eigenschaft ja eigentlich nicht, Safari (WebKit) hat &lt;code&gt;mask&lt;/code&gt; bereits 2008 in einem &lt;a href=&quot;https://www.webkit.org/blog/181/css-masks/&quot; title=&quot;Webkit Blog about CSS Mask&quot;&gt;Blog-Post&lt;/a&gt; beschrieben und Christian &lt;a href=&quot;https://twitter.com/derSchepp&quot; title=&quot;Christian Schaefer on twitter&quot;&gt;@derSchepp&lt;/a&gt; Schaefer beschrieb in seinem &lt;a href=&quot;https://thenittygritty.co/css-masking&quot; title=&quot;CSS Masking even for older Browsers&quot;&gt;Blog-Post&lt;/a&gt; wie man die &lt;code&gt;mask&lt;/code&gt;-Eigenschaft auch in alten IEs umsetzen kann. &lt;code&gt;mask&lt;/code&gt; kann man (halb-)transparente URLs zuweisen, wie bei &lt;code&gt;shape-outside&lt;/code&gt;. Im Unterschied zu &lt;code&gt;clip-path&lt;/code&gt; kann &lt;code&gt;&amp;lt;mask&amp;gt;&lt;/code&gt; auch halbtransparente Flächen beinhalten und somit das zu maskierende Element auch nur halbtransparent „beschneiden“.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.html5rocks.com/en/tutorials/masking/adobe/&quot; title=&quot;masking tutorial&quot;&gt;https://www.html5rocks.com/en/tutorials/masking/adobe/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://collidercreative.com/how-to-create-css-image-masks-for-the-web-with-svgs/&quot; title=&quot;How to create css image mask&quot;&gt;https://collidercreative.com/how-to-create-css-image-masks-for-the-web-with-svgs/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Einen Maske kann direkt in SVG definiert werden und dort natürlich alle Möglichkeiten nutzen. Unter Anderem könnte man auch Text als Maske benutzen, hier ein Beispiel:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/PwqYON&quot;&gt;SVG text mask – Codepen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Allerdings ist hier der Browser-Support nicht ganz so einfach zu lesen &lt;a href=&quot;https://caniuse.com/#feat=css-mask&quot; title=&quot;caniuse CSS Mask&quot;&gt;https://caniuse.com/#feat=css-mask&lt;/a&gt; da hier verschiedene Stufen der Spezifikation integriert sind.&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/sass-parent-selector-2741.html&quot;&gt;Sass Parent Selector – ‚&amp;amp;‘ (ampersand)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/postcss-plugins-2692.html&quot;&gt;Nützliche PostCSS-Module&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/flexbox-fallbacks-2670.html&quot;&gt;Flexbox Fallbacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-shapes-2451.html&quot;&gt;CSS Shapes – neue Formen braucht das Web&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>CSS Shapes – neue Formen braucht das Web</title>
    <link href="https://maddesigns.de/archiv/css3-shapes-2451.html" />
    <updated>2014-11-17T07:56:46Z</updated>
    <id>https://maddesigns.de/archiv/css3-shapes-2451.html</id>
    <content type="html">&lt;p&gt;Die Welt ist eine Scheibe und das Web ist eckig… so ungefähr könnte man anfangen um in das Thema einzusteigen. Aber ihr wisst ja, dass es anders ist.&lt;/p&gt;
&lt;p&gt;Nachdem wir mit CSS3 schon die Möglichkeit bekommen haben, die Ecken einer Box optisch abzurunden, bleibt natürlich eines offen – der Text bricht nach wie vor an der „geraden” Box-/Bildkante um, dass heißt er orientiert sich z.B. nicht an der Kante von border-radius, erst recht nicht am Inhalt des Bilds. Die eigentliche Box bleibt viereckig. Das ändert CSS-Shapes.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Mit der neuen Eigenschaft &lt;code&gt;shape-outside&lt;/code&gt;, die auf &lt;a href=&quot;https://webplatform.adobe.com/shapes/&quot; title=&quot;Adobe CSS Shapes&quot;&gt;Initiative von Adobe&lt;/a&gt; als W3C-Standard etabliert wurde, können nun geometrische Formen zu einer Box hinzugefügt werden, so dass sich der Textfluß an den Formen orientiert. Diese Formen (&lt;a href=&quot;https://www.w3.org/TR/css-shapes/&quot; title=&quot;W3C Spec&quot;&gt;Shapes&lt;/a&gt;) können mit folgenden Funktionen generiert werden:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;circle() – Kreis&lt;/li&gt;
&lt;li&gt;ellipse() – Ellipse (ovale Kreisform)&lt;/li&gt;
&lt;li&gt;inset() – orientiert sich an der Box&lt;/li&gt;
&lt;li&gt;polygon() – eigene Form mit mehreren Knotenpunkten&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;einfaches-beispiel-kaffeetasse-circle&quot;&gt;einfaches Beispiel Kaffeetasse – circle()&lt;a class=&quot;header-anchor&quot; href=&quot;#einfaches-beispiel-kaffeetasse-circle&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;img.coffeecup {
	float: right;
	width: 33%;
	shape-outside: circle(50%);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Beispiel-Grafik:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/e96v2ysQVh-630.avif&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/e96v2ysQVh-630.webp&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/e96v2ysQVh-630.png&quot; alt=&quot;Kaffeefleck rund&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;630&quot; height=&quot;321&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Noch einfacher – der Textfluss kann sich auch am Border-Box-Model orientieren, also z.B. falls dem Element &lt;code&gt;border-radius&lt;/code&gt; zugewiesen ist.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;shape-outside: margin-box | border-box | padding-box | content-box;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;shape-polygon&quot;&gt;Shape: polygon()&lt;a class=&quot;header-anchor&quot; href=&quot;#shape-polygon&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mit &lt;code&gt;polygon()&lt;/code&gt; kann man ein Form mit mehreren Knotenpunkten erstellen – allerdings keine Beziér-Kurven-Formen, sondern nur gerade Linien zwischen den Knotenpunkten. Aber klar… umso mehr Punkte, umso mehr könnte man eine Kreisform abbilden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;einfaches Beispiel: Dreckeckform&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.triangle {
	shape-outside: polygon(0 0, 100% 50%, 0% 100%);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/Er5PX-_kkO-417.avif&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/Er5PX-_kkO-417.webp&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/Er5PX-_kkO-417.png&quot; alt=&quot;Shape Polygon&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;417&quot; height=&quot;411&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Hier im Beispiel sind nur 3 Werte angegeben, polygon() braucht normal min. 4 Werte um die Form zu schließen, allerdings wird die Form immer zum Ausgangspunkt hin automatisch geschlossen. Deshalb funktioniert das Beispiel mit dem Pfeil trotzdem wie erwartet.)&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;shape-aus-bildvorlage-url&quot;&gt;Shape aus Bildvorlage – url()&lt;a class=&quot;header-anchor&quot; href=&quot;#shape-aus-bildvorlage-url&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Zudem kann aber auch ein URL-Asset, als Shape-Vorlage verwendet werden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Das wird dann wie folgt eingebunden:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;img {
	float: right;
	shape-outside: url(path/to/image-with-shape.png);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Klassisches Anwendungsbeispiel ist eine Vorlage wie diese:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/rjVcxM0mwK-600.avif&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/rjVcxM0mwK-600.webp&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/rjVcxM0mwK-600.png&quot; alt=&quot;iPhone 6&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;600&quot; height=&quot;450&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Ein Bild mit „transparenten” Flächen (bzw. der gleichen Hintergrundfarbe wie der Background). Hier wäre es doch praktisch, wenn der Text sich optimaler Weise an der „transparenten” Kante orientieren könnte.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;section class=&amp;quot;intro&amp;quot;&amp;gt;
	&amp;lt;h2&amp;gt;headline&amp;lt;/h2&amp;gt;
	&amp;lt;img src=&amp;quot;img/iphone6.jpg&amp;quot; height=&amp;quot;450&amp;quot; width=&amp;quot;600&amp;quot; alt=&amp;quot;new iPhone 6&amp;quot; /&amp;gt;
	&amp;lt;p&amp;gt;Lorem&amp;lt;/p&amp;gt;
	&amp;lt;p&amp;gt;Lorem&amp;lt;/p&amp;gt;
	&amp;lt;ul&amp;gt;
		&amp;lt;li&amp;gt;Lorem ipsum dolor sit amet.&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;Eius enim unde esse alias aut.&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;Aliquam mollitia itaque officiis ab blanditiis.&amp;lt;/li&amp;gt;
	&amp;lt;/ul&amp;gt;
&amp;lt;/section&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.intro img {
	float: right;
	shape-outside: url(img/iphone6.png);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Weitere Eigenschaften um den Fluss des Textes um das Shape-Bild zu verändern:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;shape-image-threshold: 0.5;
shape-margin: 1em;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;shape-margin&lt;/code&gt; dürfte klar sein – Abstand vom transparenten Bildkante nach außen.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;shape-image-threshold&lt;/code&gt; – Schwellenwert ab wann ein halbtransparenter Pixel als Shapes-Kante gilt. Ein Wert von 0.5 bedeutet, dass der Shape-Kantenverlauf an Pixeln mit mehr als 50% Deckung verläuft.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Live-Demo&lt;/strong&gt;&lt;/p&gt;
&lt;code-demo title=&quot;CSS Shapes url&quot; height=&quot;400&quot;&gt;
&lt;template data-lang=&quot;css&quot;&gt;
.intro img {
    float: right;
    shape-outside: url(img/iphone6.png);
}
&lt;/template&gt;
&lt;/code-demo&gt;
&lt;h2 id=&quot;shape-masken-bild-aus-photoshop-vorlage-erstellen&quot;&gt;Shape-Masken Bild aus Photoshop-Vorlage erstellen&lt;a class=&quot;header-anchor&quot; href=&quot;#shape-masken-bild-aus-photoshop-vorlage-erstellen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Recht einfach ist es, wenn man bereits eine freigestellte Grafik hat – z.B. in Photoshop auf einer transparenten Ebene. Beim Exportieren die Grafik reduziert man das Bild auf zwei (2) Farben und lässt Transparenz aktiviert. Fertig.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/-qluOIltbt-750.avif 750w, https://maddesigns.de/img/-qluOIltbt-986.avif 986w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/-qluOIltbt-750.webp 750w, https://maddesigns.de/img/-qluOIltbt-986.webp 986w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/-qluOIltbt-750.png&quot; alt=&quot;Photoshop Export&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;986&quot; height=&quot;710&quot; srcset=&quot;https://maddesigns.de/img/-qluOIltbt-750.png 750w, https://maddesigns.de/img/-qluOIltbt-986.png 986w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/RwXYsPdh-7-750.avif 750w, https://maddesigns.de/img/RwXYsPdh-7-986.avif 986w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/RwXYsPdh-7-750.webp 750w, https://maddesigns.de/img/RwXYsPdh-7-986.webp 986w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/RwXYsPdh-7-750.png&quot; alt=&quot;Photoshop Export&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;986&quot; height=&quot;710&quot; srcset=&quot;https://maddesigns.de/img/RwXYsPdh-7-750.png 750w, https://maddesigns.de/img/RwXYsPdh-7-986.png 986w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;unterstutzte-bildformate-fur-shape-outside-url&quot;&gt;Unterstützte Bildformate für &lt;code&gt;shape-outside: url()&lt;/code&gt;&lt;a class=&quot;header-anchor&quot; href=&quot;#unterstutzte-bildformate-fur-shape-outside-url&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;grundsätzlich wird jedes Format unterstützt&lt;/li&gt;
&lt;li&gt;bei animierten Bilder wird laut Spezifikation der erste Frame verwendet, funktioniert aber aktuell mit alles Frames&lt;/li&gt;
&lt;li&gt;Data URIs geht ebenfalls&lt;/li&gt;
&lt;li&gt;die Bilder müssen den gleichen Ursprung haben (same origin) oder die Nutzung muss durch CORS zugelassen werden &lt;em&gt;hatte ich Probleme bei Codepen-Beispielen&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;generierte Verläufe funktionieren ebenfalls, sowohl linear-gradient als auch radial-gradient&lt;/li&gt;
&lt;li&gt;in Zukunft noch mehr, wenn die CSS image Werte erweitert werden&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;shape-form-mit-chrome-devtools-erweiterung-erstellen&quot;&gt;Shape-Form mit Chrome-Devtools-Erweiterung erstellen&lt;a class=&quot;header-anchor&quot; href=&quot;#shape-form-mit-chrome-devtools-erweiterung-erstellen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Die Chrome-Erweiterung &lt;a href=&quot;https://chrome.google.com/webstore/detail/nenndldnbcncjmeacmnondmkkfedmgmp&quot;&gt;CSS-Shapes-Editor&lt;/a&gt; ermöglicht es in den Chrome-Developer-Tools einem Element eine Shape-Form hinzuzufügen.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/V0COVIZCvC-750.avif 750w, https://maddesigns.de/img/V0COVIZCvC-1500.avif 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/V0COVIZCvC-750.webp 750w, https://maddesigns.de/img/V0COVIZCvC-1500.webp 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/V0COVIZCvC-750.png&quot; alt=&quot;Chrome Extention&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1500&quot; height=&quot;599&quot; srcset=&quot;https://maddesigns.de/img/V0COVIZCvC-750.png 750w, https://maddesigns.de/img/V0COVIZCvC-1500.png 1500w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h2 id=&quot;probleme&quot;&gt;Probleme:&lt;a class=&quot;header-anchor&quot; href=&quot;#probleme&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CSS-Shapes ist eine Technik, die sich schwerlich in ein CMS integrieren lässt, wie ich finde. Nicht dass es nicht möglich ist, aber es verlangt den Redakteuren ein erhöhtes Mehrwissen ab. Ich sehe den Einsatz eher auf speziellen (statischen) Seiten. Sicherlich ist es möglich ein Tool zu bauen um Polygone zu editieren bzw. zu erstellen, lieber würde ich aber ein schönes Admin-Tool für Responsive Art-Direction Images sehen. Zudem muss dynamisches CSS generiert werden, bzw. Inline-Styles, was natürlich nicht das optimalste ist.&lt;/li&gt;
&lt;li&gt;Aktuell können CSS-Shapes nur auf Elemente, die floaten angewandt werden, nicht aber auf Hintergrundbilder. Bedeutet also, die &amp;lt;img /&amp;gt;müssen, auch wenn es nur dekorierende Bilder sein sollten, ins Markup eingebunden werden. Wenn zudem ein Shape-Bild verwendet wird, dann werden zwei Bilder geladen. Hier sollte man auf die Performance acht geben, dass nicht zu viele Daten geladen werden. Das zusätzliche Shape-Bild ist sicherlich recht klein, aber der zusätzliche Request ist natürlich unschön. Es könnte auch ein und dasselbe transparente PNG24 für die Darstellung und die Form verwendet werden, aber hierbei wird das Bild leider trotzdem 2x geladen (quasi 1x von HTML &amp;amp; 1x von CSS).&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;p&gt;Linktipp: wer bei transparenten PNG-Bilder die Datenmenge reduzieren will – und das sollte jeder tun – dem sei &lt;a href=&quot;https://pngmini.com/&quot; title=&quot;PNG Mini&quot;&gt;pngmini.com&lt;/a&gt; oder &lt;a href=&quot;https://tinypng.com/&quot; title=&quot;Tiny PNG&quot;&gt;tinypng.com&lt;/a&gt; ans Herz gelegt.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/css-shapes/demo/css-shapes-demo.html&quot;&gt;Shapes circle() &amp;amp; url() Beispiel&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;details class=&quot;baseline-indicator baseline-indicator--widely&quot; open&gt;
  &lt;summary&gt;
    &lt;span class=&quot;baseline-indicator__icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg viewBox=&quot;0 0 36 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M18 8L20 10L18 12L16 10L18 8Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M26 0L28 2L10 20L0 10L2 8L10 16L26 0Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M28 2L26 4L32 10L26 16L22 12L20 14L26 20L36 10L28 2Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M10 0L2 8L4 10L10 4L14 8L16 6L10 0Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__title&quot;&gt;Baseline &lt;span class=&quot;baseline-indicator__year&quot;&gt;2020&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__pill&quot;&gt;Widely available&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__browsers&quot;&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Blink (Chrome &amp;amp; Edge)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--chrome supported&quot; title=&quot;chrome 37&quot; role=&quot;img&quot; aria-label=&quot;chrome 37&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 260 260&quot;&gt;
  &lt;linearGradient id=&quot;a&quot; x1=&quot;145&quot; x2=&quot;34&quot; y1=&quot;253&quot; y2=&quot;61&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#1e8e3e&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#34a853&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;b&quot; x1=&quot;111&quot; x2=&quot;222&quot; y1=&quot;254&quot; y2=&quot;62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#fcc934&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#fbbc04&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;c&quot; x1=&quot;17&quot; x2=&quot;239&quot; y1=&quot;80&quot; y2=&quot;80&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#d93025&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ea4335&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;64&quot; fill=&quot;#fff&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#a)&quot; d=&quot;M96 183.4A63.7 63.7 0 0 1 72.6 160L17.2 64A128 128 0 0 0 128 256l55.4-96A64 64 0 0 1 96 183.4Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;url(#b)&quot; d=&quot;M192 128a63.7 63.7 0 0 1-8.6 32L128 256A128 128 0 0 0 238.9 64h-111a64 64 0 0 1 64 64Z&quot;&gt;&lt;/path&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;52&quot; fill=&quot;#1a73e8&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#c)&quot; d=&quot;M96 72.6a63.7 63.7 0 0 1 32-8.6h110.8a128 128 0 0 0-221.7 0l55.5 96A64 64 0 0 1 96 72.6Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--edge supported&quot; title=&quot;edge 79&quot; role=&quot;img&quot; aria-label=&quot;edge 79&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 256 256&quot;&gt;
	&lt;defs&gt;
		&lt;radialGradient id=&quot;edgeb&quot; cx=&quot;161.8&quot; cy=&quot;68.9&quot; r=&quot;95.4&quot; gradientTransform=&quot;matrix(1 0 0 -.95 0 248.8)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.7&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edged&quot; cx=&quot;-340.3&quot; cy=&quot;63&quot; r=&quot;143.2&quot; gradientTransform=&quot;matrix(.15 -.99 -.8 -.12 176.6 -125.4)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.8&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgee&quot; cx=&quot;113.4&quot; cy=&quot;570.2&quot; r=&quot;202.4&quot; gradientTransform=&quot;matrix(-.04 1 2.13 .08 -1179.5 -106.7)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#35c1f1&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.1&quot; stop-color=&quot;#34c1ed&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#2fc2df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#2bc3d2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#36c752&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgef&quot; cx=&quot;376.5&quot; cy=&quot;568&quot; r=&quot;97.3&quot; gradientTransform=&quot;matrix(.28 .96 .78 -.23 -303.8 -148.5)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#66eb6e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#66eb6e&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;edgea&quot; x1=&quot;63.3&quot; y1=&quot;84&quot; x2=&quot;241.7&quot; y2=&quot;84&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#0c59a4&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#114a8b&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;linearGradient id=&quot;edgec&quot; x1=&quot;157.3&quot; y1=&quot;161.4&quot; x2=&quot;46&quot; y2=&quot;40.1&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#1b9de2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#1595df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#0680d7&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#0078d4&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgea)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;isolation:isolate;opacity:.35;fill:url(#edgeb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgec)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;opacity:.41;fill:url(#edged);isolation:isolate&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgee)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgef)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Gecko (Firefox)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--firefox supported&quot; title=&quot;firefox 54&quot; role=&quot;img&quot; aria-label=&quot;firefox 54&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 512 512&quot;&gt;
	&lt;defs&gt;
		&lt;linearGradient id=&quot;ffa&quot; x1=&quot;446.9&quot; y1=&quot;76.85&quot; x2=&quot;47.94&quot; y2=&quot;461.77&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.05&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.22&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.37&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;radialGradient id=&quot;ffb&quot; cx=&quot;428.46&quot; cy=&quot;55.06&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#ffbd4f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.19&quot; stop-color=&quot;#ffac31&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ff9d17&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff563b&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#ff3750&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.71&quot; stop-color=&quot;#f5156c&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.78&quot; stop-color=&quot;#eb0878&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.86&quot; stop-color=&quot;#e50080&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffc&quot; cx=&quot;245.39&quot; cy=&quot;259.88&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#960e18&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#b11927&quot; stop-opacity=&quot;.74&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.43&quot; stop-color=&quot;#db293d&quot; stop-opacity=&quot;.34&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#f5334b&quot; stop-opacity=&quot;.09&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3750&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffd&quot; cx=&quot;305.8&quot; cy=&quot;-58.64&quot; r=&quot;362.96&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ffdc3e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ff9d12&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffe&quot; cx=&quot;189.98&quot; cy=&quot;390.75&quot; r=&quot;238.55&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#3a8ee6&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#5c79f0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.67&quot; stop-color=&quot;#9059ff&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#c139e6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;fff&quot; cx=&quot;252.16&quot; cy=&quot;201.25&quot; r=&quot;126.48&quot; gradientTransform=&quot;matrix(.97 -.24 .28 1.14 -48.36 31.43)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.21&quot; stop-color=&quot;#9059ff&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#8c4ff3&quot; stop-opacity=&quot;.06&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.75&quot; stop-color=&quot;#7716a8&quot; stop-opacity=&quot;.45&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.97&quot; stop-color=&quot;#6e008b&quot; stop-opacity=&quot;.6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffg&quot; cx=&quot;239.06&quot; cy=&quot;34.56&quot; r=&quot;171.62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#ffe226&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.12&quot; stop-color=&quot;#ffdb27&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ffc82a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#ffa930&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.73&quot; stop-color=&quot;#ff7e37&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.79&quot; stop-color=&quot;#ff7139&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffh&quot; cx=&quot;373.96&quot; cy=&quot;-74.29&quot; r=&quot;732.21&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.62&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.72&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffi&quot; cx=&quot;304.59&quot; cy=&quot;7.07&quot; r=&quot;536.37&quot; gradientTransform=&quot;matrix(.1 .99 -.65 .07 277.32 -296.33)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.06&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.36&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.45&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.57&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.74&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffj&quot; cx=&quot;235.02&quot; cy=&quot;98.12&quot; r=&quot;457.12&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.14&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.48&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.59&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.66&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffk&quot; cx=&quot;355.69&quot; cy=&quot;124.88&quot; r=&quot;500.32&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.09&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.23&quot; stop-color=&quot;#ffe141&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ffaf1e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.63&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;ffl&quot; x1=&quot;442.1&quot; y1=&quot;74.79&quot; x2=&quot;102.64&quot; y2=&quot;414.26&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.8&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.27&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.63&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.49&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.22&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.6&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5A120.27 120.27 0 0 0 182 159.05a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.08 12.7-2.37 15v.53A229.1 229.1 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-277 188.12c1.12.53 2.18 1.12 3.33 1.64l.16.1c-1.15-.56-2.32-1.14-3.48-1.74zm55-144.95zM454.9 179v-.23.26z&quot; fill=&quot;url(#ffa)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffc)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M361.92 194.62c.53.37 1 .74 1.5 1.11a130.49 130.49 0 0 0-22.32-29.12C266.4 91.91 321.52 4.63 330.81.19l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49z&quot; fill=&quot;url(#ffd)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#ffe)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#fff)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M170.83 151.06c1.95 1.26 3.55 2.32 5 3.29a111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71 1.13-.03 35.99-.66 53.52 10.74z&quot; fill=&quot;url(#ffg)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M18.22 261.45C36.77 371 136.1 454.71 248.85 457.91c104.37 2.95 171-57.63 198.58-116.73 17.8-38.21 30.16-100.72 7.48-162.2v-.46c0 .06 0 .14.05.4 8.52 55.67-19.79 109.6-64.05 146.07a7.3 7.3 0 0 0-.13.31c-86.25 70.23-168.78 42.37-185.49 31-1.16-.56-2.33-1.14-3.49-1.74-50.29-24-71.06-69.85-66.61-109.14-42.45 0-56.93-35.82-56.93-35.82s38.12-27.18 88.36-3.54c46.53 21.9 90.23 3.55 90.23 3.54-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7c-1.43-1-3-2-5-3.29-17.53-11.4-52.39-10.77-53.54-10.74h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.19.46-8.74 37.79-4.52 57.15z&quot; fill=&quot;url(#ffh)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M341.1 166.61a130.49 130.49 0 0 1 22.32 29.12 46.36 46.36 0 0 1 3.6 3C421.5 248.89 393 319.9 390.83 325c44.26-36.47 72.57-90.4 64.05-146.07-27.17-67.78-73.25-95.1-110.88-154.57-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09-9.3 4.44-64.42 91.72 10.28 166.42z&quot; fill=&quot;url(#ffi)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M367 198.68a46.36 46.36 0 0 0-3.6-3c-.49-.37-1-.74-1.5-1.11-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c16.71 11.4 99.24 39.26 185.49-31 0 0 .05-.13.13-.31C393 319.9 421.5 248.89 367 198.68z&quot; fill=&quot;url(#ffj)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M148.44 277.48s11.09-41.34 79.43-41.34c7.39 0 28.51-20.62 28.9-26.6s-43.7 18.36-90.23-3.54c-50.24-23.64-88.36 3.54-88.36 3.54s14.48 35.82 56.93 35.82c-4.45 39.29 16.32 85.1 66.61 109.14 1.12.53 2.18 1.12 3.33 1.64-29.35-15.14-53.58-43.84-56.61-78.66z&quot; fill=&quot;url(#ffk)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c-1.16-.56-2.33-1.14-3.49-1.74 1.12.53 2.18 1.12 3.33 1.64-29.41-15.17-53.64-43.87-56.67-78.69 0 0 11.09-41.34 79.43-41.34 7.39 0 28.51-20.62 28.9-26.6-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.49 12.85-2.77 15.15 0 .18 0-.17 0 0A278.84 278.84 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-23.84 12.34v.26z&quot; fill=&quot;url(#ffl)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;WebKit (Safari)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--safari supported&quot; title=&quot;safari 10.1&quot; role=&quot;img&quot; aria-label=&quot;safari 10.1&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 21 21&quot; fill=&quot;none&quot;&gt;&lt;g clip-path=&quot;url(#clip0_1510_9490)&quot;&gt;&lt;path opacity=&quot;0.53&quot; d=&quot;M19.5049 10.5241C19.5049 15.4499 15.2689 19.5325 10.2011 19.5325C5.13327 19.5325 0.897217 15.4499 0.897217 10.5241C0.897217 5.59835 5.13327 1.51575 10.2011 1.51575C15.2689 1.51575 19.5049 5.59835 19.5049 10.5241Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.8586 9.72878C19.8586 14.8543 15.4048 19.44 10.2005 19.44C4.99618 19.44 0.54248 14.8543 0.54248 9.72878C0.54248 4.60325 4.99618 0.0175781 10.2005 0.0175781C15.4048 0.0175781 19.8586 4.60325 19.8586 9.72878Z&quot; fill=&quot;url(#paint0_linear_1510_9490)&quot; stroke=&quot;#CDCDCD&quot; stroke-width=&quot;0.351543&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.1018 9.72868C19.1018 14.4178 15.0334 18.6789 10.2006 18.6789C5.36782 18.6789 1.29932 14.4178 1.29932 9.72868C1.29932 5.03955 5.36782 0.778442 10.2006 0.778442C15.0334 0.778442 19.1018 5.03955 19.1018 9.72868Z&quot; fill=&quot;url(#paint1_radial_1510_9490)&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M10.2004 1.24524C10.1285 1.24524 10.0706 1.30343 10.0706 1.37573V2.88089C10.0706 2.95319 10.1285 3.01138 10.2004 3.01138C10.2723 3.01138 10.3302 2.95319 10.3302 2.88089V1.37573C10.3302 1.30343 10.2723 1.24524 10.2004 1.24524Z&quot; fill=&quot;#F4F2F3&quot;&gt;&lt;/path&gt;&lt;g opacity=&quot;0.409&quot; filter=&quot;url(#filter0_f_1510_9490)&quot;&gt;&lt;path d=&quot;M16.2829 4.50916L9.18266 8.65714L4.69336 15.7635L11.2608 10.8722L16.2829 4.50916Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;path d=&quot;M11.218 10.8003L9.18286 8.65724L16.4024 3.77393L11.218 10.8003Z&quot; fill=&quot;#FF5150&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M11.2181 10.8003L9.18291 8.65723L3.99854 15.6836L11.2181 10.8003Z&quot; fill=&quot;#F1F1F1&quot;&gt;&lt;/path&gt;&lt;path opacity=&quot;0.243&quot; d=&quot;M3.99854 15.6836L11.2181 10.8003L16.4025 3.77393L3.99854 15.6836Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id=&quot;filter0_f_1510_9490&quot; x=&quot;2.14852&quot; y=&quot;1.96432&quot; width=&quot;16.6793&quot; height=&quot;16.3439&quot; filterUnits=&quot;userSpaceOnUse&quot; color-interpolation-filters=&quot;sRGB&quot;&gt;&lt;feFlood flood-opacity=&quot;0&quot; result=&quot;BackgroundImageFix&quot;&gt;&lt;/feFlood&gt;&lt;feBlend mode=&quot;normal&quot; in=&quot;SourceGraphic&quot; in2=&quot;BackgroundImageFix&quot; result=&quot;shape&quot;&gt;&lt;/feBlend&gt;&lt;feGaussianBlur stdDeviation=&quot;1.27242&quot; result=&quot;effect1_foregroundBlur_1510_9490&quot;&gt;&lt;/feGaussianBlur&gt;&lt;/filter&gt;&lt;linearGradient id=&quot;paint0_linear_1510_9490&quot; x1=&quot;10.2002&quot; y1=&quot;19.4398&quot; x2=&quot;10.2002&quot; y2=&quot;0.0175272&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop stop-color=&quot;#BDBDBD&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;white&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;radialGradient id=&quot;paint1_radial_1510_9490&quot; cx=&quot;0&quot; cy=&quot;0&quot; r=&quot;1&quot; gradientUnits=&quot;userSpaceOnUse&quot; gradientTransform=&quot;translate(10.2407 8.42362) scale(9.65803 9.71116)&quot;&gt;&lt;stop stop-color=&quot;#06C2E7&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.25&quot; stop-color=&quot;#0DB8EC&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.5&quot; stop-color=&quot;#12AEF1&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.75&quot; stop-color=&quot;#1F86F9&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#107DDD&quot;&gt;&lt;/stop&gt;&lt;/radialGradient&gt;&lt;clipPath id=&quot;clip0_1510_9490&quot;&gt;&lt;rect width=&quot;20.4&quot; height=&quot;20.4&quot; fill=&quot;white&quot; transform=&quot;translate(0.000488281)&quot;&gt;&lt;/rect&gt;&lt;/clipPath&gt;&lt;/defs&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/summary&gt;
  &lt;div class=&quot;baseline-indicator__body&quot;&gt;
    &lt;p&gt;shapes ist seit 2020 in allen gängigen Browsern verfügbar und gilt als stabil.&lt;/p&gt;
    &lt;a href=&quot;https://webstatus.dev/features/shapes&quot; target=&quot;_blank&quot;&gt;Browser-Support auf webstatus.dev&lt;/a&gt;
  &lt;/div&gt;
&lt;/details&gt;
&lt;p&gt;Der Fallback ist das was man bereits kennt, also im Moment ist das Feature ein Enhancement. Es gibt zwar ein &lt;a href=&quot;https://github.com/adobe-webplatform/css-shapes-polyfill&quot;&gt;Polyfill&lt;/a&gt;, den würde ich aber nicht einsetzen, wenn es sich nicht vermeiden lässt, denn der Polyfill generiert in nicht unterstützten Browsers massig zusätzlichen Code, dass geht natürlich zu Lasten der Scroll-Performance.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/6zhd3uPFPG-750.avif 750w, https://maddesigns.de/img/6zhd3uPFPG-1406.avif 1406w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/6zhd3uPFPG-750.webp 750w, https://maddesigns.de/img/6zhd3uPFPG-1406.webp 1406w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/6zhd3uPFPG-750.png&quot; alt=&quot;Shapes Polyfill&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1406&quot; height=&quot;935&quot; srcset=&quot;https://maddesigns.de/img/6zhd3uPFPG-750.png 750w, https://maddesigns.de/img/6zhd3uPFPG-1406.png 1406w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.adobe.com/webplatform/2014/05/12/css-shapes-polyfill/&quot;&gt;Adobe Blogartikel über den CSS Shapes Polyfill&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Man kann dieses Feature natürlich auch mit der nativen CSS-Methode &lt;code&gt;@supports&lt;/code&gt; einbinden.&lt;/p&gt;
&lt;h3 id=&quot;supports-feature-query&quot;&gt;@supports feature query&lt;a class=&quot;header-anchor&quot; href=&quot;#supports-feature-query&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@supports (shape-outside: circle(50%)) {
	/* styles only for browsers which support CSS Shapes */
	.element {
		shape-outside: circle(50%);
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/mAIsl&quot;&gt;Responsive CSS Shapes Google Map – Codepen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ärgerlich ist, dass Safari &lt;code&gt;@supports&lt;/code&gt; nicht unterstützt, so dass hier &lt;code&gt;shape-outside&lt;/code&gt; nicht angezeigt würde obwohl Safari die Eigenschaft ja unterstützt. Also doch wieder &lt;code&gt;Modernizr&lt;/code&gt; Feature-Detection.&lt;/p&gt;
&lt;h3 id=&quot;shape-inside&quot;&gt;shape-inside()&lt;a class=&quot;header-anchor&quot; href=&quot;#shape-inside&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die Eigenschaft &lt;code&gt;shape-inside()&lt;/code&gt;, die in manchen Tutorials genannt wurde, wird es zunächst erstmal nicht geben. Mit &lt;code&gt;shape-inside&lt;/code&gt; soll es möglich sein, die eigene Form einer (Text-)Box zu manipulieren. Das ist dann praktisch, wenn man &lt;code&gt;background-image&lt;/code&gt; auf einer Box verwendet. Das ist allerdings nicht ganz trivial in Browser zu integrieren, da auch Eigenschaften wie &lt;code&gt;position: absolute&lt;/code&gt;, &lt;code&gt;flexbox&lt;/code&gt; &amp;amp; Co. berücksichtigt werden müssten, was nicht so trivial ist.&lt;/p&gt;
&lt;h2 id=&quot;codepen-collection&quot;&gt;Codepen-Collection&lt;a class=&quot;header-anchor&quot; href=&quot;#codepen-collection&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/QwGMVG_gVi-750.avif 750w, https://maddesigns.de/img/QwGMVG_gVi-1412.avif 1412w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/QwGMVG_gVi-750.webp 750w, https://maddesigns.de/img/QwGMVG_gVi-1412.webp 1412w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/QwGMVG_gVi-750.png&quot; alt=&quot;Codepen Collection&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1412&quot; height=&quot;403&quot; srcset=&quot;https://maddesigns.de/img/QwGMVG_gVi-750.png 750w, https://maddesigns.de/img/QwGMVG_gVi-1412.png 1412w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Auf codepen.io habe ich unterschiedlichste &lt;a href=&quot;https://codepen.io/collection/XydgVA/&quot;&gt;Beispiele&lt;/a&gt; zusammengestellt. Einige ganz simple, andere mit Fallback für nicht unterstützte Browser.&lt;/p&gt;
&lt;h2 id=&quot;weitere-informationen-blog-posts&quot;&gt;Weitere Informationen / Blog-Posts&lt;a class=&quot;header-anchor&quot; href=&quot;#weitere-informationen-blog-posts&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://alistapart.com/article/css-shapes-101&quot; title=&quot;CSS Shapes 101 by Sara Soueidan&quot;&gt;CSS Shapes 101&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sarasoueidan.com/blog/css-shapes/&quot; title=&quot;Creating Non-Rectangular Layouts With CSS Shapes by Sara Soueidan&quot;&gt;Creating Non-Rectangular Layouts With CSS Shapes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sitepoint.com/css-shapes-breaking-rectangular-design/&quot; title=&quot;CSS Shapes: Breaking the Rectangular Design Shackles by Patrick Catanzariti&quot;&gt;CSS Shapes: Breaking the Rectangular Design Shackles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://t3n.de/news/css-shapes-modul-vorstellung-563960/&quot; title=&quot;CSS3-Shapes: Diese Möglichkeiten eröffnen sich mit dem neuen CSS-Modul von Ilja Zaglov&quot;&gt;CSS3-Shapes: Diese Möglichkeiten eröffnen sich mit dem neuen CSS-Moduls&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Habt ihr schöne Anwendungsbeispiele für CSS-Shapes? Lass es mich wissen.&lt;/strong&gt;&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/sass-parent-selector-2741.html&quot;&gt;Sass Parent Selector – ‚&amp;amp;‘ (ampersand)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/postcss-plugins-2692.html&quot;&gt;Nützliche PostCSS-Module&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/flexbox-fallbacks-2670.html&quot;&gt;Flexbox Fallbacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css-clip-path-2514.html&quot;&gt;CSS clip-path&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Responsive Tabellen</title>
    <link href="https://maddesigns.de/archiv/responsive-tables-2393.html" />
    <updated>2014-08-26T06:51:26Z</updated>
    <id>https://maddesigns.de/archiv/responsive-tables-2393.html</id>
    <content type="html">&lt;h2 id=&quot;responsive-retrofitting-teil-1&quot;&gt;Responsive Retrofitting Teil 1&lt;a class=&quot;header-anchor&quot; href=&quot;#responsive-retrofitting-teil-1&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wenn wir mit bestehenden Inhalten planen müssen, kommt es oft vor, dass wir Daten-Tabellen responsive darstellen sollen. Diese Tabellen sind naturgemäß meist sehr schwierig auf kleinen Bildschirmen abzubilden, viele Tabellen sind sehr groß und enthalten viele Daten. Das rührt daher, dass Redakteure (bzw. diejenigen, die für den Inhalt verantwortlich sind) versuchen über Excel-Tabellen komplexe Daten abzubilden und die Daten so ins Web übernommen werden (sollen). In der Vergangenheit war der Platz auf großen Bildschirmen vorhanden, im Multi-Screen-Zeitalter und in einer responsiven Website heutzutage, meist nicht mehr.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Meine erste Regel wenn Tabellen „responsive“ abgebildet werden sollen, prüfen ob man den Inhalt nicht auch anders ausgezeichnet werden kann, bzw. flexiblere HTML-Elemente für die Abbildung verwendet werden können. So haben wir in einem Projekt eine Suchergebniss-Ausgabe von einer Tabellenansicht in eine Listenansicht (UL) umgewandelt.&lt;/p&gt;
&lt;p&gt;Ein schlechtes Beispiel, wie ich finde, ist die Verwendung von DIV-Containern wie im Artikel &lt;a href=&quot;https://mobifreaks.com/user-interface/responsive-and-seo-friendly-data-tables/&quot;&gt;„Responsive and SEO friendly data tables“&lt;/a&gt; beschrieben. Tabellendaten haben (wenn richtig verwendet) auch eine semantische Zuordnung untereinander. Über Tabellenkopf (&lt;code&gt;thead&lt;/code&gt;, &lt;code&gt;th&lt;/code&gt;) und Tabellenzellen (&lt;code&gt;tbody&lt;/code&gt;, &lt;code&gt;td&lt;/code&gt;), optimalerweise auch über scope-Attribute können die Zusammenhänge im Markup ausgezeichnet werden. Das kann man nicht mit unsematischen DIV-Container nachbilden (es sein denn man nutzt zusätzlich WAI-Aria Attribute, aber lassen wir mal die Kirche im Dorf).&lt;/p&gt;
&lt;p&gt;Besser geeignet für diesen Zweck sind semantische Elemente wie eine Description List (DL). Ein &lt;code&gt;&amp;lt;dl&amp;gt;&lt;/code&gt;-Element ist dann im übertragenem Sinne ein &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt;, ein &lt;code&gt;&amp;lt;dt&amp;gt;&lt;/code&gt; ist ein &lt;code&gt;&amp;lt;th&amp;gt;&lt;/code&gt; und ein &lt;code&gt;&amp;lt;dd&amp;gt;&lt;/code&gt; das Äquivalent zu &lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;. Somit haben die Inhalte auch eine semantische Bedeutung zueinander. Das ist zwar auch von hinten durch die Brust ins Auge, aber besser als DIVs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;div class=&amp;quot;tabled-view&amp;quot;&amp;gt;
  &amp;lt;dl&amp;gt;
    &amp;lt;dt&amp;gt;Beschreibung:&amp;lt;/dt&amp;gt;
    &amp;lt;dd&amp;gt;Lorem ipsum is evil!&amp;lt;/dd&amp;gt;
  &amp;lt;/dl&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;altlasten&quot;&gt;Altlasten&lt;a class=&quot;header-anchor&quot; href=&quot;#altlasten&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Für den Fall, dass man das Markup nicht verändern kann, muss man sich anderer Tricks behelfen. Eine Möglichkeit wäre das &lt;a href=&quot;https://zurb.com/playground/responsive-tables&quot;&gt;„Responsive Tables“&lt;/a&gt; jQuery-Plugin von Zurb (die Macher von &lt;a href=&quot;https://foundation.zurb.com/&quot;&gt;Foundation&lt;/a&gt;). Das Plugin klont die Tabelle, überlagert beide Tabellen und blendet einerseits die Tabellenzellen, andererseits die Tabellenköpfe aus. Zudem macht das Script den Zellenbereich horizontal scrollbar. Der ein oder andere kennt das vielleicht von Excel, dort kann man ebenfalls einen Bereich festsetzen und den Rest der Zeilen scrollen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSS und JavaScript in den HEAD einfügen:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;responsive-tables.css&amp;quot; /&amp;gt;
&amp;lt;script src=&amp;quot;responsive-tables.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Klasse „responsive” zur Tabelle hinzufügen, fertig.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;table class=&amp;quot;responsive&amp;quot;&amp;gt;
  &amp;lt;tr&amp;gt; … &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Nachteil:&lt;/strong&gt; es ist nur ein fester Breakpoint im JavaScript gesetzt. Das könnte im Fall der Tabelle auch ausreichen, aber man weiß ja nie… Ich habe zudem noch &lt;code&gt;-webkit-overflow-scrolling: touch&lt;/code&gt; hinzugefügt für ein flüssigeres Momentum-Scrollen in &lt;span lang=&quot;en&quot;&gt;WebKit-Browsern&lt;/span&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;div.table-wrapper div.scrollable {
  overflow: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Weitere Plugins:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://themergency.com/footable/&quot;&gt;FooTable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/filamentgroup/tablesaw&quot; title=&quot;Tablesaw from Filament Group&quot;&gt;Filament Table Saw&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;css-only-losung&quot;&gt;CSS-only Lösung&lt;a class=&quot;header-anchor&quot; href=&quot;#css-only-losung&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Eine weitere Möglichkeit, die ich bereits in Projekten verwendet habe, beschreibt Chris Coyier im Artikel &lt;a href=&quot;https://css-tricks.com/responsive-data-tables/&quot;&gt;„Responsive Data Tables“&lt;/a&gt;. Hierbei werden alle Tabellen-Zellen in Blockelemente umgewandelt und mit Pseudo-Elementen versehen, die wiederum die Zeilenbeschreibungen als &lt;code&gt;content&lt;/code&gt; Wert mitbringen. Das funktioniert sehr gut, ist aber nicht so flexibel, da fest in CSS geschrieben.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* Label the data */
  th:nth-of-type(1):before { content: &amp;quot;Name:&amp;quot;; }
  th:nth-of-type(2):before { content: &amp;quot;Vorname:&amp;quot;; }
  th:nth-of-type(3):before { content: &amp;quot;Straße:&amp;quot;; }
  th:nth-of-type(4):before { content: &amp;quot;PLZ:&amp;quot;; }
  th:nth-of-type(5):before { content: &amp;quot;Ort:&amp;quot;; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Chris beschreibt weiter in seinem Blogpost, wie man die Variante mit HTML5 data-Attributen flexibel bekommt (Idee von &lt;a href=&quot;https://twitter.com/chriseppstein&quot;&gt;@chriseppstein&lt;/a&gt;).&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;th data-label=&amp;quot;Name&amp;quot;&amp;gt;Name&amp;lt;/th&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;th:before { content: attr(data-label); }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Beispiel: &lt;a href=&quot;https://codepen.io/maddesigns/full/pHqnt&quot;&gt;https://codepen.io/maddesigns/full/pHqnt&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support-fur-diese-losung&quot;&gt;Browser-Support für diese Lösung&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support-fur-diese-losung&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Der IE9, sowie alle älteren IEs mögen es nicht, wenn man Tabellen auf ‚display: block‘ setzt, es kann – muss nicht – zu Darstellungsfehlern kommen. Das sollte man bedenken.&lt;/p&gt;
&lt;p&gt;Wichtig ist, dass man sich den Inhalt vorher genau anschaut und dann entscheidet, welche Responsive Tabellen Lösung die Beste ist, &lt;a href=&quot;https://blog.cloudfour.com/picking-responsive-tables-solution/&quot;&gt;es kommt auf den Inhalt an&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;There I said it: Content First!&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;p&gt;Den Artikel habe ich ursprünglich für ein Print-Magazin geschrieben, ist aber immer nicht veröffentlicht worden… deswegen gibt es jetzt hier einen Dreiteiler im Blog.&lt;/p&gt;
&lt;/div&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-navigation-ux-2650.html&quot;&gt;Responsive Navigation aus UX-Sicht&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-iframes-2417.html&quot;&gt;Responsive iFrames&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-svg-logos-2361.html&quot;&gt;Responsive SVG-Logos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html&quot;&gt;”CSS3 &amp;amp; Responsive Web” – CSS3 Adventskalender Tag 3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Responsive SVG-Logos</title>
    <link href="https://maddesigns.de/archiv/responsive-svg-logos-2361.html" />
    <updated>2014-07-24T10:50:14Z</updated>
    <id>https://maddesigns.de/archiv/responsive-svg-logos-2361.html</id>
    <content type="html">&lt;p&gt;Letztens flog mal wieder ein Link durchs Netz, der vielversprechend klang – &lt;a href=&quot;https://www.responsivelogos.co.uk/&quot;&gt;https://www.responsivelogos.co.uk/&lt;/a&gt; (via &lt;a href=&quot;https://twitter.com/gisugosu/status/491243317880184832&quot; title=&quot;Tweet von @gisugosu&quot;&gt;@gisugosu&lt;/a&gt;) – ein Showcase wie sich Logos ebenfalls „responsive” verhalten können und dabei aber ihre Wiedererkennbarkeit erhalten bleibt.&lt;/p&gt;
&lt;p&gt;Ich hatte mich auch gefreut, als ich ein SVG als Quelldatei sah, was dann geschah, glaubt ihr nicht… &lt;em&gt;böses heftig.co – geh weg!&lt;/em&gt;&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Das SVG-Logo ist als Background-SVG-Sprite eingebunden, welches mehrere Zustände hatte und wurde, wie man es von CSS-Sprites kennt, über &lt;code&gt;background-position&lt;/code&gt; je Breakpoint verschoben.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/i9PMaIE8Hv-189.avif&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/i9PMaIE8Hv-189.webp&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/i9PMaIE8Hv-189.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;189&quot; height=&quot;576&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Das ist nicht unbedingt das, was ich unter einem Responsive Logo verstehe, da man in SVG viel mehr Möglichkeiten hat. SVG ist eine Textdatei und besteht ebenfalls aus einzelnen Elementen oder Gruppen, vergleichbar mit einem HTML-Dokument, die ebenfalls mit CSS und JavaScript angesprochen werden können. Man könnte also die „Responsiveness” auch im SVG behandeln, was bei einem Logo Sinn ergeben würde. Media Queries sind auch hier möglich, so dass man Breakpoints festlegen und dementsprechend Logo-Teile sinnvoll ausblenden kann. Zu beachten ist, dass sich die angegebenen Werte (z.B. min-width/max-width) der Breakpoints auf die SVG-Ausmaße selbst beziehen, also nicht auf den Viewport der einbindenden Seite. Quasi so etwas wie Element Querys – ha!&lt;/p&gt;
&lt;p&gt;Bei der &lt;a href=&quot;https://www.standardista.com/responsive-images-clown-car-technique/&quot; title=&quot;Clown Car Responsive Images Technik &quot;&gt;Clown-Car-Technik&lt;/a&gt; für Responsive Images kommt die Media Query Technik zum Einsatz (Pssst: aber nicht verwenden, gibt jetzt einen offiziellen Standard – war ne wilde Zeit damals).&lt;/p&gt;
&lt;p&gt;Ein fantastisches „Responsive Logo” &lt;a href=&quot;https://people.opera.com/andreasb/demos/demos_svgopen2009/update/svgscalelogo.html&quot;&gt;Beispiel&lt;/a&gt; hat Andreas Bovens bereits 2009 veröffentlicht. So verstehe ich ein Responsive Logo.&lt;/p&gt;
&lt;p&gt;Ein einfaches Beispiel wäre, eine Logo Textzeile auf kleinen Displays auszublenden.&lt;/p&gt;
&lt;figure&gt;
	&lt;div style=&quot;overflow: hidden; resize: both&quot;&gt;
		&lt;img src=&quot;https://maddesigns.de/img/2014/07/responsive-logo.svg&quot; alt=&quot;Responsives SVG-Logo&quot;&gt;
	&lt;/div&gt;
	&lt;figcaption&gt;Das Logo kann resized werden. Unter 400px Elementbreite verschwindet die Logo-Subzeile.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Was auch denkbar ist, dass man für den Druckmodus – &lt;code&gt;@media print&lt;/code&gt; – das Logo einfarbig (schwarz) gestaltet. Das funktioniert allerdings nur, wenn man das SVG-Logo direkt ins HTML einbindet und nicht über eine &lt;code&gt;&amp;lt;img src=&amp;quot;*.svg&amp;quot;&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Diese Technik, innerhalb von SVG je Breakpoint Veränderungen vorzunehmen, nutzen mittlerweile auch einige Icon-Libraries. &lt;a href=&quot;https://useiconic.com/guides/using-iconic-responsively/&quot;&gt;Iconic&lt;/a&gt; wirbt damit und auf Smashing Magazine gab es Anfang des Jahres ein &lt;a href=&quot;https://www.smashingmagazine.com/2014/03/05/rethinking-responsive-svg/&quot;&gt;Tutorial dazu&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Es ist also einiges möglich in dem Bereich. Für Icons bevorzuge ich mittlerweile &lt;a href=&quot;https://maddesigns.de/archiv/svg-sprites-icon-fonts-2309.html&quot;&gt;SVG-Sprites&lt;/a&gt;, da dies im Gegensatz zu Icon-Fonts viele Vorteile hat.&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-navigation-ux-2650.html&quot;&gt;Responsive Navigation aus UX-Sicht&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-iframes-2417.html&quot;&gt;Responsive iFrames&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-tables-2393.html&quot;&gt;Responsive Tabellen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html&quot;&gt;”CSS3 &amp;amp; Responsive Web” – CSS3 Adventskalender Tag 3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>SVG Sprites vs. Icon-Fonts</title>
    <link href="https://maddesigns.de/archiv/svg-sprites-icon-fonts-2309.html" />
    <updated>2014-07-08T07:01:12Z</updated>
    <id>https://maddesigns.de/archiv/svg-sprites-icon-fonts-2309.html</id>
    <content type="html">&lt;p&gt;Aktuell stellt sich mir häufiger die Frage „SVG-Icons oder Icon-Fonts” zu verwenden. Wer für ein Multi-Display-Web entwickelt, kommt nicht drumherum Bilder und Icons hochauflösend bereit zu stellen. Mit dem iPhone4 und dem sog. „Retina Display” hat man schnell gemerkt, dass normal auflösende Bildinhalte auf dem Display pixelig aussehen. Bisher war die einfache Lösung, die Icon-Sprites (PNG) in doppelter Auflösung anzulegen bzw. generieren zu lassen. Das Problem, dass die Icons dann trotzdem nur in einer „Ansichtsgröße” vorliegen, bestand weiterhin.&lt;/p&gt;
&lt;p&gt;Iconfonts, also Schriften á la Dingbats, die anstatt Buchstaben und Ziffern Symbole haben, wurden bisher als ein adäquates Mittel für skalierbare Icons eingesetzt. Dass das auch immer mit Problemen behaftet ist, werden viele Webentwickler schon festgestellt haben.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Probleme Icon-Fonts:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fallback (-schrift)&lt;/li&gt;
&lt;li&gt;Zugänglichkeit&lt;/li&gt;
&lt;li&gt;Positionierung (line-height)&lt;/li&gt;
&lt;li&gt;Rendering&lt;/li&gt;
&lt;li&gt;Einfarbigkeit&lt;/li&gt;
&lt;li&gt;Ladezeit (werden später geladen)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Für einige der Probleme gibt es mittlerweile &lt;a href=&quot;https://filamentgroup.com/lab/bulletproof_icon_fonts.html&quot; title=&quot;Bulletproof Icon Fonts&quot;&gt;gute Anleitungen&lt;/a&gt;, um dies zu verhindern – oft denkt man sich aber, „das sind doch alles nur Hacks und nichts solides, das muss doch irgendwie einfacher gehen.”&lt;/p&gt;
&lt;h2 id=&quot;svg-sprites&quot;&gt;SVG-Sprites&lt;a class=&quot;header-anchor&quot; href=&quot;#svg-sprites&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wir wissen, SVG ist ein Vektor-Grafikformat, das dafür genau das Richtige ist. Eine Option ist natürlich das Icon-Sprite aus SVG-Grafiken zu erstellen und wie gewohnt über &lt;code&gt;background-position&lt;/code&gt; anzuzeigen. Allerdings haben wir auch dann kaum Einfluss auf die Größendarstellung der Icons.&lt;/p&gt;
&lt;p&gt;SVG-Inhalte können in modernen Browsern auch direkt in HTML integriert werden. Das hat dann den Vorteil, dass wir auf die SVG-Elemente mit CSS und JS zugreifen können und so Veränderung vornehmen könnten.&lt;/p&gt;
&lt;p&gt;SVG bietet zudem die Möglichkeit auf ein einzelnes Element zu referenzieren, also einen Inhalt woanders darzustellen. Über &lt;code&gt;&amp;lt;use xlink:href=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/use&amp;gt;&lt;/code&gt; können die Inhalte an anderer Stelle ausgegeben werden. Das kann ein SVG-Block innerhalb der Seite sein, das kann aber auch eine externe SVG-Datei sein. Extern eingebundene Ressourcen haben natürlich den Vorteil des Browser-Caching.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;internes SVG-Element referenzieren&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;use xlink:href=&amp;quot;#menu&amp;quot;&amp;gt;&amp;lt;/use&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;externe SVG-Datei referenzieren&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;use xlink:href=&amp;quot;img/all.svg#menu&amp;quot;&amp;gt;&amp;lt;/use&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Chris Coyier hat dazu in letzter Zeit einiges auf css-tricks.com geschrieben:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/icon-fonts-vs-svg/&quot; title=&quot;Inline SVG vs Icon Fonts&quot;&gt;Inline SVG vs Icon Fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/svg-use-external-source/&quot; title=&quot;SVG `use` with External Source&quot;&gt;SVG `use` with External Source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/svg-symbol-good-choice-icons/&quot; title=&quot;https://css-tricks.com/svg-symbol-good-choice-icons/&quot;&gt;SVG `symbol` a Good Choice for Icons&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/YAiGVFurn--750.avif 750w, https://maddesigns.de/img/YAiGVFurn--1024.avif 1024w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/YAiGVFurn--750.webp 750w, https://maddesigns.de/img/YAiGVFurn--1024.webp 1024w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/YAiGVFurn--750.png&quot; alt=&quot;SVG vs. Icon Font Slide&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1024&quot; height=&quot;768&quot; srcset=&quot;https://maddesigns.de/img/YAiGVFurn--750.png 750w, https://maddesigns.de/img/YAiGVFurn--1024.png 1024w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;
&lt;figcaption&gt;Übersicht SVG-Icons / Icon-Fonts – Foto von Marcel Böttcher (@73inches)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;vorteile-svg-icons&quot;&gt;Vorteile SVG-Icons:&lt;a class=&quot;header-anchor&quot; href=&quot;#vorteile-svg-icons&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Semantik&lt;/li&gt;
&lt;li&gt;barrierefrei(er)&lt;/li&gt;
&lt;li&gt;Mehrfarbig + Effekte&lt;/li&gt;
&lt;li&gt;bessere Positionierung&lt;/li&gt;
&lt;li&gt;mit CSS + SVG-CSS stylebar (win-win ;))&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;svg-store-ein-grunt-task-fur-svg-sprites&quot;&gt;SVG Store – ein Grunt-Task für SVG-Sprites&lt;a class=&quot;header-anchor&quot; href=&quot;#svg-store-ein-grunt-task-fur-svg-sprites&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Mit dem Grunt-Task „&lt;a href=&quot;https://github.com/FWeinb/grunt-svgstore&quot; title=&quot;Grunt SVGStore&quot;&gt;SVG-Store&lt;/a&gt;” hat man die Möglichkeit aus den einzelnen SVG-Dateien ein „SVG-Sprite” zu erstellen. In Wirklichkeit ist es ja kein richtiges Sprite wie wir es kennen, sondern eher ein Dokument, in dem hintereinander alle einzelnen SVG-Blöcke gepackt werden, die dann über eine ID referenziert werden können.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Installation grunt-svgstore:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install grunt-svgstore --save-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Grunt-Task:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;svgstore: {
  options: {},
  dist: {
    files: {
      &#39;dist/img/all.svg&#39;: [&#39;source/img/icons/*.svg&#39;]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Im Anschluss kann man noch zusätzlich &lt;a href=&quot;https://github.com/sindresorhus/grunt-svgmin&quot; title=&quot;SVG minify task&quot;&gt;SVGmin&lt;/a&gt; zur Komprimierung drüber laufen lassen.&lt;/p&gt;
&lt;p&gt;Alternativ sollte man sich auch ’&lt;a href=&quot;https://github.com/jkphl/iconizr&quot; title=&quot;Iconizr Tool&quot;&gt;Iconizr&lt;/a&gt;’ bzw. ’&lt;a href=&quot;https://github.com/jkphl/grunt-iconizr&quot; title=&quot;Grunt Iconizr&quot;&gt;grunt-iconizr&lt;/a&gt;’ anschauen!&lt;/p&gt;
&lt;h2 id=&quot;einbindung-in-html-und-styling-mit-css&quot;&gt;Einbindung in HTML und Styling mit CSS&lt;a class=&quot;header-anchor&quot; href=&quot;#einbindung-in-html-und-styling-mit-css&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Einbindung in HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;svg
	class=&amp;quot;icon-menu&amp;quot;
	role=&amp;quot;img&amp;quot;
	title=&amp;quot;Menu Icon&amp;quot;
	viewbox=&amp;quot;0 0 75 75&amp;quot;
	width=&amp;quot;25&amp;quot;
	height=&amp;quot;25&amp;quot;
&amp;gt;
	&amp;lt;use xlink:href=&amp;quot;img/all.svg#menu&amp;quot;&amp;gt;&amp;lt;/use&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hier wird auf ein eine SVG-Datei mit allen Icons referenziert und das Element mit der ID „menu” angezeigt. Das SVG-Snippet kann man nun über (SVG-)CSS-Eigenschaft &lt;code&gt;fill&lt;/code&gt; einfärben.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.icon-menu {
	fill: green;
}
/* other context */
header .icon-menu {
	fill: pink;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In der Original SVG-Icon Datei kann man ebenfalls Klassen zum Styling vergeben.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;…
&amp;lt;path class=&amp;quot;original-svg-pin&amp;quot; … /&amp;gt;
…
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Auch das kann man dann über die &lt;code&gt;fill&lt;/code&gt; Eigenschaft anders einfärben.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.original-svg-pin {
	fill: blue;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Andere SVG-Style-Eigenschaften wie &lt;code&gt;stroke&lt;/code&gt; oder &lt;code&gt;stroke-width&lt;/code&gt; sind natürlich auch möglich.&lt;/p&gt;
&lt;p&gt;Chris Coyier beschreibt in seinem Blogpost „&lt;a href=&quot;https://css-tricks.com/cascading-svg-fill-color/&quot; title=&quot;Cascading SVG fill color&quot;&gt;Cascading SVG fill color&lt;/a&gt;” die Möglichkeit mit &lt;code&gt;currentColor&lt;/code&gt;, dazu hab ich aber folgendes Problem auf Stackoverflow gefunden: Geht nicht im &lt;a href=&quot;https://stackoverflow.com/questions/23936150/issues-with-css-currentcolor-keyword-in-ios-and-safari&quot;&gt;iOS Safari&lt;/a&gt;, das Beispiel geht aber bei mir, hm…&lt;/p&gt;
&lt;h3 id=&quot;probleme-tipps&quot;&gt;Probleme &amp;amp; Tipps&lt;a class=&quot;header-anchor&quot; href=&quot;#probleme-tipps&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;wird nicht von allen Browsern unterstützt (kein IE9-IE11 Support) – das ist aktuell das größte Problem&lt;/li&gt;
&lt;li&gt;Es ist nur eine fill-Farbe für alle Pfade (path, polygon, …) in dem verknüpften SVG-Snippet zuweisbar – über Selektoren möglich (werden allerdings nicht in den Developer-Tools angezeigt), sonst nur direkt über Klassen in der SVG-Datei&lt;/li&gt;
&lt;li&gt;der Attribut-Selektor &lt;code&gt;[viewBox] {}&lt;/code&gt; geht nicht in WebKit-based Browsern (hat nix mit den SVG-Icons zu tun, ist aber trotzdem doof)&lt;/li&gt;
&lt;li&gt;SVGs werden onLoad auf die volle Bildschirmbreite gezogen, deshalb &lt;code&gt;width=&amp;quot;&amp;quot;&lt;/code&gt; + &lt;code&gt;height=&amp;quot;&amp;quot;&lt;/code&gt; wie bei Pixelgrafiken setzen, kann anschließend mit CSS überschrieben werden&lt;/li&gt;
&lt;li&gt;aufpassen bei backface-visibility &amp;amp; z-index –&amp;gt; SVG-Icons auf der gleichen Ebene werden nicht neu hochauflösend gerendert (und wirken also pixelig)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;svg4everybody&quot;&gt;SVG4everybody&lt;a class=&quot;header-anchor&quot; href=&quot;#svg4everybody&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Die JS-Library &lt;a href=&quot;https://github.com/jonathantneal/svg4everybody&quot; title=&quot;SVG Polyfill svg4everybody&quot;&gt;SVG4everybody&lt;/a&gt; löst die fehlende Browser-Kompatibilität, so funktioniert die Technik nun auch im IE9-11. Mit ’SVG4everybody’ werden die SVG-Fragmente über Ajax direkt in die Seite geladen, das hat zudem den Vorteil, dass man die SVG-Inhalte besser stylen kann.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSS styling with ’fill’&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* inherit the fill color from parent */
svg {
	polygon,
	path,
	rect {
		fill: inherit;
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alle Icon-Pfade sollen die ’fill’-Farbe vom Elternelement erben.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* fill all elements contains the class „icon” with ’red’ */
[class*=&amp;quot;icon&amp;quot;] {
	fill: red;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alle Icons werden mit ’icon’ benannt und bekommen alle die gleiche Einfärbung.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* set individual color – cascade after [class*=&amp;quot;icon&amp;quot;] */
.icon-menu {
	fill: green;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Individuelle Icons kann man noch individuell färben.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vergibt man wie im obigen Beispiel mehrere CSS-Klassen für die einzelnen Elemente der Originaldatei, dann ist es möglich SVG-Einzelteile einzeln zu stylen/zu färben.&lt;/li&gt;
&lt;li&gt;Problem, das mir aufgefallen ist: mehrere Requests – für jedes Bild wird je ein Request benötigt bzw. im Network-Panel angezeigt&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;blurry-rendering-in-firefox-win&quot;&gt;Blurry Rendering in Firefox (Win)&lt;a class=&quot;header-anchor&quot; href=&quot;#blurry-rendering-in-firefox-win&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/FabianBeiner&quot; title=&quot;Fabian Beiner auf Twitter&quot;&gt;Fabian Beiner&lt;/a&gt; hatte ein &lt;a href=&quot;https://twitter.com/FabianBeiner/status/480641763661840384&quot;&gt;Problem mit dem Rendering von SVG im Firefox (Windows)&lt;/a&gt; festgestellt. Unter bestimmten Bedingungen wirken harte Kanten unscharf. Dieser Hinweis behebt das Problem:&lt;/p&gt;
&lt;div class=&quot;tip&quot;&gt;
&lt;p&gt;Try styling your rects with shape-rendering: crisp-edges to remove antialiasing and force the lines to really be 1px. Also try offsetting the rects 1px (&lt;code&gt;&amp;lt;rect x=&amp;quot;1&amp;quot;&lt;/code&gt;). The border can be cropped by the border of the svg.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering&quot; title=&quot;MDN SVG shape-rendering&quot;&gt;SVG shape-rendering&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;svg-fallback-fur-ie8-android-23&quot;&gt;SVG-Fallback für IE8 &amp;amp; Android 2.3&lt;a class=&quot;header-anchor&quot; href=&quot;#svg-fallback-fur-ie8-android-23&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;IE8 sowie Android-Browser der Version 2.x unterstützen kein SVG, hier müsste man, wenn man die Browser unterstützt, einen Fallback mit PNG-Grafiken einsetzen.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/dbushell/grunt-svg2png&quot;&gt;SVG2PNG&lt;/a&gt; – Grunt-Task zum einfachen Umwandeln von SVG zu PNG&lt;/li&gt;
&lt;li&gt;SVG4everybody stellt einen Fallback für IE8 bereit.&lt;/li&gt;
&lt;li&gt;Problem: die PNG-Datei hat die originale SVG-fill-Farbe – wenn mit CSS die ’fill’-Color verändert wurde, wird das natürlich nicht erkannt und das icon wird nicht eingefärbt&lt;/li&gt;
&lt;li&gt;auch hier mehrere Requests (PNG-Sprite wäre besser, Aufwand/Nutzen ist aber vertretbar)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;icomoon&quot;&gt;Icomoon&lt;a class=&quot;header-anchor&quot; href=&quot;#icomoon&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Der Online-Service &lt;a href=&quot;https://icomoon.io&quot;&gt;Icomoon&lt;/a&gt; bietet seit einiger Zeit ebenfalls die Möglichkeit die gewählten Icons als SVG(-Sprite) herunterzuladen. Hier hat man nun alle Möglichkeiten, entweder Icon-Font generieren oder SVG-Icons herunterladen – oder beides. Toller Service!&lt;/p&gt;
&lt;h2 id=&quot;vorteil-icon-fonts&quot;&gt;Vorteil Icon-Fonts&lt;a class=&quot;header-anchor&quot; href=&quot;#vorteil-icon-fonts&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;„Aber irgendwas gutes müssen Iconfonts doch haben, oder?!” Ja:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Browser-Support&lt;/li&gt;
&lt;li&gt;Hinting&lt;/li&gt;
&lt;li&gt;Subpixel Rendering&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wer noch nicht überzeugt ist, dass SVG-Icons die bessere Wahl ist, sollte sich den Blogpost &lt;a href=&quot;https://ianfeather.co.uk/ten-reasons-we-switched-from-an-icon-font-to-svg/&quot; title=&quot;Ten reasons we switched from an icon font to SVG&quot;&gt;Ten reasons we switched from an icon font to SVG&lt;/a&gt; von Ian Feather durchlesen.&lt;/p&gt;
&lt;p&gt;Das Video von der Beyond Tellerrand Konferenz zum Thema „&lt;a href=&quot;https://vimeo.com/99828116&quot; title=&quot;SVG is for everybody&quot;&gt;SVG Is For Everybody&lt;/a&gt;” von Chris Coyier ist jetzt online – solltet ihr euch unbedingt (nochmal) anschauen.&lt;/p&gt;
&lt;h3 id=&quot;codepen-beispiel&quot;&gt;Codepen Beispiel:&lt;a class=&quot;header-anchor&quot; href=&quot;#codepen-beispiel&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://codepen.io/maddesigns/pen/kBqIg&quot;&gt;SVG use example – Codepen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wer jetzt noch tiefer in die Thematik einsteigen will, dem sei der Artikel &lt;a href=&quot;https://sarasoueidan.com/blog/structuring-grouping-referencing-in-svg/&quot; title=&quot;Structuring, Grouping, and Referencing in SVG – The &amp;lt;g&amp;gt;, &amp;lt;use&amp;gt;, &amp;lt;defs&amp;gt; and &amp;lt;symbol&amp;gt; Elements&quot;&gt;Structuring, Grouping, and Referencing in SVG – The &lt;code&gt;&amp;lt;g&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;defs&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;symbol&amp;gt;&lt;/code&gt; Elements&lt;/a&gt; von Sara Soueidan ans Herz gelegt.&lt;/p&gt;
&lt;p&gt;Habt ihr noch weitere Tipps oder Probleme festgestellt?&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-svg-logos-2361.html&quot;&gt;Responsive SVG-Logos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-filter-1525.html&quot;&gt;CSS-Filter – mehr Effekte fürs Web – CSS3 Adventskalender Tag 19&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/ie9-mit-css3-border-radius-und-linear-gradient-problemen-813.html&quot;&gt;IE9 mit CSS3 border-radius und linear-gradient Problemen&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 – position: sticky</title>
    <link href="https://maddesigns.de/archiv/css3-position-sticky-2279.html" />
    <updated>2014-05-16T12:44:40Z</updated>
    <id>https://maddesigns.de/archiv/css3-position-sticky-2279.html</id>
    <content type="html">&lt;p&gt;Mit position: sticky können wir nun endlich einen Container/Element ab einer bestimmten Position festsetzen.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;strong&gt;Ein kurzer Reminder:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Bisher können Webworker folgende &lt;a href=&quot;https://dev.w3.org/csswg/css-position/#sticky-positioning&quot; title=&quot;W3C CSS Position&quot;&gt;Positionen&lt;/a&gt; für Container/Elemente einer Seite zuweisen.&lt;/p&gt;
&lt;div class=&quot;tip&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;position: static&lt;/code&gt; (default)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;position: relative&lt;/code&gt; (relative position in document order)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;position: absolute&lt;/code&gt; (absolute position in relative context)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;position: fixed&lt;/code&gt; (fixed in viewport)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Die Idee ein Container/Element ab einer bestimmten Position „sticky“ zu setzen, also zuerst mitscrollen zu lassen und dann ab einer bestimmten Position zu fixieren, gibt es im Webdesign schon länger. Ich erinnere mich noch als &lt;a href=&quot;https://twitter.com/rem&quot; title=&quot;Remy Sharp on Twitter&quot;&gt;@rem&lt;/a&gt; auf &lt;a href=&quot;https://jqueryfordesigners.com/index.html%3Fp=214.html&quot; title=&quot;Fixed Floating Elements with jquery&quot;&gt;jqueryfordesigners.com&lt;/a&gt; die Umsetzung mit jQuery erklärt hat.&lt;/p&gt;
&lt;p&gt;Seit einiger Zeit gibt es aber eine neue CSS3-Eigenschaft, die das Verhalten nativ im Browser integriert. Diese ist bereits im Safari 6.1 und neuer (mit -webkit-Prefix) aktiviert, funktioniert also auch im Safari Mobile. Chrome und Firefox (auch auf Android) haben die Eigenschaft aktuell hinter einem Flag integriert, Microsoft &lt;a href=&quot;https://status.modern.ie/positionsticky&quot;&gt;denkt drüber nach&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;verwendung-in-css&quot;&gt;Verwendung in CSS&lt;a class=&quot;header-anchor&quot; href=&quot;#verwendung-in-css&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.sticky {
	position: -webkit-sticky;
	position: sticky;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;fallbacks-und-polyfills&quot;&gt;Fallbacks und Polyfills&lt;a class=&quot;header-anchor&quot; href=&quot;#fallbacks-und-polyfills&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ich tendiere ja immer dazu ein visuelles Verhalten nur für Browser zu aktivieren, die das bereits vollständig nativ unterstützen. Besonders bei Responsive Webdesign lässt sich ein Fallback zu &lt;code&gt;position: fixed&lt;/code&gt; schwieriger integrieren, da die dynamischen Positionen von Javascript immer neu berechnet werden müssten, das kann sich natürlich negativ auf die Performance auswirken.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Der mögliche Fallback sollte also immer getestet werden.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Aktuell empfehle ich die sticky Eigenschaften nur mit zusätzlicher (Detection-) Klasse zu nutzen. Die Position (top/bottom) also nur zusammen mit sticky setzen.&lt;/p&gt;
&lt;p&gt;Die Filamentgroup hat einen &lt;a href=&quot;https://github.com/filamentgroup/fixed-sticky&quot; title=&quot;position: sticky polyfill&quot;&gt;Polyfill&lt;/a&gt; für &lt;code&gt;position: sticky&lt;/code&gt; veröffentlicht, der das Verhalten auch für Browser implementiert, die die Eigenschaft nicht unterstützen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.sticky {
	position: static;
}
.csspositionsticky .sticky {
	position: sticky;
	top: 20em;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;details class=&quot;baseline-indicator baseline-indicator--widely&quot; open&gt;
  &lt;summary&gt;
    &lt;span class=&quot;baseline-indicator__icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg viewBox=&quot;0 0 36 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M18 8L20 10L18 12L16 10L18 8Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-front)&quot; d=&quot;M26 0L28 2L10 20L0 10L2 8L10 16L26 0Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M28 2L26 4L32 10L26 16L22 12L20 14L26 20L36 10L28 2Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;var(--baseline-icon-widely-back)&quot; d=&quot;M10 0L2 8L4 10L10 4L14 8L16 6L10 0Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__title&quot;&gt;Baseline &lt;span class=&quot;baseline-indicator__year&quot;&gt;2019&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__pill&quot;&gt;Widely available&lt;/span&gt;
    &lt;span class=&quot;baseline-indicator__browsers&quot;&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Blink (Chrome &amp;amp; Edge)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--chrome supported&quot; title=&quot;chrome 56&quot; role=&quot;img&quot; aria-label=&quot;chrome 56&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 260 260&quot;&gt;
  &lt;linearGradient id=&quot;a&quot; x1=&quot;145&quot; x2=&quot;34&quot; y1=&quot;253&quot; y2=&quot;61&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#1e8e3e&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#34a853&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;b&quot; x1=&quot;111&quot; x2=&quot;222&quot; y1=&quot;254&quot; y2=&quot;62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#fcc934&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#fbbc04&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;linearGradient id=&quot;c&quot; x1=&quot;17&quot; x2=&quot;239&quot; y1=&quot;80&quot; y2=&quot;80&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop offset=&quot;0&quot; stop-color=&quot;#d93025&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#ea4335&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;64&quot; fill=&quot;#fff&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#a)&quot; d=&quot;M96 183.4A63.7 63.7 0 0 1 72.6 160L17.2 64A128 128 0 0 0 128 256l55.4-96A64 64 0 0 1 96 183.4Z&quot;&gt;&lt;/path&gt;
  &lt;path fill=&quot;url(#b)&quot; d=&quot;M192 128a63.7 63.7 0 0 1-8.6 32L128 256A128 128 0 0 0 238.9 64h-111a64 64 0 0 1 64 64Z&quot;&gt;&lt;/path&gt;
  &lt;circle cx=&quot;128&quot; cy=&quot;128&quot; r=&quot;52&quot; fill=&quot;#1a73e8&quot;&gt;&lt;/circle&gt;
  &lt;path fill=&quot;url(#c)&quot; d=&quot;M96 72.6a63.7 63.7 0 0 1 32-8.6h110.8a128 128 0 0 0-221.7 0l55.5 96A64 64 0 0 1 96 72.6Z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--edge supported&quot; title=&quot;edge 16&quot; role=&quot;img&quot; aria-label=&quot;edge 16&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 256 256&quot;&gt;
	&lt;defs&gt;
		&lt;radialGradient id=&quot;edgeb&quot; cx=&quot;161.8&quot; cy=&quot;68.9&quot; r=&quot;95.4&quot; gradientTransform=&quot;matrix(1 0 0 -.95 0 248.8)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.7&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edged&quot; cx=&quot;-340.3&quot; cy=&quot;63&quot; r=&quot;143.2&quot; gradientTransform=&quot;matrix(.15 -.99 -.8 -.12 176.6 -125.4)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.8&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-opacity=&quot;.5&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgee&quot; cx=&quot;113.4&quot; cy=&quot;570.2&quot; r=&quot;202.4&quot; gradientTransform=&quot;matrix(-.04 1 2.13 .08 -1179.5 -106.7)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#35c1f1&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.1&quot; stop-color=&quot;#34c1ed&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#2fc2df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#2bc3d2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#36c752&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;edgef&quot; cx=&quot;376.5&quot; cy=&quot;568&quot; r=&quot;97.3&quot; gradientTransform=&quot;matrix(.28 .96 .78 -.23 -303.8 -148.5)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#66eb6e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#66eb6e&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;edgea&quot; x1=&quot;63.3&quot; y1=&quot;84&quot; x2=&quot;241.7&quot; y2=&quot;84&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#0c59a4&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#114a8b&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;linearGradient id=&quot;edgec&quot; x1=&quot;157.3&quot; y1=&quot;161.4&quot; x2=&quot;46&quot; y2=&quot;40.1&quot; gradientTransform=&quot;matrix(1 0 0 -1 0 266)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#1b9de2&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.2&quot; stop-color=&quot;#1595df&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#0680d7&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#0078d4&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgea)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;isolation:isolate;opacity:.35;fill:url(#edgeb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgec)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;opacity:.41;fill:url(#edged);isolation:isolate&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgee)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z&quot; transform=&quot;translate(-4.6 -5)&quot; style=&quot;fill:url(#edgef)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;Gecko (Firefox)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--firefox supported&quot; title=&quot;firefox 59&quot; role=&quot;img&quot; aria-label=&quot;firefox 59&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 512 512&quot;&gt;
	&lt;defs&gt;
		&lt;linearGradient id=&quot;ffa&quot; x1=&quot;446.9&quot; y1=&quot;76.85&quot; x2=&quot;47.94&quot; y2=&quot;461.77&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.05&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.22&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.37&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.7&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
		&lt;radialGradient id=&quot;ffb&quot; cx=&quot;428.46&quot; cy=&quot;55.06&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#ffbd4f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.19&quot; stop-color=&quot;#ffac31&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ff9d17&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.4&quot; stop-color=&quot;#ff563b&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#ff3750&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.71&quot; stop-color=&quot;#f5156c&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.78&quot; stop-color=&quot;#eb0878&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.86&quot; stop-color=&quot;#e50080&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffc&quot; cx=&quot;245.39&quot; cy=&quot;259.88&quot; r=&quot;501.01&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#960e18&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#b11927&quot; stop-opacity=&quot;.74&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.43&quot; stop-color=&quot;#db293d&quot; stop-opacity=&quot;.34&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#f5334b&quot; stop-opacity=&quot;.09&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff3750&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffd&quot; cx=&quot;305.8&quot; cy=&quot;-58.64&quot; r=&quot;362.96&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.13&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.25&quot; stop-color=&quot;#ffdc3e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ff9d12&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.53&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffe&quot; cx=&quot;189.98&quot; cy=&quot;390.75&quot; r=&quot;238.55&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.35&quot; stop-color=&quot;#3a8ee6&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.47&quot; stop-color=&quot;#5c79f0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.67&quot; stop-color=&quot;#9059ff&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;1&quot; stop-color=&quot;#c139e6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;fff&quot; cx=&quot;252.16&quot; cy=&quot;201.25&quot; r=&quot;126.48&quot; gradientTransform=&quot;matrix(.97 -.24 .28 1.14 -48.36 31.43)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.21&quot; stop-color=&quot;#9059ff&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.28&quot; stop-color=&quot;#8c4ff3&quot; stop-opacity=&quot;.06&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.75&quot; stop-color=&quot;#7716a8&quot; stop-opacity=&quot;.45&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.97&quot; stop-color=&quot;#6e008b&quot; stop-opacity=&quot;.6&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffg&quot; cx=&quot;239.06&quot; cy=&quot;34.56&quot; r=&quot;171.62&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#ffe226&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.12&quot; stop-color=&quot;#ffdb27&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ffc82a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.5&quot; stop-color=&quot;#ffa930&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.73&quot; stop-color=&quot;#ff7e37&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.79&quot; stop-color=&quot;#ff7139&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffh&quot; cx=&quot;373.96&quot; cy=&quot;-74.29&quot; r=&quot;732.21&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.11&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.46&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.62&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.72&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffi&quot; cx=&quot;304.59&quot; cy=&quot;7.07&quot; r=&quot;536.37&quot; gradientTransform=&quot;matrix(.1 .99 -.65 .07 277.32 -296.33)&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;0&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.06&quot; stop-color=&quot;#ffe847&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#ffc830&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.3&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.36&quot; stop-color=&quot;#ff8b16&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.45&quot; stop-color=&quot;#ff672a&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.57&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.74&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffj&quot; cx=&quot;235.02&quot; cy=&quot;98.12&quot; r=&quot;457.12&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.14&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.48&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.59&quot; stop-color=&quot;#ff5634&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.66&quot; stop-color=&quot;#ff3647&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.9&quot; stop-color=&quot;#e31587&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;radialGradient id=&quot;ffk&quot; cx=&quot;355.69&quot; cy=&quot;124.88&quot; r=&quot;500.32&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.09&quot; stop-color=&quot;#fff44f&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.23&quot; stop-color=&quot;#ffe141&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.51&quot; stop-color=&quot;#ffaf1e&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.63&quot; stop-color=&quot;#ff980e&quot;&gt;&lt;/stop&gt;
		&lt;/radialGradient&gt;
		&lt;linearGradient id=&quot;ffl&quot; x1=&quot;442.1&quot; y1=&quot;74.79&quot; x2=&quot;102.64&quot; y2=&quot;414.26&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;
			&lt;stop offset=&quot;.17&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.8&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.27&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.63&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.49&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;.22&quot;&gt;&lt;/stop&gt;
			&lt;stop offset=&quot;.6&quot; stop-color=&quot;#fff44f&quot; stop-opacity=&quot;0&quot;&gt;&lt;/stop&gt;
		&lt;/linearGradient&gt;
	&lt;/defs&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5A120.27 120.27 0 0 0 182 159.05a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.08 12.7-2.37 15v.53A229.1 229.1 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-277 188.12c1.12.53 2.18 1.12 3.33 1.64l.16.1c-1.15-.56-2.32-1.14-3.48-1.74zm55-144.95zM454.9 179v-.23.26z&quot; fill=&quot;url(#ffa)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffb)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94v.49c22.68 61.48 10.32 124-7.48 162.2-27.54 59.1-94.21 119.68-198.58 116.73-112.67-3.2-212-86.91-230.55-196.46-3.38-17.29 0-26.06 1.7-40.09-2.07 10.81-2.86 13.94-3.89 33.16v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.75-41.22-.56-84.54-15.62-120.76z&quot; fill=&quot;url(#ffc)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M361.92 194.62c.53.37 1 .74 1.5 1.11a130.49 130.49 0 0 0-22.32-29.12C266.4 91.91 321.52 4.63 330.81.19l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49z&quot; fill=&quot;url(#ffd)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#ffe)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M256.77 209.54c-.39 6-21.51 26.6-28.9 26.6-68.34 0-79.43 41.34-79.43 41.34 3 34.82 27.26 63.49 56.61 78.66 1.34.69 2.69 1.31 4 1.93 2.35 1 4.71 2 7.06 2.89a106.88 106.88 0 0 0 31.27 6c119.78 5.62 143-143.22 56.55-186.44 22.13-3.85 45.11 5.06 57.94 14.07-21-36.71-60.25-61.49-105.3-61.49-2.85 0-5.64.24-8.44.43A120.27 120.27 0 0 0 182 159.05c3.67 3.11 7.81 7.25 16.52 15.83 16.34 16.12 58.16 32.71 58.25 34.66z&quot; fill=&quot;url(#fff)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M170.83 151.06c1.95 1.26 3.55 2.32 5 3.29a111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71 1.13-.03 35.99-.66 53.52 10.74z&quot; fill=&quot;url(#ffg)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M18.22 261.45C36.77 371 136.1 454.71 248.85 457.91c104.37 2.95 171-57.63 198.58-116.73 17.8-38.21 30.16-100.72 7.48-162.2v-.46c0 .06 0 .14.05.4 8.52 55.67-19.79 109.6-64.05 146.07a7.3 7.3 0 0 0-.13.31c-86.25 70.23-168.78 42.37-185.49 31-1.16-.56-2.33-1.14-3.49-1.74-50.29-24-71.06-69.85-66.61-109.14-42.45 0-56.93-35.82-56.93-35.82s38.12-27.18 88.36-3.54c46.53 21.9 90.23 3.55 90.23 3.54-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7c-1.43-1-3-2-5-3.29-17.53-11.4-52.39-10.77-53.54-10.74h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.19.46-8.74 37.79-4.52 57.15z&quot; fill=&quot;url(#ffh)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M341.1 166.61a130.49 130.49 0 0 1 22.32 29.12 46.36 46.36 0 0 1 3.6 3C421.5 248.89 393 319.9 390.83 325c44.26-36.47 72.57-90.4 64.05-146.07-27.17-67.78-73.25-95.1-110.88-154.57-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09-9.3 4.44-64.42 91.72 10.28 166.42z&quot; fill=&quot;url(#ffi)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M367 198.68a46.36 46.36 0 0 0-3.6-3c-.49-.37-1-.74-1.5-1.11-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c16.71 11.4 99.24 39.26 185.49-31 0 0 .05-.13.13-.31C393 319.9 421.5 248.89 367 198.68z&quot; fill=&quot;url(#ffj)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M148.44 277.48s11.09-41.34 79.43-41.34c7.39 0 28.51-20.62 28.9-26.6s-43.7 18.36-90.23-3.54c-50.24-23.64-88.36 3.54-88.36 3.54s14.48 35.82 56.93 35.82c-4.45 39.29 16.32 85.1 66.61 109.14 1.12.53 2.18 1.12 3.33 1.64-29.35-15.14-53.58-43.84-56.61-78.66z&quot; fill=&quot;url(#ffk)&quot;&gt;&lt;/path&gt;
	&lt;path d=&quot;M478.71 166.38c-10.44-25.13-31.6-52.26-48.21-60.83 13.52 26.51 21.34 53.1 24.33 72.94 0 0 0 .14.05.4C427.71 111.15 381.63 83.83 344 24.36c-1.91-3-3.81-6-5.67-9.21-1.05-1.81-1.9-3.45-2.64-5A43.73 43.73 0 0 1 332.1.68a.63.63 0 0 0-.54-.65.86.86 0 0 0-.45 0 .47.47 0 0 0-.11.07c-.06 0-.12.07-.18.09l.1-.13c-60.37 35.36-80.85 100.77-82.73 133.5 2.8-.19 5.59-.43 8.44-.43 45.05 0 84.29 24.78 105.3 61.49-12.83-9-35.81-17.92-57.94-14.07 86.44 43.22 63.23 192.06-56.55 186.44a106.88 106.88 0 0 1-31.27-6c-2.35-.88-4.71-1.85-7.06-2.89-1.36-.62-2.71-1.24-4-1.93l.16.1c-1.16-.56-2.33-1.14-3.49-1.74 1.12.53 2.18 1.12 3.33 1.64-29.41-15.17-53.64-43.87-56.67-78.69 0 0 11.09-41.34 79.43-41.34 7.39 0 28.51-20.62 28.9-26.6-.09-1.95-41.91-18.59-58.22-34.66-8.71-8.58-12.85-12.72-16.52-15.83a71.11 71.11 0 0 0-6.22-4.7 111.39 111.39 0 0 1-.67-58.74c-24.69 11.25-43.89 29-57.85 44.71h-.11c-9.53-12.07-8.86-51.88-8.32-60.19-.11-.52-7.1 3.63-8 4.26a174.74 174.74 0 0 0-23.49 20.12 210.18 210.18 0 0 0-22.44 26.91 202.86 202.86 0 0 0-32.25 72.82c-.11.52-.21 1.06-.32 1.59-.45 2.11-2.49 12.85-2.77 15.15 0 .18 0-.17 0 0A278.84 278.84 0 0 0 16 254.52v1.23c0 132.72 107.6 240.32 240.32 240.32 118.87 0 217.56-86.3 236.89-199.66.4-3.07.73-6.17 1.09-9.27 4.78-41.22-.53-84.54-15.59-120.76zm-23.84 12.34v.26z&quot; fill=&quot;url(#ffl)&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;baseline-indicator__engine&quot; title=&quot;WebKit (Safari)&quot;&gt;&lt;span class=&quot;baseline-indicator__browser baseline-indicator__browser--safari supported&quot; title=&quot;safari 13&quot; role=&quot;img&quot; aria-label=&quot;safari 13&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;32&quot; height=&quot;32&quot; viewBox=&quot;0 0 21 21&quot; fill=&quot;none&quot;&gt;&lt;g clip-path=&quot;url(#clip0_1510_9490)&quot;&gt;&lt;path opacity=&quot;0.53&quot; d=&quot;M19.5049 10.5241C19.5049 15.4499 15.2689 19.5325 10.2011 19.5325C5.13327 19.5325 0.897217 15.4499 0.897217 10.5241C0.897217 5.59835 5.13327 1.51575 10.2011 1.51575C15.2689 1.51575 19.5049 5.59835 19.5049 10.5241Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.8586 9.72878C19.8586 14.8543 15.4048 19.44 10.2005 19.44C4.99618 19.44 0.54248 14.8543 0.54248 9.72878C0.54248 4.60325 4.99618 0.0175781 10.2005 0.0175781C15.4048 0.0175781 19.8586 4.60325 19.8586 9.72878Z&quot; fill=&quot;url(#paint0_linear_1510_9490)&quot; stroke=&quot;#CDCDCD&quot; stroke-width=&quot;0.351543&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M19.1018 9.72868C19.1018 14.4178 15.0334 18.6789 10.2006 18.6789C5.36782 18.6789 1.29932 14.4178 1.29932 9.72868C1.29932 5.03955 5.36782 0.778442 10.2006 0.778442C15.0334 0.778442 19.1018 5.03955 19.1018 9.72868Z&quot; fill=&quot;url(#paint1_radial_1510_9490)&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M10.2004 1.24524C10.1285 1.24524 10.0706 1.30343 10.0706 1.37573V2.88089C10.0706 2.95319 10.1285 3.01138 10.2004 3.01138C10.2723 3.01138 10.3302 2.95319 10.3302 2.88089V1.37573C10.3302 1.30343 10.2723 1.24524 10.2004 1.24524Z&quot; fill=&quot;#F4F2F3&quot;&gt;&lt;/path&gt;&lt;g opacity=&quot;0.409&quot; filter=&quot;url(#filter0_f_1510_9490)&quot;&gt;&lt;path d=&quot;M16.2829 4.50916L9.18266 8.65714L4.69336 15.7635L11.2608 10.8722L16.2829 4.50916Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;path d=&quot;M11.218 10.8003L9.18286 8.65724L16.4024 3.77393L11.218 10.8003Z&quot; fill=&quot;#FF5150&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M11.2181 10.8003L9.18291 8.65723L3.99854 15.6836L11.2181 10.8003Z&quot; fill=&quot;#F1F1F1&quot;&gt;&lt;/path&gt;&lt;path opacity=&quot;0.243&quot; d=&quot;M3.99854 15.6836L11.2181 10.8003L16.4025 3.77393L3.99854 15.6836Z&quot; fill=&quot;black&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id=&quot;filter0_f_1510_9490&quot; x=&quot;2.14852&quot; y=&quot;1.96432&quot; width=&quot;16.6793&quot; height=&quot;16.3439&quot; filterUnits=&quot;userSpaceOnUse&quot; color-interpolation-filters=&quot;sRGB&quot;&gt;&lt;feFlood flood-opacity=&quot;0&quot; result=&quot;BackgroundImageFix&quot;&gt;&lt;/feFlood&gt;&lt;feBlend mode=&quot;normal&quot; in=&quot;SourceGraphic&quot; in2=&quot;BackgroundImageFix&quot; result=&quot;shape&quot;&gt;&lt;/feBlend&gt;&lt;feGaussianBlur stdDeviation=&quot;1.27242&quot; result=&quot;effect1_foregroundBlur_1510_9490&quot;&gt;&lt;/feGaussianBlur&gt;&lt;/filter&gt;&lt;linearGradient id=&quot;paint0_linear_1510_9490&quot; x1=&quot;10.2002&quot; y1=&quot;19.4398&quot; x2=&quot;10.2002&quot; y2=&quot;0.0175272&quot; gradientUnits=&quot;userSpaceOnUse&quot;&gt;&lt;stop stop-color=&quot;#BDBDBD&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;white&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;radialGradient id=&quot;paint1_radial_1510_9490&quot; cx=&quot;0&quot; cy=&quot;0&quot; r=&quot;1&quot; gradientUnits=&quot;userSpaceOnUse&quot; gradientTransform=&quot;translate(10.2407 8.42362) scale(9.65803 9.71116)&quot;&gt;&lt;stop stop-color=&quot;#06C2E7&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.25&quot; stop-color=&quot;#0DB8EC&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.5&quot; stop-color=&quot;#12AEF1&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;0.75&quot; stop-color=&quot;#1F86F9&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;1&quot; stop-color=&quot;#107DDD&quot;&gt;&lt;/stop&gt;&lt;/radialGradient&gt;&lt;clipPath id=&quot;clip0_1510_9490&quot;&gt;&lt;rect width=&quot;20.4&quot; height=&quot;20.4&quot; fill=&quot;white&quot; transform=&quot;translate(0.000488281)&quot;&gt;&lt;/rect&gt;&lt;/clipPath&gt;&lt;/defs&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/summary&gt;
  &lt;div class=&quot;baseline-indicator__body&quot;&gt;
    &lt;p&gt;Sticky positioning ist seit 2019 in allen gängigen Browsern verfügbar und gilt als stabil.&lt;/p&gt;
    &lt;a href=&quot;https://webstatus.dev/features/sticky-positioning&quot; target=&quot;_blank&quot;&gt;Browser-Support auf webstatus.dev&lt;/a&gt;
  &lt;/div&gt;
&lt;/details&gt;
&lt;h3 id=&quot;demo-sticky-header&quot;&gt;Demo: Sticky Header&lt;a class=&quot;header-anchor&quot; href=&quot;#demo-sticky-header&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;code-demo title=&quot;position: sticky header&quot; height=&quot;300&quot;&gt;
&lt;template data-lang=&quot;html&quot;&gt;
&lt;header class=&quot;sticky&quot;&gt;Sticky Header&lt;/header&gt;
&lt;main&gt;
  &lt;p&gt;Scroll down to see the sticky header in action.&lt;/p&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
&lt;/main&gt;
&lt;/template&gt;
&lt;template data-lang=&quot;css&quot;&gt;
body { font-family: sans-serif; margin: 0; }
.sticky {
  position: sticky;
  top: 0;
  background: #333;
  color: #fff;
  padding: 1em;
  z-index: 10;
}
main { padding: 1em; }
&lt;/template&gt;
&lt;/code-demo&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/sass-parent-selector-2741.html&quot;&gt;Sass Parent Selector – ‚&amp;amp;‘ (ampersand)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/postcss-plugins-2692.html&quot;&gt;Nützliche PostCSS-Module&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/flexbox-fallbacks-2670.html&quot;&gt;Flexbox Fallbacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css-clip-path-2514.html&quot;&gt;CSS clip-path&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-shapes-2451.html&quot;&gt;CSS Shapes – neue Formen braucht das Web&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Webfonts *richtig* verwenden</title>
    <link href="https://maddesigns.de/archiv/webfonts-richtig-verwenden-2216.html" />
    <updated>2014-03-06T10:04:31Z</updated>
    <id>https://maddesigns.de/archiv/webfonts-richtig-verwenden-2216.html</id>
    <content type="html">&lt;p&gt;Da fragt sich jetzt der ein oder andere Webentwickler „Was kann man da falsch machen? Man bindet den &lt;a href=&quot;https://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax&quot; title=&quot;The New Bulletproof @Font-Face Syntax&quot;&gt;(new) Bulletproof @font-face Syntax&lt;/a&gt; ein und gut ist“. Problem hierbei wie immer unser geliebte OldIE, der Webfonts zwar schon im zarten Alter von Version 5.5 beherrschte, aber immer noch einen „alten“ Syntax braucht.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Das Problem:&lt;/strong&gt; faux-bold&lt;/p&gt;
&lt;!--more--&gt;
&lt;figure&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/4AjN6R8zCM-360.avif&quot; sizes=&quot;(min-width: 48em) 360px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/4AjN6R8zCM-360.webp&quot; sizes=&quot;(min-width: 48em) 360px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/4AjN6R8zCM-360.png&quot; alt=&quot;faux bold text&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;360&quot; height=&quot;201&quot;&gt;&lt;/picture&gt;
&lt;figcaption&gt;Fehldarstellung – der Browser interpoliert die Schriftfetten&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Das Problem ist nicht neu, 2012 schrieb Alan Stearns bei A List Apart den Artikel „&lt;a href=&quot;https://alistapart.com/article/say-no-to-faux-bold&quot; title=&quot;Say No to Faux Bold&quot;&gt;Say No to Faux Bold&lt;/a&gt;“ und erst kürzlich Gerrit van Aaken im Artikel „&lt;a href=&quot;https://praegnanz.de/weblog/webfonts-fette-fehlerquelle&quot; title=&quot;Webfonts: Fette Fehlerquelle&quot;&gt;Webfonts: Fette Fehlerquelle&lt;/a&gt;“.&lt;/p&gt;
&lt;p&gt;Abhilfe soll die Eigenschaft „&lt;a href=&quot;https://www.w3.org/TR/css-fonts-3/#font-synthesis-prop&quot; title=&quot;W3C Spec for font-synthesis&quot;&gt;font-synthesis&lt;/a&gt;“ schaffen:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.say-no-to-faux-bold {
  font-synthesis: none;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;leider wird die Eigenschaft von keinem Browser unterstützt :(&lt;/p&gt;
&lt;h2 id=&quot;font-face-einbindung-fur-moderne-browser&quot;&gt;@font-face Einbindung für moderne Browser&lt;a class=&quot;header-anchor&quot; href=&quot;#font-face-einbindung-fur-moderne-browser&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Um die Fehldarstellungen zu vermeiden, bindet man den Font wie folgt ein:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@font-face {
  font-family: Fontname; /* regular font */
  src: url(&amp;quot;Fontname-Regular.woff2&amp;quot;) format(&amp;quot;woff2&amp;quot;);
  font-weight: normal; font-style: normal; }

@font-face {
  font-family: Fontname; /* bold font */
  src: url(&amp;quot;Fontname-Bold.woff2&amp;quot;) format(&amp;quot;woff2&amp;quot;);
  font-weight: bold; font-style: normal; }

@font-face {
  font-family: Fontname; /* light font */
  src: url(&amp;quot;Fontname-Light.woff2&amp;quot;) format(&amp;quot;woff2&amp;quot;);
  font-weight: 300; font-style: normal; }

@font-face {
  font-family: Fontname; /* italic font */
  src: url(&amp;quot;Fontname-Italic.woff2&amp;quot;) format(&amp;quot;woff2&amp;quot;);
  font-weight: normal; font-style: italic; }

@font-face {
  font-family: Fontname; /* bolditalic font */
  src: url(&amp;quot;Fontname-BoldItalic.woff2&amp;quot;) format(&amp;quot;woff2&amp;quot;);
  font-weight: bold; font-style: italic; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;für Android zusätzlich TTF/OTF einbinden&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@font-face {
  font-family: Fontname; /* regular font */
  src: url(&amp;quot;path/Fontname-Regular.ttf&amp;quot;) format(&amp;quot;truetype&amp;quot;),
       url(&amp;quot;path/Fontname-Regular.woff&amp;quot;) format(&amp;quot;woff&amp;quot;),
       url(&amp;quot;path/Fontname-Regular.woff2&amp;quot;) format(&amp;quot;woff2&amp;quot;);
  font-weight: normal;
  font-style:  normal; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Zuweisung in Überschrift:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;h1 {
  font-family: Fontname, sans-serif;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;font-face-fur-old-ie-ie8&quot;&gt;@font-face für Old-IE (IE8)&lt;a class=&quot;header-anchor&quot; href=&quot;#font-face-fur-old-ie-ie8&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Für die älteren Internet Explorer, die das WOFF-Format nicht unterstützen, kann man die Schrift im EOT-Format einbinden. Hier denke ich auch immer an die Performance und an das Rendering der Schriften und empfehle meist, für die Browser keine Webfonts zu verwenden. Zudem sollte man die Zugriffsstatistik für die Versionen prüfen, bevor man sich die Mühe macht. Zugegeben bisher wollten noch nicht sehr viele Kunden der Empfehlung, die Schriften für IE8 weg zu lassen, folgen. ;)&lt;/p&gt;
&lt;p&gt;Für IE8 muss die Schriften wie folgt eingebunden werden:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* ie-specific.css */
@font-face {
  font-family: Fontname-regular; /* regular IE font */
  src: url(&amp;quot;Fontname-Regular.eot&amp;quot;); }

@font-face { /* bold IE font */
  font-family: Fontname-bold;
  src: url(&amp;quot;Fontname-Bold.eot&amp;quot;); }

@font-face { /* italic IE font */
  font-family: Fontname-italic;
  src: url(&amp;quot;Fontname-Italic.eot&amp;quot;); }

@font-face { /* bold italic IE font */
  font-family: Fontname-bolditalic;
  src: url(&amp;quot;Fontname-BoldItalic.eot&amp;quot;); }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;über Conditional Comments in die Seite einbinden&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;!--[if lt IE 9]&amp;gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;ie-specific.css&amp;quot; media=&amp;quot;screen&amp;quot; /&amp;gt;
&amp;lt;![endif]--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;font-loading-performance&quot;&gt;Font-Loading Performance&lt;a class=&quot;header-anchor&quot; href=&quot;#font-loading-performance&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Text der mit Webfonts ausgezeichnet ist, wird in einigen Browsern solange nicht angezeigt, bis die Schrift heruntergeladen ist, um den „FOUT“ (flash of unstyled text) zu vermeiden. Besonders nachteilig ist dieses Verhalten in mobilen Browsern, z.B. Mobile Safari (iOS), da das Laden im Mobilnetz häufig langsamer ist (Stichwort Latenz). Hier wartet man oftmals lange bis man endlich den Text lesen kann. Besonders ärgerlich ist das meiner Meinung nach bei Schriften, die nicht großartig anders aussehen als vorhandene Systemschriften. &lt;em&gt;(Typonazis werden mich jetzt steinigen)&lt;/em&gt;&lt;/p&gt;
&lt;figure&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/MpLVycZF7R-158.avif&quot; sizes=&quot;158px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/MpLVycZF7R-158.webp&quot; sizes=&quot;158px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/MpLVycZF7R-158.png&quot; alt=&quot;font-loading-ala&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;158&quot; height=&quot;280&quot;&gt;&lt;/picture&gt;
&lt;figcaption&gt;Webfont Loading Performance (FOUT)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;p&gt;&lt;strong&gt;Randnotiz:&lt;/strong&gt; Moderne Browser laden Schriften erst, wenn sie im CSS zugewiesen sind. Bedeutet also man könnte mehrere Schriften über @font-face verknüpfen, das Laden der Schrift erfolgt erst, wenn im CSS die Zuweisung über &lt;code&gt;font-family&lt;/code&gt; geschieht.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;In Firefox für Android kann man Webfonts über about:config deaktivieren (geht auch beim Desktop Firefox)&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gfx.downloadable_fonts.enabled = false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Auch die Zeit, wann ein Fallback-Font geladen wird, kann eingestellt werden, der Defaultwert ist aktuell 3000ms für die Anzeige des Fallback-Font.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gfx.downloadable_fonts.fallback_delay = 1000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;fallback-delay auf 1sek kürzen.&lt;/p&gt;
&lt;p&gt;Paul Irish hat für Chrome (Blink) letztens &lt;a href=&quot;https://plus.google.com/+PaulIrish/posts/MeoUmZxNRZB&quot; title=&quot;Paul Irish - Web Fonts and FOUT…&quot;&gt;eine Umfrage unter den Entwicklern gestartet&lt;/a&gt;, wie das Browserverhalten beim Laden von Schriften sein sollte. Ilya Grigorik beschreibt &lt;a href=&quot;https://plus.google.com/+IlyaGrigorik/posts/hEhRubu9za7&quot;&gt;auf Google+&lt;/a&gt; wie die Ladeperformance in Chrome verbessert wurde und sich Chrome in Zukunft wie Firefox verhält.&lt;/p&gt;
&lt;h3 id=&quot;fonts-base64-decodieren&quot;&gt;Fonts base64 decodieren&lt;a class=&quot;header-anchor&quot; href=&quot;#fonts-base64-decodieren&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;p&gt;⚠️ Fonts sollten nicht mit base64 codiert in CSS eingebunden werden, da das das Stylesheet unnötig aufbläst und somit das Rendering der Seite verzögert.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;webfontloader-webfonts-asynchron-laden&quot;&gt;Webfontloader – Webfonts asynchron laden&lt;a class=&quot;header-anchor&quot; href=&quot;#webfontloader-webfonts-asynchron-laden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/typekit/webfontloader&quot;&gt;Webfontloader&lt;/a&gt; ist ein Open-Source-Script von Typekit, mit dem man die Schriften von Typekit, Google, Fontdeck, Fonts.com und weiteren Foundries asynchron laden kann. Zu dem kann man auch selbst gehostete Fonts über den Webfontloader laden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Einbindung des Webfontloader&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;&amp;lt;script&amp;gt;
WebFontConfig = {
  typekit: { id: &#39;xxxxxx&#39; }
};
(function() {
  var wf = document.createElement(&#39;script&#39;);
  wf.src = (&#39;//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js&#39;;
  wf.type = &#39;text/javascript&#39;;
  wf.async = &#39;true&#39;;
  var s = document.getElementsByTagName(&#39;script&#39;)[0];
  s.parentNode.insertBefore(wf, s);
})();
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;font-events&quot;&gt;Font-Events&lt;a class=&quot;header-anchor&quot; href=&quot;#font-events&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Bindet man das Script ein, stellt Webfontloader beim Aufruf Klassen für die erfolgten Font-Events bereit. Das Script meldet also, was der aktuelle Zustand des Ladevorgangs ist. Die Klassen werden wie bei Modernizr zum&lt;/p&gt;
&lt;p&gt;&amp;lt;html&amp;gt; Class-Attribut hinzugefügt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Klassen, die Webfontloader hinzufügt:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.wf-loading
.wf-active
.wf-inactive
.wf-&amp;lt;familyname&amp;gt;-&amp;lt;fvd&amp;gt;-loading
.wf-&amp;lt;familyname&amp;gt;-&amp;lt;fvd&amp;gt;-active
.wf-&amp;lt;familyname&amp;gt;-&amp;lt;fvd&amp;gt;-inactive
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Verwendung im CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;h1, h2, h3 {
  font-family: sans-serif;
}

.wf-active h1, .wf-active h2, .wf-active h3 {
  font-family: &amp;quot;webfont&amp;quot;, sans-serif;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Beispiel: Einbindung der „Source Sans Pro“ mit Webfontloader über GoogleFonts.com:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;//= require webfonts.js
WebFont.load({
    google: { families: [ &amp;quot;Source+Sans+Pro:400,300,600:latin&amp;quot; ] }
    // load Source Sans Pro: light, normal, bold, light italic, normal italic, bold italic : latin subset
    // google: { families: [ &amp;quot;Source+Sans+Pro:400,300,700,700italic,400italic,300italic:latin&amp;quot; ] }
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wie sich vielleicht erahnen lässt, kann man in der Konfiguration mehrere Schriftschnitte, die man laden möchte, definieren.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;400 == normal&lt;/li&gt;
&lt;li&gt;700 == bold&lt;/li&gt;
&lt;li&gt;300 == light&lt;/li&gt;
&lt;li&gt;400italic == normal kursiv&lt;/li&gt;
&lt;li&gt;500 == medium&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mit dem Zusatz &lt;code&gt;:latin&lt;/code&gt; kann man den Zeichenumfang steuern, hier wären es alle lateinischen Schriftzeichen. Welche Schriftzeichen wirklich vorhanden sind, sollte man genau prüfen manchmal fehlen Schriftzeichen (skandinavische).&lt;/p&gt;
&lt;h3 id=&quot;native-html5-font-events&quot;&gt;native HTML5 Font-Events&lt;a class=&quot;header-anchor&quot; href=&quot;#native-html5-font-events&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;… gibt es noch nicht, sind aber bereits in einer &lt;a href=&quot;https://www.w3.org/TR/css-font-loading/&quot; title=&quot;W3C Font Loading Events&quot;&gt;ersten Version spezifiziert&lt;/a&gt;. Dafür gibt es aber bereits einen Polyfill: &lt;a href=&quot;https://github.com/bramstein/fontloader&quot; title=&quot;Font Loading Polyfill&quot;&gt;Polyfill für native Font-Events&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;lokale-system-fonts-bevorzugen&quot;&gt;lokale System-Fonts bevorzugen&lt;a class=&quot;header-anchor&quot; href=&quot;#lokale-system-fonts-bevorzugen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Nicht immer muss ein Webfont geladen werden, in Mac OSX ist z.B. seit Mavericks ‚PT Sans‘ im System verfügbar, den Font extra zu laden wäre unnötig. Mit dem Keyword ‚local‘ werden Systemfonts bevorzugt.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@font-face {
  font-family: &amp;quot;PT Sans&amp;quot;;
  src: local(&amp;quot;PT Sans&amp;quot;), local(&amp;quot;PTSans-Regular&amp;quot;), url(&amp;quot;fonts/ptsans-regular.woff&amp;quot;) format(&amp;quot;woff&amp;quot;),
       local(&amp;quot;PT Sans&amp;quot;), local(&amp;quot;PTSans-Regular&amp;quot;), url(&amp;quot;fonts/ptsans-regular.ttf&amp;quot;) format(&amp;quot;truetype&amp;quot;);
  font-weight: normal;
  font-style: normal;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Auch die in &lt;a href=&quot;https://iosfonts.com/&quot;&gt;iOS7&lt;/a&gt; hinzugekommene ‚Helvetica Neue Condensed Bold‘ kann über den &lt;a href=&quot;https://stackoverflow.com/questions/5612506/how-can-i-use-helvetica-neue-condensed-bold-in-css#comment30950211_5612781&quot;&gt;Post-Script Namen&lt;/a&gt; verwendet werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@font-face {
  font-family: Helvetica;
  font-weight: bold;
  src: local(HelveticaNeue-CondensedBold);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;fallback-font-auf-mobilen-geraten&quot;&gt;Fallback-Font auf mobilen Geräten&lt;a class=&quot;header-anchor&quot; href=&quot;#fallback-font-auf-mobilen-geraten&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wenn man responsive Webseiten erstellt, sollte man sich bewusst sein, dass nicht alle Schriften, die verwendet werden sollen, auch auf dem Endgerät vorhanden ist. Android hat nur wenige Schriften vorinstalliert. Jordan Moore hat eine &lt;a href=&quot;https://www.jordanm.co.uk/tinytype&quot; title=&quot;A compatibility table showing the available default system fonts across different mobile platforms&quot;&gt;Übersichttabelle der Systemfonts auf mobilen Systemen&lt;/a&gt; bereit gestellt. Allerdings fehlt dort noch ein iOS7 Update. ;)&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/l_OcXwK7AB-750.avif 750w, https://maddesigns.de/img/l_OcXwK7AB-944.avif 944w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/l_OcXwK7AB-750.webp 750w, https://maddesigns.de/img/l_OcXwK7AB-944.webp 944w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/l_OcXwK7AB-750.png&quot; alt=&quot;Beispiel Fallback fonts 1&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;944&quot; height=&quot;488&quot; srcset=&quot;https://maddesigns.de/img/l_OcXwK7AB-750.png 750w, https://maddesigns.de/img/l_OcXwK7AB-944.png 944w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/CV8Y9UJ3W_-750.avif 750w, https://maddesigns.de/img/CV8Y9UJ3W_-941.avif 941w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/CV8Y9UJ3W_-750.webp 750w, https://maddesigns.de/img/CV8Y9UJ3W_-941.webp 941w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/CV8Y9UJ3W_-750.png&quot; alt=&quot;Beispiel Fallback fonts 2&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;941&quot; height=&quot;446&quot; srcset=&quot;https://maddesigns.de/img/CV8Y9UJ3W_-750.png 750w, https://maddesigns.de/img/CV8Y9UJ3W_-941.png 941w&quot; sizes=&quot;auto, (min-width: 48em) 750px, 100vw&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Auf Android sind weder Arial, noch Helvetica oder Times installiert, die Standard-Schrift ist Droid (Sans/Serif). Man sollte meinen, wenn man &lt;code&gt;font-family: &#39;Times New Roman&#39;, Times, serif;&lt;/code&gt; angibt, dass Android dann auf den Serif Font zurück fällt. Anscheinend kann das Android ganz schön verwirren und führt zu Fehldarstellungen.&lt;/p&gt;
&lt;figure&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/Q4sW33RxjZ-320.avif&quot; sizes=&quot;(min-width: 48em) 320px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/Q4sW33RxjZ-320.webp&quot; sizes=&quot;(min-width: 48em) 320px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/Q4sW33RxjZ-320.png&quot; alt=&quot;fallback-fonts4&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;320&quot; height=&quot;225&quot;&gt;&lt;/picture&gt;
&lt;figcaption&gt;Samsung GT-I9300 (Android 4.1.2)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/fUVjoX4SoG-320.avif&quot; sizes=&quot;(min-width: 48em) 320px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/fUVjoX4SoG-320.webp&quot; sizes=&quot;(min-width: 48em) 320px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/fUVjoX4SoG-320.png&quot; alt=&quot;fallback-fonts3&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;320&quot; height=&quot;225&quot;&gt;&lt;/picture&gt;
&lt;figcaption&gt;Samsung GT-S5830 (Android 2.3.3)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Als Fix, damit alle getesteten Androids den Fallback-Font anzeigen, musste ‚Droid Serif‘ explizit angegeben werden. (HT &lt;a href=&quot;https://twitter.com/closingtag&quot;&gt;@closingtag&lt;/a&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;font-family: &#39;Serif Webfont&#39;, &#39;Droid serif&#39;, &#39;Times New Roman&#39;, Times, serif;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wer noch Ergänzungen hat, bitte einfach kommentieren.&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/sass-parent-selector-2741.html&quot;&gt;Sass Parent Selector – ‚&amp;amp;‘ (ampersand)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/postcss-plugins-2692.html&quot;&gt;Nützliche PostCSS-Module&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/flexbox-fallbacks-2670.html&quot;&gt;Flexbox Fallbacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css-clip-path-2514.html&quot;&gt;CSS clip-path&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-shapes-2451.html&quot;&gt;CSS Shapes – neue Formen braucht das Web&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Responsive Imagemap</title>
    <link href="https://maddesigns.de/archiv/responsive-imagemap-2194.html" />
    <updated>2014-02-17T13:37:14Z</updated>
    <id>https://maddesigns.de/archiv/responsive-imagemap-2194.html</id>
    <content type="html">&lt;p&gt;Ein Relikt aus dem Web 1.0 ist die Imagemap, bei der man Klickflächen über ein Bild positionieren kann. Der Vorteil zum normalen “Link um Bild” ist, dass dabei geometrische Formen und individuelle Polygone verwenden können, also z.B. eine Form die im Bild sichtbar ist, nachgebildet werden kann. Die Positionswerte dieser Klickflächen basieren allerdings auf Pixelwerten, und hier beginnt unser Problem.&lt;!--more--&gt;&lt;/p&gt;
&lt;p&gt;Das Bild responsive zu machen, ist nicht schwer:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;img {
  max-width: 100%;
  height: auto;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Imagemap-Area mit der Klickfläche passt sich allerdings nicht an, also auch wenn das Bild verkleinert auf ein Smartphone-Bildschirm passt, ist die Klickfläche noch immer in der Ausgangsgröße.&lt;/p&gt;
&lt;p&gt;Abhilfe schafft hier ein jQuery-Plugin von &lt;a href=&quot;https://twitter.com/stowball&quot;&gt;Matt Stow&lt;/a&gt; namens &lt;a href=&quot;https://github.com/stowball/jQuery-rwdImageMaps&quot;&gt;RWD-ImageMap&lt;/a&gt; , das die Klickflächen automatisch je Screen-Größe umrechnet. Die Einbindung ist einfach:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;//= require &amp;quot;vendor/jquery.min.js&amp;quot;
//= require &amp;quot;vendor/jquery.rwdImageMaps.min.js&amp;quot;
$(&#39;img[usemap]&#39;).rwdImageMaps();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Soweit so gut. Problem ist allerdings, dass man die Klickflächen nur mit einer Maus (oder Stylus) erfahren (im Sinne von mouseover) kann. Auf einem Touchdisplay hat man keinerlei visuelle Hilfen (Mauszeiger wechselt). Man müsste auf gut Glück überall tappen um zu erfahren, ob ein Bild eine Imagemap ist, in der bestimmte Bereiche verlinkt sind. Das ist natürlich problematisch und sollte bei der Konzeption bereits bedacht werden. Ich würde grundsätzlich davon abraten eine Imagemap im klassischen Sinne zu verwenden.&lt;/p&gt;
&lt;p&gt;Eine Idee von &lt;a href=&quot;https://twitter.com/dudleystorey&quot;&gt;Dudley Storey&lt;/a&gt; beschreibt eine &lt;a href=&quot;https://demosthenes.info/blog/760/Create-A-Responsive-Imagemap-With-SVG&quot;&gt;Umsetzung mithilfe von SVG&lt;/a&gt;. Hier sollte man beachten, dass &lt;a href=&quot;https://caniuse.com/svg-html5&quot;&gt;SVG direkt im HTML eingebunden&lt;/a&gt; unter Android 2.3 oder im Opera Mini nicht funktioniert. Weiterhin bin ich der Meinung, dass man die Klickflächen in SVG einen Rand geben sollte (zumindest für touchfähige Geräte), damit man sie eher als solche wahrnimmt.&lt;/p&gt;
&lt;h2 id=&quot;responsive-imagemap-mit-akkordion-liste&quot;&gt;Responsive Imagemap mit Akkordion-Liste&lt;a class=&quot;header-anchor&quot; href=&quot;#responsive-imagemap-mit-akkordion-liste&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In einem Projekt war eine responsive Imagemap allerdings Anforderung. Glücklicherweise waren die Klickflächen direkt im Bild farblich hinterlegt, so dass das den Eindruck einer Schaltfläche ergab. Der Tap auf eine visuelle Schaltfläche sollte den Beschreibungstext unterhalb der Imagemap einblenden.&lt;/p&gt;
&lt;p&gt;Ein paar Zeilen jQuery blendet die Texte ein und wieder aus:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;$(&#39;area&#39;).on(&#39;click&#39;, function(e) {
  e.preventDefault();
  var target = $(this).attr(&#39;href&#39;);
  var imagemapItems = $(&#39;.imagemap__item&#39;);
  imagemapItems.hide();
  $(target).show();
  $(target +&#39; &amp;gt; h3&#39;).addClass(&#39;is-open&#39;);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das CSS dazu (Desktopansicht):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media screen and (min-width: 48em) {
  .imagemap__item {
    display: none;
  }
  .imagemap__item:target {
    display: block;
  }
  .imagemap__item:target &amp;gt; .imagemap__text {
    display: block;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In der Smartphone-Ansicht bis maximal 600px (37.5em) sollte das Imagemap-Bild und die Überschriften der beschreibenden Texte angezeigt werden und als Akkordion dargestellt werden. Die Imagemap-Funktionalität sollte verhindert werden. Einerseits weil die Schaltflächen zu klein werden, andererseits weil der User nicht unbedingt eine Imagemap auf einem Touch-Device erwartet.&lt;/p&gt;
&lt;p&gt;Außerdem ist es problematisch, dass man die ImageMap-Klickflächen nicht mit CSS stylen kann. Man kann sie weder Off-Canvas positionieren, noch mit &lt;code&gt;display: none;&lt;/code&gt; ausblenden. Einzige Möglichkeit, das ImageMap-Markup mit JavaScript löschen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// remove ImageMaps Markup
var imageMaps = document.querySelectorAll(&amp;quot;.m-imagemap map&amp;quot;);
[].forEach.call( imageMaps, function(el) {
    el.parentNode.removeChild(el);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wie man in dem Beispiel sehen kann, werden hier Standard HTML5 Javascript Funktionen und nicht jQuery verwendet. In dem Projekt wurde sehr auf Performance geachtet. So wurde erst ab dem Bereich “Tablet” jQuery hinzu geladen. Smartphones mit HTML5-Unterstützung können anhand von CSS-Selektoren sowohl eine Auswahl generieren &lt;code&gt;document.querySelectorAll&lt;/code&gt;, als auch Klassen im DOM toggle’n &lt;code&gt;classList.toggle()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Eine einfache HTML5 class-toggle-Funktion mit Vanilla-JS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// select all H3 headers in .imagemap__item
var imageMapList =  document.querySelectorAll(&#39;.imagemap__item h3&#39;);

// on click handler to toggle .imagemap__text visibility
[].forEach.call(imageMapList, function(el) {
   el.addEventListener(&#39;click&#39;, function() {
     this.classList.toggle(&#39;is-open&#39;);
  }, false);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.js .imagemap__text {
  display: none;
}
.imagemap__item .is-open + .imagemap__text {
  display: block;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Für Android 2.3 muss man allerdings einen &lt;a href=&quot;https://github.com/eligrey/classList.js/&quot; title=&quot;classList Polyfill&quot;&gt;classList-Polyfill&lt;/a&gt; einbinden um die toggle Funktion zu nutzen (classList.toggle wird erst ab Android 4 unterstützt). Mit Modernizr testet man ob der Viewport maximal 600px breit ist und ob classList nicht unterstützt wird. Wenn der Test &lt;code&gt;true&lt;/code&gt; ergibt, wird die Polyfill-Datei (classList.min.js) geladen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;Modernizr.load([{
  test: Modernizr.mq(&amp;quot;only screen and (max-width: 600px)&amp;quot;) &amp;amp;&amp;amp; !Modernizr.classlist,
  yep: &amp;quot;./js/classList.min.js&amp;quot;;
}]);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ich hab mal versucht ein reduziertes Beispiel aus dem Projekt heraus zu eisen und separat zusammen zu bauen: &lt;a href=&quot;https://maddesigns.de/responsive-image-map/&quot; title=&quot;Responsive Image Map&quot;&gt;Demo Responsive Image Map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wie gesagt, technisch alles machbar, aber manchmal ist es besser die Inhalte konzeptionell zu ändern. Das bedingt aber einen anderen Prozess. Aber das ist ein anderes Thema…&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-navigation-ux-2650.html&quot;&gt;Responsive Navigation aus UX-Sicht&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-iframes-2417.html&quot;&gt;Responsive iFrames&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-tables-2393.html&quot;&gt;Responsive Tabellen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-svg-logos-2361.html&quot;&gt;Responsive SVG-Logos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html&quot;&gt;”CSS3 &amp;amp; Responsive Web” – CSS3 Adventskalender Tag 3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Responsive Images – width/height-Attribute entfernen, lazy loading &amp; padding-bottom Trick</title>
    <link href="https://maddesigns.de/archiv/responsive-images-lazy-loading-2151.html" />
    <updated>2014-02-10T08:00:58Z</updated>
    <id>https://maddesigns.de/archiv/responsive-images-lazy-loading-2151.html</id>
    <content type="html">&lt;p&gt;Für das Einbinden von Bildern im Responsive Webdesign wird häufig empfohlen die ‚width‘- und ‚height‘-Attribute im HTML-Quellcode zu entfernen. Das ist aber nicht nötig und meiner Meinung nach auch nicht gut in Hinblick auf hochauflösende Bilder.&lt;/p&gt;
&lt;p&gt;Mit CSS kann man die im HTML festgelegten Breiten überschreiben und die Bilder so flexibel machen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Responsive Images basics:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;img {
  max-width: 100%;
  height: auto;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das Bild passt sich somit immer dem Container an, wird aber nie größer als seine eigentliche Originalgröße in Pixel. Das dürfe sicherlich bekannt sein. Wenn das nicht funktioniert, liegt ein anderer „Fehler“ vor, wie ein anderer BFC durch ‚float‘ oder ähnliches.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Aber gehen wir mal zurück, auf das Problem der fehlenden ‚width‘ und ‚height‘ Attribute. Angenommen, dass Bild soll links im Text floaten. Wenn die Breiten- und Höhenattribute fehlen wird der Platz für das Bild im Layout nicht vorgehalten und der Text läuft über die gesamte Breite. Ist das Bild dann vollständig geladen, springt der Text und fließt um das Bild. Das kann je nachdem wie viele Bilder man lädt und was für ein Layout man hat, sehr hin-und-her springen. Der Browser führt jeweils einen Reflow durch.&lt;/p&gt;&lt;aside&gt;&lt;p&gt;&lt;/p&gt;
&lt;h3 id=&quot;exkurs-reflow-repaint-by-der-schepp&quot;&gt;Exkurs Reflow &amp;amp; Repaint (by &lt;a href=&quot;https://twitter.com/derSchepp&quot; title=&quot;Christian Schepp Schaefer&quot;&gt;D(e)r. Schepp&lt;/a&gt;)&lt;a class=&quot;header-anchor&quot; href=&quot;#exkurs-reflow-repaint-by-der-schepp&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Beim Rendering einer Seite unterscheidet man zwischen zwei Ereignissen: den Reflows, auch Relayouts genannt, und den Repaints:&lt;/p&gt;
&lt;p&gt;Bei einem Reflow-Ereignis wird das gesamte Layout aller, oder auch nur bestimmter Elemente neu berechnet. Der Wortbetandteil “Flow” ergibt sich aus der Art, wie HTML-Elemente aneinandergereiht werden, wie Bilder eines Comic-Heftes, von oben links nach unten rechts. Sie stehen also in einer Beziehung zueinander und Änderungen weiter oben im Dokument können zu einem Rattenschwanz an Reflowberechnungen für enthaltene und nachfolgende Elemente führen. Ein bisschen kann man sich das vorstellen, wie die kreisförmigen Wellen, wenn man einen Stein im Wasser versenkt. Reflowberechnungen werden immer dann angestoßen, wenn ein Element seine Größe verändert, also jemand Hand anlegt an Breite, Höhe, Margin, Padding oder Border, oder ein Element neu in den Dokumentenfluss eingefügt wird, durch erstmaliges Erzeugen, durch Sichtschalten oder durch ein Wegnehmen vorhandener absoluter Positionierung. Die dabei ausgelöste Reflow-Welle dehnt sich so lange weiter nach unten ins Dokument aus, bis es an einen umgebenden Container stößt, dessen Ausdehnung fest verdrahtet ist. Wenn z.B. außen herum um ein verändertes Element ein DIV-Container mit in CSS definierter width und height liegt, dann stoppt er die Welle wie ein Damm, weil er sich selbst ja nicht ausdehnen wird. Also schiebt er auch nichts nach unten, das ihm im Fluss folgt. Man sprich dann von einem Layout-Containment.&lt;/p&gt;
&lt;p&gt;Bei einem Repaint-Ereignis hingegen bleibt alles an Ort und Stelle. Die betroffenen Elemente erhalten nur einen neuen Farbanstrich. Repaints sind nötig, wenn sich Farben oder Texturen ändern, oder beispielsweise ein Element über ein anderes gezeichnet werden muss. Klassische Beispiele für Repaints sind Hover-Effekte, oder dauerhaft fixierte Menüs, die ständig andere Elemente der Seite überlagern.&lt;/p&gt;
&lt;p&gt;Einem Reflow folgt immer auch ein Repaint, deshalb ist ein Reflow für den Browser um ein vielfaches teurer in der Berechnung als ein Repaint. Und daher sollte man ihn tunlichst vermeiden.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ZTnIxIA5KGw&quot;&gt;Gecko Reflow Visualization&lt;/a&gt;&lt;/p&gt;&lt;/aside&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Zugegeben, wenn wir von Responsive Images reden, ist das mit der Angabe von ‚width‘- und ‚height‘-Attributen im HTML-Quellcode schon fast wieder hinfällig. Durch die Angabe &lt;code&gt;max-width: 100%; height: auto;&lt;/code&gt; muss der Browser die anzuzeigende Größe so oder so berechnen und das erzwingt dann den Reflow.&lt;/p&gt;
&lt;h2 id=&quot;hochauflosende-bilder-retina&quot;&gt;Hochauflösende Bilder / Retina&lt;a class=&quot;header-anchor&quot; href=&quot;#hochauflosende-bilder-retina&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bei der klassischen Einbindung von Bildern für hochauflösende Displays, aka Retina, geht man davon aus, dass man ein Bild in doppelter Größe einbindet. Bei der heutigen Varianz der Displaygrößen und Pixel-Ratios ist das um einiges komplizierter geworden, aber das ist noch mal ein anderes Thema…&lt;/p&gt;
&lt;p&gt;Gehen wir mal von der doppelten Bildgröße und folgendem Beispiel aus:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;p&amp;gt;
  &amp;lt;img src=&amp;quot;images2x.jpg&amp;quot; alt=&amp;quot;&amp;quot;&amp;gt;
  lorem ipsum
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Angenommen das Bild hat in einfacher Auflösung eine Größe von 400x300px, das Retina-Bild ist dementsprechend 800px breit. Ohne weitere Angaben würde das Bild im obigen Beispiel auf größeren Bildschirmen 800px breit angezeigt werden, bzw. so breit wie der Container ist. Initial wollten wir aber dass das Bild maximal 400px breit ist.&lt;/p&gt;
&lt;p&gt;Mit einer Breiten-Angabe &lt;code&gt;width=&amp;quot;400&amp;quot;&lt;/code&gt; im HTML wäre unser Retina-Bild auch nur max 400px breit und nicht größer.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;p&amp;gt;
  &amp;lt;img src=&amp;quot;images2x.jpg&amp;quot; width=&amp;quot;400&amp;quot; height=&amp;quot;300&amp;quot; alt=&amp;quot;&amp;quot;&amp;gt;
  lorem ipsum
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Demo: &lt;a href=&quot;https://codepen.io/maddesigns/full/bFwnK&quot;&gt;https://codepen.io/maddesigns/full/bFwnK&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An dieser Stelle möchte ich nicht auf Responsive Images (Adaptive Images) eingehen, also für die richtige Bildgröße für die passende Displaybreite an zu geben.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/responsive-images/&quot;&gt;Slides zum Thema „Responsive Images“&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;lazy-loading&quot;&gt;Lazy-Loading&lt;a class=&quot;header-anchor&quot; href=&quot;#lazy-loading&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Um nicht sofort alle Bilder zu laden, die nicht im Sichtbereich der Seite sind, gibt es schon seit Jahren eine Methode die man „Lazy Loading“ nennt. Alter Hut… Mit statischem Layout hatte man da kaum Probleme, mit flexiblem Layout schon. Einen faden Beigeschmack hat das allerdings, wenn Browser die Bilder &lt;span lang=&quot;en&quot;&gt;ondemand&lt;/span&gt; laden. Man umgeht damit den Preparser des Browsers, der schon Vorarbeit beim Aufruf der Seite leistet. Das Hinzufügen von DOM-Elementen durch das Lazy Loading ist „teuer“. Das merkt man besonders bei schwächeren mobilen Endgeräten. Das Bilder sofort laden ist in dem Sinne auch problematisch, da das die gesamte Ladezeit der Seite erhöht, Stichwörter: Requests und Latenzen. Ein Abwägen und Testen der Möglichkeiten ist immer notwendig, wobei ich grundsätzlich zu Lazy Loading tendiere, wenn der Scope hauptsächlich moderne Smartphones/Tablets ist.&lt;/p&gt;
&lt;h3 id=&quot;eine-schmale-lazy-loading-losungen-mit-js&quot;&gt;Eine schmale Lazy-Loading-Lösungen mit JS&lt;a class=&quot;header-anchor&quot; href=&quot;#eine-schmale-lazy-loading-losungen-mit-js&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://luis-almeida.github.io/unveil/&quot;&gt;Unveil.js&lt;/a&gt; ist ein kleines jQuery-/Zepto-Plugin, dass wahlweise auch Retina-Bilder laden kann.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;img src=&amp;quot;img/loader.gif&amp;quot; data-src=&amp;quot;img2.jpg&amp;quot; data-src-retina=&amp;quot;img2-retina.jpg&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;lazy-loading-wird-w3c-standard&quot;&gt;Lazy Loading wird W3C Standard&lt;a class=&quot;header-anchor&quot; href=&quot;#lazy-loading-wird-w3c-standard&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Solch ein Verhalten soll in Zukunft eigenständig und optimiert vom Browser selbst durchgeführt werden. Durch ein Attribut soll das Laden einer Resource verzögert werden. Microsoft hat dies bereits im IE11 umgesetzt. Ein Beispiel:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;img src=&amp;quot;example.jpg&amp;quot; lazyload=&amp;quot;1&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ich wiederhole das nochmal – Microsoft hat ein natives „Lazy Loading“ im Internet Explorer 11 bereits integriert. Fantastisch, oder?&lt;/p&gt;
&lt;p&gt;Allerdings ist das nicht ganz 1:1 von der Idee der JavaScript-Bibliotheken übernommen. „Lazyload“ bedeutet in dem Fall, der Browser lädt die Resource, das können z.B. auch &amp;lt;script&amp;gt; oder &amp;lt;video&amp;gt; Elemente sein, verzögert, also erst nachdem andere Resource geladen sind, auch wenn sie vorher im Dokument sind.&lt;/p&gt;
&lt;p&gt;Das Verhalten „Bild wird erst geladen, wenn es im Sichtbereich ist“ soll nach der &lt;a href=&quot;https://www.w3.org/TR/resource-priorities/#attr-postpone&quot;&gt;Resource-Priorities-Spezifikation&lt;/a&gt; mit dem Attribut &lt;code&gt;postpone&lt;/code&gt; möglich sein. Einen &lt;a href=&quot;https://github.com/lsvx/postpone&quot;&gt;Polyfill&lt;/a&gt; für &lt;code&gt;postpone&lt;/code&gt; gibt es bereits.&lt;/p&gt;
&lt;p&gt;Mit der aktuellen Lazy-Loading-Methode im Responsive Webdesign hat man weiterhin das Problem, dass beim Einsetzen der Bilder ein Reflow der Seite durchgeführt wird und der Text springt. Reminder: „teuer“.&lt;/p&gt;
&lt;h2 id=&quot;padding-bottom-trick&quot;&gt;padding-bottom Trick&lt;a class=&quot;header-anchor&quot; href=&quot;#padding-bottom-trick&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wenn man mit Bildern arbeitet, die ein gleichbleibendes Seitenverhältnis haben, z.B. 16:9 oder 4:3, dann kann man den benötigten Platz bereits vorhalten, so dass Text, der um das Bild fließen würde, bereits richtig positioniert ist und nicht springt wenn das Bild lädt.&lt;/p&gt;
&lt;p&gt;Der Container, der die Bilder beinhaltet, benötigt folgende CSS-Regeln:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.parent {
  display: block; /* if inline element */
  position: relative;
  height: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die richtige Container-Höhe wird anhand des festen Seitenverhältnis berechnet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Einfacher Dreisatz: 9 × 100% ∕ 16&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Dieser errechnete Wert, ist der Wert, der die Box nun durch padding-bottom visuell vergrößert. Das Bild innerhalb des Containers wird absolut positioniert und mit &lt;code&gt;width:&amp;amp;nbsp;100%&lt;/code&gt; sowie &lt;code&gt;height:&amp;amp;nbsp;100%&lt;/code&gt; auf die komplette Größe der Containerbox aufgespannt. Stimmt das Seitenverhältnis nicht, erkennt man das am verzerrten Bild.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.parent {
  display: block;
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  width: 100%;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.parent &amp;gt; .child {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  margin: 0;
  padding: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So kann man Bilder (in der passenden Bildschirmgröße) ondemand laden ohne dass der Text erneut ausgerichtet wird (reflow).&lt;/p&gt;
&lt;p&gt;Wenn Bilder aber nicht mit einer Container-Breite von 100% eingebunden sind, ist die Dreisatzrechnung eine andere. Angenommen das Bild soll links im Text mit einer Breite von 33% angezeigt werden, dann ist die Berechnung des padding-bottom Abstand folgendermaßen: 9 × 33% ∕ 16&lt;/p&gt;
&lt;p&gt;Den padding-bottom Trick beschreiben Anders Andersen &amp;amp; Tobias Järlund in Ihrem Smashing-Magazine Artikel &lt;a href=&quot;https://mobile.smashingmagazine.com/2013/09/16/responsive-images-performance-problem-case-study/&quot;&gt;Addressing The Responsive Images Performance Problem: A Case Study&lt;/a&gt; ausführlich.&lt;/p&gt;
&lt;h3 id=&quot;fixed-ratio-sass-mixin&quot;&gt;fixed ratio Sass mixin&lt;a class=&quot;header-anchor&quot; href=&quot;#fixed-ratio-sass-mixin&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Da man das ja nicht immer selbst ausrechnen möchte, kann man sich hier mit einem kleinen Sass-Mixin aus dem Sass-Toolkit behelfen:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// @mixin fixed-ratiobox();
//
// stealed from https://github.com/Team-Sass/toolkit/blob/master/compass/stylesheets/toolkit/_intrinsic-ratio.scss
//
// usage: @include fixed-ratiobox(4/3, 50%, &#39;img, figure&#39;);
//
$intrinsic-ratio: 16/9 !default;
$intrinsic-ratio-width: 100% !default;
$intrinsic-ratio-elements: &#39;&amp;gt; *&#39; !default;
$intrinsic-ratio-extend: true !default;
$intrinsic-ratio-direction: bottom !default;

@mixin intrinsic-ratio-parent($extend: $intrinsic-ratio-extend) {
    @if $extend {
      @extend %intrinsic-ratio-parent;
    }
    @else {
      display: block;
      position: relative;
      height: 0;
    }
}

@mixin intrinsic-ratio-child($extend: $intrinsic-ratio-extend) {
  @if $extend {
    @extend %intrinsic-ratio-child;
  }
  @else {
    display: block;
    position: absolute;
    width: 100%; // !important Nuke the external styles
    height: 100%; // !important Nuke the external styles
    top: 0;
    margin: 0;
    padding: 0;
  }
}

@mixin intrinsic-ratio-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $direction: $intrinsic-ratio-direction) {
  padding-#{$direction}: (1 / $ratio) * $width;
  width: $width;
}

@mixin intrinsic-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend, $direction: $intrinsic-ratio-direction) {
  @include intrinsic-ratio-parent($extend);
  @include intrinsic-ratio-ratio($ratio, $width, $direction);

  @each $element in $elements {
    #{$element} {
       @include intrinsic-ratio-child($extend);
    }
  }
}

@mixin fixed-ratiobox($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend, $direction: $intrinsic-ratio-direction) {
  @include intrinsic-ratio($ratio, $width, $elements, $extend, $direction);
}

%intrinsic-ratio-parent {
  @include intrinsic-ratio-parent(false);
}

%intrinsic-ratio-child {
  @include intrinsic-ratio-child(false);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Anwendung des fixed ratio Mixins&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.parent {
  @include fixed-ratiobox(2/1);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Der generierte CSS-Code:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.parent {
  position: relative;
  height: 0;
  padding-bottom: 50%;
  width: 100%;
}
.parent &amp;gt; * {
  display: block;
  position: absolute;
  width: 100% !important;
  height: 100% !important;
  top: 0;
  margin: 0;
  padding: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Einbindung einer Box mit festem 4:3 Seitenverhältnis, welche aber nur 50% der Container-Breite einnimmt und für ‚IMG‘ oder ‚FIGURE‘ Kindelemente gilt, geht so:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.wrapperclass {
  @include fixed-ratiobox(4/3, 50%, &#39;img, figure&#39;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.wrapperclass {
  position: relative;
  height: 0;
  padding-bottom: 37.5%;
  width: 50%;
}
.wrapperclass img, .wrapperclass figure {
  display: block;
  position: absolute;
  width: 100% !important;
  height: 100% !important;
  top: 0;
  margin: 0;
  padding: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wer damit herum spielen möchte, kann das mit &lt;a href=&quot;https://sassmeister.com/gist/8720504&quot;&gt;Sassmeister&lt;/a&gt; machen.&lt;/p&gt;
&lt;p&gt;Wie man vielleicht auch schon erahnen kann, ist das nicht nur hilfreich für Bilder im festen Seitenverhältnis, sondern auch allgemein für Inhaltselemente mit festem Seitenverhältnis. Diese Technik nutzt man unter anderem auch für die Einbindung von responsive Youtube-Videos. Marc Hinse beschreibt die Technik für gleiche Seitenverhältnisse in seinem Artikel &lt;a href=&quot;https://www.mademyday.de/css-height-equals-width-with-pure-css.html&quot;&gt;Height equals width with pure CSS&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&quot;related&quot;&gt;&lt;h4&gt;Weitere Artikel zum Thema:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-navigation-ux-2650.html&quot;&gt;Responsive Navigation aus UX-Sicht&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-iframes-2417.html&quot;&gt;Responsive iFrames&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-tables-2393.html&quot;&gt;Responsive Tabellen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/responsive-svg-logos-2361.html&quot;&gt;Responsive SVG-Logos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html&quot;&gt;”CSS3 &amp;amp; Responsive Web” – CSS3 Adventskalender Tag 3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/section&gt;
</content>
  </entry>
  <entry>
    <title>Static Site Generators</title>
    <link href="https://maddesigns.de/archiv/static-site-generators-2138.html" />
    <updated>2014-01-29T20:31:19Z</updated>
    <id>https://maddesigns.de/archiv/static-site-generators-2138.html</id>
    <content type="html">&lt;p&gt;Anfang letzten Jahres habe ich mir überlegt, wie ich meine hauptsächliche Arbeit beschleunigen und verbessern kann. Mein aktueller Job besteht zumeist darin, Responsive Webdesigns in HTML-Templates umzusetzen, die dann im Anschluss in der Software-Entwicklung weiter verarbeitet werden. Manchmal sind es Templates für Content-Management-Systeme, oft ist es aber auch die Grundlage für Java-betriebene Webseiten. Ich habe überlegt, wie ich schnell und flexibel statische HTML-Templates generieren, gleichzeitig mit Sass (Compass) entwickeln und ein Browser-Reload (Live-Reload) machen kann. Einige Systeme habe ich mir angeschaut und möchte kurz meine Erfahrung teilen.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h2 id=&quot;hammer-for-mac&quot;&gt;Hammer for Mac&lt;a class=&quot;header-anchor&quot; href=&quot;#hammer-for-mac&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Als erstes habe ich mir „&lt;a href=&quot;https://hammerformac.com/&quot;&gt;Hammer for Mac&lt;/a&gt;“ angeschaut. Hammer ist meiner Meinung nach ein einfaches Tool, um ein paar statische HTML-Seiten zusammen zu schrauben. Beim ersten Testlauf stellte ich aber schnell fest, dass Hammer nicht das machen konnte, was ich damit machen wollte.&lt;/p&gt;
&lt;p&gt;Problem: Hammer konnte (damals?) keine HTML-Dateien in Unterverzeichnisse kompilieren — das ist doof. Zudem unterstützt Hammer Compass nicht. Das war auch suboptimal, autoprefixer &amp;amp; Co. gab es noch nicht.&lt;/p&gt;
&lt;p&gt;Für Hammer gibt es ein kleines (eigenständiges) Zusatztool, das die statischen Seiten über einen kleinen (Ruby-) Server ausliefert – &lt;a href=&quot;https://anvilformac.com/&quot;&gt;Anvil Server&lt;/a&gt;. Man kann so ganz easy virtualle Hosts wie &lt;a href=&quot;https://project.dev&quot;&gt;https://project.dev&lt;/a&gt; anlegen. Das fand ich ganz gut.&lt;/p&gt;
&lt;p&gt;Wie aber schon erwähnt, reichte Hammer für meine Anforderungen nicht aus.&lt;/p&gt;
&lt;h2 id=&quot;codekit&quot;&gt;Codekit&lt;a class=&quot;header-anchor&quot; href=&quot;#codekit&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://incident57.com/codekit/&quot;&gt;Codekit&lt;/a&gt; ist eine beliebte Software, die viele Sachen vereint, sämtliche CSS-Präprozessoren sind integriert, zudem JS-Hint/-Lint, Bildkompremierung u.v.m. Ich hatte mir sofort die Beta-Version angesehen und fand es soweit ganz gut. Mit Verlassen der Beta-Phase wurde Codekit kostenpflichtig, kurz danach wurde eine neue Template-Engine in Codekit integriert. Zu dem Zeitpunkt hatte ich mich schon mit Middleman beschäftigt, aber dazu später mehr. Die Template-Language „Kit“ ist meiner Meinung nach nicht ausreichend für etwas komplexere Templates, man kann lediglich einfache „Includes“, sowas wie SSI &amp;amp; Variablen verwenden. Es fehlen aber Schleifen oder If-Else-Bedingungen. Beim Anlegen einer mehr-oder-weniger dynamischen Navigation (beispielsweise mit class=“active” für die aktuelle Seite) scheitert man bereits.&lt;/p&gt;
&lt;p&gt;Sonst ist Codekit aber ein feines Tool, mit Browser-Reload und allem was man normal braucht.&lt;/p&gt;
&lt;h2 id=&quot;prepos&quot;&gt;Prepos&lt;a class=&quot;header-anchor&quot; href=&quot;#prepos&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://alphapixels.com/prepros/&quot;&gt;Prepos&lt;/a&gt; ist ein Tool, welches ich mal ausprobiert hatte, als ich gezwungen war, vier Wochen in einer Agentur auf einem Windows-Rechner zu coden. Ein Vorteil von Prepos: es ist Windows fokussiert (gibt es aber auch für Mac) und funktioniert wohl ganz gut, soweit ich gehört habe. Mein Problem war, dass ich die Compass-Struktur, die wir in dem Projekt hatten nicht abbilden konnte. So war das Experiement schnell erledigt.&lt;/p&gt;
&lt;h2 id=&quot;mixtureio&quot;&gt;Mixture.io&lt;a class=&quot;header-anchor&quot; href=&quot;#mixtureio&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://mixture.io/&quot;&gt;Mixture&lt;/a&gt; hatte ich mir ebenfalls in einer frühen Alpha-Version angesehen und ich war vom Featureset sofort begeistert. Mit Mixture ist es möglich komplexere Templates (mit Partials, etc.) umzusetzen. Die benutzte Template-Language ist &lt;a href=&quot;https://liquidmarkup.org/&quot;&gt;Liquid&lt;/a&gt;. Zudem kann man mit Mixture neue Projekte mit Vorlagen wie Foundation oder Bootstrap starten.&lt;/p&gt;
&lt;p&gt;Mixture unterstützt eine Daten-Anbindung über JSON, so dass man auf Grund von echten Daten statische Templates erstellen könnte. Das ist toll!&lt;/p&gt;
&lt;p&gt;Mixture habe ich mittlerweile schon mehreren Kollegen empfohlen und würde es sofort wieder empfehlen, wenn man sich nicht gern auf der Konsole bewegt. Aber dazu sind ja die Tools da, sie nehmen einen die Arbeit mit der Konsole ab, kosten dafür aber Geld. ;)&lt;/p&gt;
&lt;h2 id=&quot;middleman&quot;&gt;Middleman&lt;a class=&quot;header-anchor&quot; href=&quot;#middleman&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Im Kontext „Static Site Generators” taucht auch schnell &lt;a href=&quot;https://middlemanapp.com/&quot;&gt;Middleman&lt;/a&gt; auf. Wie der Name schon sagt, ist das die Software „dazwischen“. Middleman ist Ruby-basiert und unterstützt demzufolge die Ruby Template-Sprachen ERB, HAML, Slim, etc., aber auch Markdown (Kramdown) oder Jade.&lt;/p&gt;
&lt;p&gt;Mit Middleman würde auch gleichzeitig Sass und Compass installiert werden, falls man es nicht bereits installiert hat. Middleman hat einen Server-Task, in dem ein kleiner Ruby-Server für Dateiänderungen gestartet wird. Zudem gibt es natürlich einen Build-Task. Auch für Middleman gibt es &lt;a href=&quot;https://directory.middlemanapp.com/#/templates/all&quot;&gt;Vorlagen&lt;/a&gt;, mit denen man neue Projekte starten kann. Da das aber Open-Source und Community-getrieben ist, werden hier nicht so oft Updates oder neue Versionen veröffentlicht. Anders bei Mixture.io, dort sorgt die Firma dafür, dass Updates oder neue Template-Vorlagen-Versionen schnell zur Verfügung gestellt werden. Ein USP von mixture.io.&lt;/p&gt;
&lt;p&gt;Aber zurück zu Middleman: Weiterhin gibt es für Middleman auch viele Plugins wie &lt;a href=&quot;https://github.com/porada/middleman-autoprefixer&quot;&gt;middleman-autoprefixer&lt;/a&gt; oder &lt;a href=&quot;https://github.com/middleman/middleman-livereload&quot;&gt;middleman-livereload&lt;/a&gt;. In der Middleman-Dokumentation werden ERB-Template-Beispiele verwendet. ERB ist für den Einstieg in die Ruby-Template-Engines auch ganz gut, da diese nicht so abstrakt ist wie z.B. HAML. Es sind einige Template-Helper in Middleman integriert. Es können z.B. Platzhaltertexte eingebunden werden, die je Aufruf variieren. Das ist besonders hilfreich beim Erstellen von Responsive Websites, abseits von Lorem Ipsum. In der Konfiguration kann man für den Build-Prozess einstellen, ob JavaScript oder CSS komprimiert und zusammengefasst werden. Middleman unterstützt auch die Rails-Asset-Pipeline sowie Asset-Caching. Eigentlich alles was man für ein statisches Template/eine statische Seite benötigt. Gute Tutorials zu Middleman:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://benfrain.com/understanding-middleman-the-static-site-generator-for-faster-prototyping/&quot;&gt;Understanding Middleman – the static site generator for faster prototyping&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://12devs.co.uk/articles/204/&quot;&gt;Building static websites with Middleman&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;jekyll&quot;&gt;Jekyll&lt;a class=&quot;header-anchor&quot; href=&quot;#jekyll&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Jekyll wird aktuell häufig als statischer „Blogersatz“ verwendet. Das ist in Wirklichkeit auch schon das, was man am besten damit machen kann: Jekyll bietet neben der Möglichkeit Inhalte in Markdown-Dialekten oder HTML in verschiedenen Layouts zu publizieren, hauptsächlich Möglichkeiten, die aus der Blogging-Welt kommen: Kategorien, Tags, Posts und dazu passende Paginatoren. Für Entwickler eignet sich das ganze als Ersatz für WordPress ganz besonders: Jekyll publiziert absolut problemlos auf GitHub Pages (ein Wunder, entstammt doch Jekyll auch aus der Feder des GitHub CEOs Tom Preston-Werner) und hat mit Pygments einen Syntax-Highlighting Präprozessor, der diverse JavaScript-Bibliotheken obsolet macht. Mit &lt;a href=&quot;https://getpoole.com/&quot;&gt;Poole&lt;/a&gt; ist sogar ein recht brauchbares Starterkit für Jekyll verfügbar.&lt;/p&gt;
&lt;p&gt;Will man über die übliche Dokumentation- oder Blogfunktionalität hinaus, stößt man allerdings schnell an die Grenzen des von Jekyll. Zwar kann man sich zahlreicher &lt;a href=&quot;https://jekyllrb.com/docs/plugins/&quot;&gt;Plugins&lt;/a&gt; bedienen, an die Möglichkeiten die z.B. Assemble (mit Handlebars Helpers) oder Jade bieten, kommt Jekyll nicht heran.&lt;/p&gt;
&lt;h2 id=&quot;assemble&quot;&gt;Assemble&lt;a class=&quot;header-anchor&quot; href=&quot;#assemble&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ich habe lang gezögert mich näher mit Grunt zu beschäftigen, da ich letztes Jahr nicht so viel Schnittpunkte mit meiner Arbeit gesehen habe. Ich war und bin mit Middleman äußerst zufrieden und würde wahrscheinlich ausschließlich Middleman nutzen.&lt;/p&gt;
&lt;p&gt;Im aktuellen Projekt wird allerdings Grunt für die JavaScript-Entwicklung eingesetzt, was Sinn ergibt. Die Überlegung war nun, ob man nicht die Templates, die für die Module, die clientseitig (mit Javascript) verarbeitet werden, die gleiche Template-Engine nutzen könnte. Bei der Suche nach einer Template-Engine, die das unterstützt, bin ich auf &lt;a href=&quot;https://assemble.io&quot;&gt;Assemble&lt;/a&gt; gestoßen. Assemble nutzt &lt;a href=&quot;https://handlebarsjs.com/&quot;&gt;Handlebars&lt;/a&gt; als Template-Engine und unterstützt zusätzlich eine Vielzahl an &lt;a href=&quot;https://github.com/assemble/handlebars-helpers&quot;&gt;Template-Helpern&lt;/a&gt;. Zudem ist die Community recht groß (obwohl das Projekt noch recht neu ist) und es werden für Assemble bereits viele Plugins angeboten. Ich muss das aber erstmal produktiv ausprobieren, Assemble sieht aber sehr vielversprechend aus.&lt;/p&gt;
&lt;h3 id=&quot;fazit&quot;&gt;Fazit:&lt;a class=&quot;header-anchor&quot; href=&quot;#fazit&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Es fällt mir schwer eine Empfehlung auszusprechen. Ich habe im letzten Jahr mehrere Projekte mit Middleman umgesetzt und werde es sicherlich weiterhin benutzen. Hätte ich mich nicht so sehr mit Middleman angefreundet, gleichzeitig auch mit der Konsole, würde ich aktuell zu Mixture tendieren. Wer viel mit Grunt arbeitet, sollte sich vielleicht Assemble anschauen, das macht für mich aktuell den besten Eindruck als Static Site Generator mit Grunt. Unter &lt;a href=&quot;https://staticsitegenerators.net/&quot;&gt;https://staticsitegenerators.net/&lt;/a&gt; findet man eine laaaaaange Liste von aktuell 220 Tools.&lt;/p&gt;
&lt;p&gt;Eine lustigen Tweet zum Thema hab ich heute auch entdeckt. ;)&lt;/p&gt;
&lt;blockquote class=&quot;twitter-tweet&quot; lang=&quot;de&quot;&gt;
  &lt;p&gt;
    the net award for best static site generator goes to Dreamweaver
  &lt;/p&gt;
  &lt;p&gt;
    &amp;mdash; jennmoneydollars (@jennschiffer) &lt;a href=&quot;https://twitter.com/jennschiffer/statuses/428525919155003394&quot;&gt;29. Januar 2014&lt;/a&gt;
  &lt;/p&gt;
&lt;/blockquote&gt;
</content>
  </entry>
  <entry>
    <title>Styleguide generieren mit Sass &amp; Grunt</title>
    <link href="https://maddesigns.de/archiv/styleguide-mit-grunt-2093.html" />
    <updated>2014-01-06T08:56:55Z</updated>
    <id>https://maddesigns.de/archiv/styleguide-mit-grunt-2093.html</id>
    <content type="html">&lt;p&gt;Ein in größeren Projekten immer wichtiger werdendes Thema ist in meinen Augen ein Styleguide, der einerseits als Dokumentation und andererseits für externe Dienstleister als Referenz genutzt werden kann.&lt;/p&gt;
&lt;p&gt;Früher™ als man das Design ausschließlich in Photoshop machte, wurde natürlich auch der Styleguide in Photoshop erstellt — mit Bemaßung LOL! Diese Vorlage sollten Webentwickler dann nutzen, um ein Design möglichst pixelgenau umzusetzen. Ich kann mich an keinen „Styleguide“ erinnern, der zu 100% stimmte. Häufig waren Fehler in der „Bemaßung“ oder in Farbwerten… ihr kennt das.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Die „gedruckten“ Styleguides sind natürlich nicht mehr zeitgemäß. Im Responsive Webdesign können Webseiten-Elemente in unterschiedlichen Ausgabegrößen unterschiedlich dargestellt werden. Zudem werden im agilen &lt;a href=&quot;https://maddesigns.de/responsive-workflow/&quot; title=&quot;Responsive Workflow&quot;&gt;Responsive Workflow&lt;/a&gt; Designelemente auch geändert und sehen u.U. nicht mehr so aus, wie es der Designer geplant hatte.&lt;/p&gt;
&lt;p&gt;(Anekdote am Rande: Im aktuellen Projekt wurde das Aussehen bei ca. ¾ der Elemente/Module während des agilen Entwicklungsprozess nach Rücksprache mit dem Designer geändert)&lt;/p&gt;
&lt;p&gt;Ein „Living Styleguide“, der das Projekt widerspiegelt (also vielleicht responsive ist) und bei Veränderungen ohne großen Aufwand neu generiert wird, brauchte man. Gibt es! Grunt zu Hülf! :)&lt;/p&gt;
&lt;h3 id=&quot;grunt-the-javascript-task-runner&quot;&gt;Grunt – The JavaScript Task Runner&lt;a class=&quot;header-anchor&quot; href=&quot;#grunt-the-javascript-task-runner&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://gruntjs.com/&quot;&gt;Grunt&lt;/a&gt; ist ein Kommandozeilen „Task Runner“, mit dem man automatisiert Aufgaben erledigen lassen kann. Zum Beispiel kann man &lt;span lang=&quot;en&quot;&gt;JavaScript&lt;/span&gt; auf Validität oder sauberer Schreibweise mit „jslint/jshint“ überprüfen oder Sass kompilieren und eine Vielzahl weiterer Tasks erledigen lassen. Tiefer will ich nicht auf Grunt(d)lagen eingehen, gute Einsteigerartikel findet ihr unter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://webkrauts.de/artikel/2012/build-tool-grunt&quot;&gt;Webkrauts-Artikel&lt;/a&gt; von Frederic Hemberger (@fhemberger) und&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://24ways.org/2013/grunt-is-not-weird-and-hard/&quot;&gt;Grunt-Einführung (en)&lt;/a&gt; von Chris Coyier&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;grunt-styleguide&quot;&gt;Grunt-Styleguide&lt;a class=&quot;header-anchor&quot; href=&quot;#grunt-styleguide&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Automatisierung von Webentwicklungsaufgaben ist super. Da liegt es natürlich nahe, auch Styleguides automatisiert erstellen zu lassen. Mit &lt;a href=&quot;https://github.com/indieisaconcept/grunt-styleguide&quot;&gt;Grunt-Styleguide&lt;/a&gt; gibt es ein Grunt-Modul, das das für uns erledigen kann.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Installation von Grunt-Styleguide:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install grunt-styleguide --save-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Grunt-Modul-Konfiguration lässt zwei „Styleguide-Frameworks“ zu. Per Default ist &lt;a href=&quot;https://jacobrask.github.io/styledocco/&quot;&gt;Styledocco&lt;/a&gt; aktiv. Styledocco lässt allerdings keine eigenen Styleguide-Vorlagen zu. Das andere Framework, das mit Grunt-Styleguide verwendet werden kann, ist &lt;a href=&quot;https://hughsk.github.io/kss-node/&quot;&gt;KSS-node&lt;/a&gt; und ist ebenfalls bereits im Modul enthalten. Der Node.js-Port von &lt;a href=&quot;https://github.com/kneath/kss&quot;&gt;KSS&lt;/a&gt;, das für die Styleguide-Generierung des &lt;a href=&quot;https://github.com/styleguide/css/&quot;&gt;Github.com Styleguide&lt;/a&gt; verwendet wird, eignet sich meiner Meinung nach besser um individuelle Styleguides zu generieren.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Styleguide-Konfiguration in gruntfile.js:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// only the styleguide part of the gruntfile.js
styleguide: {
    options: {
        template: {
            src: &amp;quot;styleguide/template/&amp;quot;
        },
        framework: {
            name: &amp;quot;kss&amp;quot;
        }
    },
    all: {
        files: [{
            &amp;quot;dist/styleguide&amp;quot;: &amp;quot;css/sass/**/*.scss&amp;quot;
        }]
    }
}

grunt.registerTask(&amp;quot;build&amp;quot;, [], function () {
    grunt.loadNpmTasks(&amp;quot;grunt-styleguide&amp;quot;);
    grunt.task.run(&amp;quot;styleguide&amp;quot;);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Styleguide-Vorlage&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Mit KSS-node ist es möglich, ein eigenes Styleguide-Template zu verwenden und somit den Styleguide an das Look and Feel des Projektes anzupassen.&lt;/p&gt;
&lt;p&gt;Im Grunt-Modul ist unter &lt;code&gt;templates/kss/index.html&lt;/code&gt; eine Beispiel-Datei hinterlegt. Diese Vorlage kann man in ein anderes Verzeichnis kopieren und nach belieben anpassen. Das Template ist mit &lt;a href=&quot;https://handlebarsjs.com/&quot;&gt;Handlebars&lt;/a&gt; Helpern ausgestattet, um eine flexible Ausgabe der Daten zu ermöglichen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Styleguide-Navigation in der Styleguide-Vorlage:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;&amp;lt;ul class=&amp;quot;styleguide-navigation&amp;quot;&amp;gt;
  {{#eachRoot}}
    &amp;lt;li&amp;gt;
      &amp;lt;a href=&amp;quot;section-{{reference}}.html&amp;quot;&amp;gt;
        {{reference}}.0: {{header}}
      &amp;lt;/a&amp;gt;
    &amp;lt;/li&amp;gt;
  {{/eachRoot}}
&amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Soweit, so gut. Das Styleguide-Template liegt vor und der Grunt-Task ist konfiguriert, jetzt nur noch den Sass-Code kommentieren und der Styleguide kann erstellt werden.&lt;/p&gt;
&lt;h3 id=&quot;sass-kommentare-in-styleguide-umwandeln&quot;&gt;Sass Kommentare in Styleguide umwandeln&lt;a class=&quot;header-anchor&quot; href=&quot;#sass-kommentare-in-styleguide-umwandeln&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die einzelnen Styleguide-Abschnitte werden anhand von Kommentaren im CSS bzw. direkt aus den Sass-Kommentaren generiert. Das hat gleichzeitig den Vorteil, dass Entwickler ihren Code kommentieren. :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein Beispiel:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// Links
//
// usual links and style for external links
//
// Markup: &amp;lt;a href=&amp;quot;&amp;quot; class=&amp;quot;{$modifiers}&amp;quot;&amp;gt;Link&amp;lt;/a&amp;gt;
//
// :visited  - visited styles
// :hover    - Highlight the button when hovered.
// :focus    - focus styles
// :active   - &amp;quot;Press&amp;quot; the button down when clicked.
// .external - external link styles
//
// Styleguide 1.1

a {
	color: $link-color;
	text-decoration: underline;

	&amp;amp;:visited {
		color: $link-colorV;
	}
	&amp;amp;:hover {
		color: $link-colorH;
	}
	&amp;amp;:focus {
		color: $link-colorF;
		outline: thin dotted;
	}
	&amp;amp;:active {
		color: $link-colorA;
		outline: none;
	}
	&amp;amp;:hover,
	&amp;amp;:active {
		outline: none;
	}
	&amp;amp;.external {
		color: $link-external;
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In den Kommentaren kann man mehrere Teile der Styleguide-Section Beschreibung unterbringen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// Titel
//
// Beschreibung
//
// Markup:
// &amp;lt;div&amp;gt;
//   &amp;lt;span&amp;gt;HTML-Code&amp;lt;/span&amp;gt;
//   &amp;lt;span&amp;gt;mehrzeilig&amp;lt;/span&amp;gt;
// &amp;lt;/div&amp;gt;
//
// Modifiers ({$modifiers})
// z.B. Pseudo-Klassen oder Modifier-Klassen
// plus Beschreibung
//
// Styleguide Abschnitt (1.1)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Als großer Unterschied zum &lt;a href=&quot;https://github.com/kneath/kss&quot;&gt;original KSS&lt;/a&gt; Styleguide, der auf Ruby basiert, ist es mit KSS-node möglich über den „Markup-Teil“ in den Kommentaren auch Markup-Beispiele im Styleguide anzuzeigen. Zudem wird pro Modifier das Markup mit der Modifier-Klasse in den Styleguide eingefügt. Bei Pseudo-Klassen wie &lt;code&gt;:hover&lt;/code&gt; wird das Styling dann per JavaScript (kss.js) on-the-fly eingesetzt.&lt;/p&gt;
&lt;p&gt;Die freie Gestaltung des Markups lässt natürlich auch zu, dass man ganze Seitenmodule im Styleguide abbilden kann.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel Suchfeld:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// Search
//
// Below are global search field and search result list styles
//
// Styleguide 4

// global search field
//
// Markup:
// &amp;lt;form action=&amp;quot;&amp;quot; class=&amp;quot;global-search&amp;quot;&amp;gt;
//   &amp;lt;fieldset&amp;gt;
//     &amp;lt;label for=&amp;quot;search_field&amp;quot;&amp;gt;Search&amp;lt;/label&amp;gt;
//     &amp;lt;input type=&amp;quot;search&amp;quot; id=&amp;quot;search_field&amp;quot;
//            name=&amp;quot;search_field&amp;quot;
//            placeholder=&amp;quot;enter search term&amp;quot;&amp;gt;
//     &amp;lt;button type=&amp;quot;submit&amp;quot; class=&amp;quot;btn-submit&amp;quot;&amp;gt;Search&amp;lt;/button&amp;gt;
//   &amp;lt;/fieldset&amp;gt;
// &amp;lt;/form&amp;gt;
//
// Styleguide 4.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ich habe in den Styleguide noch den &lt;a href=&quot;https://prismjs.com/&quot;&gt;Prism-Syntax-Highlighter&lt;/a&gt; von &lt;a href=&quot;https://lea.verou.me/&quot;&gt;Lea Verou&lt;/a&gt; integriert, et voilà, der Living-Styleguide nimmt Formen an.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Screenshots&lt;/strong&gt;&lt;/p&gt;
&lt;img src=&quot;https://maddesigns.de/img/2014/01/Styleguide3.jpg&quot; alt=&quot;Styleguide3&quot; title=&quot;&quot; width=&quot;1280&quot; height=&quot;960&quot; class=&quot;aligncenter size-full wp-image-2096&quot;&gt;
</content>
  </entry>
  <entry>
    <title>Mobile First &amp; IE8 Fallback mit Sass (Teil2)</title>
    <link href="https://maddesigns.de/archiv/mobile-first-ie8-fallback-mit-sass-teil2-2047.html" />
    <updated>2013-12-20T12:44:10Z</updated>
    <id>https://maddesigns.de/archiv/mobile-first-ie8-fallback-mit-sass-teil2-2047.html</id>
    <content type="html">&lt;p&gt;Im ersten Teil &lt;a href=&quot;https://maddesigns.de/mobile-first-ie8-fallback-sass-2008.html&quot;&gt;Mobile First &amp;amp; IE8 Fallback mit Sass&lt;/a&gt; ging es darum, wie man mit dem IE8 umgeht, wenn man CSS und Media Querys nach dem „Mobile First“ Prinzip erstellt. Das Mixin-Plugin &lt;a href=&quot;http://jakearchibald.github.io/sass-ie/&quot;&gt;Sass-IE&lt;/a&gt; hilft dabei ein gesondertes Stylesheet für den IE8 ohne @media Angaben zu generieren. Die Lösung hat jedoch ein paar Schwächen, so können z.B. Media Querys nur für einen Wert (min-width bzw. max-width) und ein Medium (@media screen …) generiert werden. Es ist also nicht möglich ein Media Query für zwei Werte zu schreiben. Leider geht &lt;code&gt;@media screen and (min-width: 450px and max-width: 650px)&lt;/code&gt; damit nicht.&lt;/p&gt;
&lt;h2 id=&quot;breakpoint-compass-plugin&quot;&gt;Breakpoint Compass plugin&lt;a class=&quot;header-anchor&quot; href=&quot;#breakpoint-compass-plugin&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Team-Sass/breakpoint&quot;&gt;Breakpoint&lt;/a&gt; ist ein Compass Plugin, das IMO die universellste Lösung für das Schreiben von Media Querys in Sass ist. Breakpoint funktioniert grundsätzlich wie Sass-IE, wenn man ein Media Query schreiben möchte, ruft man ein Mixin auf. Ein einfaches Beispiel:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$basic-value: 543px;
$pair-value: 456px 794px;

.foo {
  content: &#39;No Media Queries&#39;;

  @include breakpoint($basic-value) {
    content: &#39;Basic Media Query&#39;;
  }

  @include breakpoint($pair-value) {
    content: &#39;Paired Media Query&#39;;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Der Default-Wert für Media Querys ist &lt;code&gt;min-width&lt;/code&gt;. Werden zwei Variablen übergeben wird eine UND-Verknüpfung von min- und max-width generiert.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.foo {
  content: &#39;No Media Queries&#39;;
}

@media (min-width: 543px) {
  .foo {
    content: &#39;Basic Media Query&#39;;
  }
}

@media (min-width: 456px) and (max-width: 794px) {
  .foo {
    content: &#39;Paired Media Query&#39;;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Breakpoint kann auch automatisch EM-Media-Querys generieren. Dazu einfach die globale Variable &lt;code&gt;$breakpoint-to-ems&lt;/code&gt; auf &lt;code&gt;true&lt;/code&gt; setzen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$breakpoint-to-ems: true;
$media: &#39;screen&#39; 700px;

#foo {
  @include breakpoint($media) {
    content: &#39;Media&#39;;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media screen and (min-width: 43.75em) {
  #foo {
    content: &#39;Media&#39;;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das Beispiel oben zeigt, dass man in Breakpoint das Medium (&lt;code&gt;screen&lt;/code&gt;) für den der Media Query zutrifft optional angeben kann. Denkbar wäre auch eine Variable wie &lt;code&gt;$forprint: &#39;print&#39;;&lt;/code&gt; für ein Druckstylsheet.&lt;/p&gt;
&lt;h3 id=&quot;ie8-fallback-in-separate-dateien-generieren&quot;&gt;IE8 Fallback in separate Dateien generieren&lt;a class=&quot;header-anchor&quot; href=&quot;#ie8-fallback-in-separate-dateien-generieren&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wie beim Mixin von Jake kann man in Breakpoint auch ein Stylesheet für IE8 in eine gesonderte generieren Datei lassen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// _layout.scss
// global breakpoints
$small: 24em;
$middle: 34em;
$large: 65em, &#39;no-query&#39; true;

.component {
  color: red;
  @include breakpoint($middle) {color: blue}
  @include breakpoint($large) {color: green;}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In der Sass-Hauptdatei wird die _layout.scss importiert und die globalen Variablen aus Breakpoint &lt;code&gt;$breakpoint-no-queries&lt;/code&gt; und &lt;code&gt;$breakpoint-no-query-fallbacks&lt;/code&gt; auf &lt;code&gt;false&lt;/code&gt; gesetzt.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// styles.scss
$breakpoint-no-queries: false;
$breakpoint-no-query-fallbacks: false;
@import &#39;layout&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Für den IE8-Fallback wird eine eigene Datei angelegt, die ebenfalls&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// fallback-ie8.scss
$breakpoint-no-queries: true;
@import &#39;layout&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;styles.css&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.component {
  color: red;
}
@media (min-width: 34em) {
  .component {
    color: blue;
  }
}
@media (min-width: 65em) {
  .component {
    color: green;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;fallback-ie8.css&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.component {
  color: red;
  color: green;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;fallback-mit-lt-ie9-in-der-hauptdatei&quot;&gt;Fallback mit „.lt-ie9“ in der Hauptdatei&lt;a class=&quot;header-anchor&quot; href=&quot;#fallback-mit-lt-ie9-in-der-hauptdatei&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Zusätzlich kann man Selektoren auch mit speziellen Root-Klassen erweitern lassen. Die Vorgehensweise kennt man sicherlich durch &lt;a href=&quot;http://html5boilerplate.com/&quot;&gt;HTML5 Boilerplate&lt;/a&gt;. Durch Conditional Comments im &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; wird für den IE8 die Klasse &lt;code&gt;lt-ie9&lt;/code&gt; im HTML hinzugefügt. Diesen Selektoren kann man nun verwenden um Styles für den IE8 zu generieren.&lt;/p&gt;
&lt;p&gt;Mit Breakpoint kann man das wie folgt erreichen:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// style.scss
// use px values, convert them to EM
$breakpoint-to-ems: true;
$breakpoint-no-query-fallbacks: true;
$large: 960px, &#39;no-query&#39; &#39;.lt-ie9&#39;;

.component {
  color: red;
  @include breakpoint($large) {
    color: green;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;style.css&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.component {
  color: red;
}
@media (min-width: 60em) {
  .component {
    color: green;
  }
}
.lt-ie9 .component {
  color: green;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Letztlich kann man auch bei Mixin-Aufruf noch die nötigen Variablen mitgeben, z.b. könnte man&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.component {
  color: red;
  @include breakpoint($large) {
    color: green;
  }
  @include breakpoint(1200px,&#39;.no-mq&#39;) {
    color: yellow;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das würde folgendes CSS als Fallback generieren:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.component {
  color: red;
}
.lt-ie9 .component {
  color: green;
}
.no-mq .component {
  color: yellow;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Man kann separate Dateien generieren oder den Fallback direkt in die Datei einfügen, und und und. Das macht es für mich so flexibel und ich bin noch nicht an die Grenzen gestoßen. Habt ihr weitere Tipps zum Thema „Mobile First und IE8-Fallback“?&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Mobile First &amp; IE8 Fallback mit Sass</title>
    <link href="https://maddesigns.de/archiv/mobile-first-ie8-fallback-sass-2008.html" />
    <updated>2013-12-20T08:02:25Z</updated>
    <id>https://maddesigns.de/archiv/mobile-first-ie8-fallback-sass-2008.html</id>
    <content type="html">&lt;p&gt;Um die Begriffsklärung „Mobile First“ soll es heute nicht gehen. Das ist teils eine philosophische Frage und viele behaupten zurecht, bevor man sich über Design und die Umsetzung Gedanken macht, sollte der Content, für den man gestaltet, vorliegen — also quasi „Content First“. Für viele hat aber „Coffee First“ am Morgen eines Arbeitstages die höchste Priorität. ;)&lt;/p&gt;
&lt;p&gt;In dem Artikel geht es um die technischen Möglichkeiten für den Internet Explorer 8 automatisiert eine &lt;del&gt;optimierte&lt;/del&gt; &lt;ins&gt;ähnlich gute&lt;/ins&gt; Ansicht der Responsive Website zu generieren.&lt;/p&gt;
&lt;p&gt;Problem: der IE8 unterstützt keine Media Querys.&lt;/p&gt;
&lt;p&gt;Wenn man technisch gesehen „Mobile First” entwickelt, bedeutet das, dass der erste Media Query kein Media Query ist und alle Geräte zuerst die „mobile Ansicht“ bekommen. Die Layout-Anpassungen mit Media Querys würden von klein zu groß gemacht, nicht umgekehrt. Da der IE8 keine Media Querys unterstützt, ignoriert er die Styles, die innerhalb diesen definiert sind, und macht die Anpassungen nicht mit. Demzufolge zeigt er die „Smartphone-Ansicht“. Oftmals wäre das nicht mal so schlimm, das Ergebnis ist oft übersichtlicher und performanter. ;)&lt;/p&gt;
&lt;p&gt;Andererseits ist es natürlich auch nachvollziehbar, dass das Kunden nicht ausreicht und man den Usern mit IE8 eine „Desktop-Ansicht“ präsentieren möchte.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IE8 Verbreitung in Deutschland&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gs.statcounter.com/#desktop-browser_version_partially_combined-DE-monthly-201211-201311&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/39juDNcLFf-854.avif&quot; sizes=&quot;(min-width: 48em) 854px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/39juDNcLFf-854.webp&quot; sizes=&quot;(min-width: 48em) 854px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/39juDNcLFf-854.png&quot; alt=&quot;StatCounter browser version DE-monthly 2012/11-2013/11&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;854&quot; height=&quot;500&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Statistik über Browser-Versionen in Deutschland&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Was ich grundsätzlich nie empfehle, dem IE8 über Scripte wie &lt;a href=&quot;https://github.com/scottjehl/Respond&quot;&gt;respond.js&lt;/a&gt; oder &lt;a href=&quot;http://code.google.com/p/css3-mediaqueries-js/&quot;&gt;CSS3-mediaqueries.js&lt;/a&gt; ein responsives Verhalten zu implementieren. Den IE8 gibt es nicht auf mobilen Endgeräten, er ist fast ausschließlich auf Windows XP Rechnern, vereinzelt noch auf Vista Rechnern, installiert. Hier surfen die User sehr häufig mit dem IE über die volle Bildschirmbreite. Seiten, die bisher nicht ins Fenster gepasst haben, bekamen einen horizontalen Scrollbalken. Das ist der Ansatz, den ich immer empfehle: Der IE8 bekommt eine Desktop-Ansicht. Diese kann auch ein Stück weit flexibel (mit min- und max-width) sein, aber passt sich nicht „responsive“ an. Die zusätzlichen Scripte machen den IE8 nur noch langsamer, als er schon ist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;responsive Hinweis&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Die responsiven Frameworks &lt;a href=&quot;http://foundation.zurb.com/&quot;&gt;Foundation&lt;/a&gt; sowie &lt;a href=&quot;http://getbootstrap.com/&quot;&gt;Bootstrap&lt;/a&gt; sind technisch auch auf den „Mobile First” Ansatz umgestiegen und unterstützen somit den IE8 nicht mehr. Das sollte man beachten, wenn man diese Frameworks produktiv einsetzt.&lt;/p&gt;
&lt;h3 id=&quot;ie8-fallback-stylesheet-mit-sass&quot;&gt;IE8-Fallback-Stylesheet mit Sass&lt;a class=&quot;header-anchor&quot; href=&quot;#ie8-fallback-stylesheet-mit-sass&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Oft werde ich gefragt, wie ich das mache und sage dann meist „ganz einfach – mit Sass“. ;)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jakearchibald.github.io/sass-ie/&quot;&gt;Sass-IE&lt;/a&gt; von Jake Archibald ist ein kleines Mixin-Plugin, mit dem man „Mobile First“ Media-Querys schreiben kann und gleichzeitig ein Stylesheet für IE &amp;lt; 9 ohne @media Angaben generiert wird.&lt;/p&gt;
&lt;p&gt;Grundsätzlich benötigt man zwei sog. Sass-Manifest-Dateien, im Beispiel von Sass-IE ist das &lt;em&gt;all.scss&lt;/em&gt; und &lt;em&gt;all-old-oldie.scss&lt;/em&gt;. In der &lt;em&gt;all.scss&lt;/em&gt; werden all (haha) unsere Sass-Dateien importiert und eine Variable &lt;code&gt;$fix-mqs&lt;/code&gt; auf &lt;code&gt;false&lt;/code&gt; gesetzt.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// all.scss
$fix-mqs: false !default;
@import styles.scss;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In der Datei all-old-oldie.scss wird die Variable &lt;code&gt;$fix-mqs&lt;/code&gt; auf den Wert gesetzt, der für den IE als „Desktop-Min-Width“ gelten soll. Hier im Beispiel &lt;code&gt;65em&lt;/code&gt;. Zudem muss die Variable &lt;code&gt;$old-ie: true;&lt;/code&gt; gesetzt sein und die &lt;em&gt;all.scss&lt;/em&gt; importiert werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// all-old-oldie.scss
$old-ie: true;
$fix-mqs: 65em;
@import &#39;all&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Media Querys werden in Sass nun wie folgt benutzt:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.component {
  color: red;
  @include respond-min(32em) { color: green; }
  @include respond-min(65em) { color: blue; }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Sass generiert daraus folgendes CSS.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* all.scss */
.component {
  color: red;
}
@media screen and (min-width: 32em) {
  .component {
    color: green;
  }
}
@media screen and (min-width: 65em) {
  .component {
    color: blue;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* all-old-ie.scss */
.component {
  color: red;
  color: blue;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das Mixin „respond-min“ im Detail:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$fix-mqs: false !default;
@mixin respond-min($width) {
  // wenn die Ausgabe an ein fixed Media Query erfolgen soll
  @if $fix-mqs {
    // wenn $fix-mqs einen Wert hat
    @if $fix-mqs &amp;gt;= $width {
      // und der Wert größer/gleich
      // der übergebenen Breite ist
      // dann den übergebenen Inhalt parsen
      @content;
    }
  }
  @else {
    // andererseits ein Media Query Bereich generieren
    // und Inhalt parsen
    @media screen and (min-width: $width) {
      @content;
    }
  }
}
// es gibt natürlich auch ein respond-max mixin,
// das das macht, was man erwartet

$old-ie: false !default;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;css-in-die-html-datei-integrieren&quot;&gt;CSS in die HTML-Datei integrieren&lt;a class=&quot;header-anchor&quot; href=&quot;#css-in-die-html-datei-integrieren&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die beiden CSS-Dateien werden über Conditional Comments in die Seite eingebunden. Zuerst die oldIE-Datei, dann unsere CSS-Datei mit den Media Querys. Der IE8 erkennt das oldIE Stylesheet und ignoriert den zweiten Conditional Comment, da er anscheinend für den Internet Explorer größer IE8 gilt. Der IE9 merkt, dass der erste Conditional Comment nicht für ihn bestimmt ist und lädt das zweite Stylesheet. Der IE10/IE11 und alle anderen modernen Browser ignorieren Conditional Comments und laden das zweite Stylesheet. Das Besondere an dieser Stelle ist, dass der HTML-Kommentar hinter dem öffnenden Conditional Comment gleich wieder geschlossen wird: &lt;code&gt;&amp;lt;!--&amp;gt;&lt;/code&gt;. Moderne Browser erkennen, dass der zweite Conditional Comment sofort wieder geschlossen wird und laden die verlinkte CSS-Datei.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;!--[if lte IE 8]&amp;gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;css/all-old-ie.css&amp;quot;&amp;gt;
&amp;lt;![endif]--&amp;gt;

&amp;lt;!--[if gt IE 8]&amp;gt;&amp;lt;!--&amp;gt;
   &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;css/all.css&amp;quot;&amp;gt;
&amp;lt;!--&amp;lt;![endif]--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Einzelne Eigenschaften (Hacks) nur für oldIE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Die kleine Mixin-Library von Jack bringt noch ein kleines old-ie Mixin speziell für einzelne IE-Hacks mit.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@mixin old-ie {
    // Only use this content if we&#39;re dealing with old IE
    @if $old-ie {
        @content;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Man könnte hier z.B. eine Fallback-Lösung für RGBA-Farbwerte mitgeben.&lt;/p&gt;
&lt;p&gt;So schön wie die Lösung funktioniert, hat sie doch ein paar Nachteile. Media Querys werden nur für einen Wert (min-width bzw. max-width) und ein Medium (@media screen …) ausgegeben. Es ist also nicht möglich ein Media Query für zwei Werte zu schreiben. &lt;code&gt;@media screen and (min-width: 450px and max-width: 650px)&lt;/code&gt; geht damit leider nicht. Dennoch ist es ein großer Gewinn ein Stylesheet, dass schon zum größten Teil für die Desktop-Darstellung im IE8 optimiert ist, automatisch bei der „Mobile First“ Entwicklung zu generieren.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>IE-Debugging via VirtualBox mit modern.ie</title>
    <link href="https://maddesigns.de/archiv/internet-explorer-debugging-mit-virtualbox-1967.html" />
    <updated>2013-12-12T11:25:19Z</updated>
    <id>https://maddesigns.de/archiv/internet-explorer-debugging-mit-virtualbox-1967.html</id>
    <content type="html">&lt;p&gt;Alltag für Webentwickler dürfte das Testen der Webseiten im Internet Explorer sein. Wo hingegen bei Firefox oder Chrome es einen kürzeren Releasezyklus gibt, wurde der IE in den letzten Jahren sehr selten erneuert. Das Problem ist (wie beim Safari) dass das Browser-Upgrade ans Betriebssystem geknüpft ist. Hinderlich ist es auch, das man nicht mehrere IE-Versionen parallel installieren kann. Früher™ hatte man sich mit &lt;a href=&quot;http://www.my-debugbar.com/wiki/IETester/HomePage&quot;&gt;IETester&lt;/a&gt; beholfen um gleichzeitig mehrere IEs zu testen. Bereits seit IE8 kann man das Rendering in den IE-Developer-Tools umstellen und die Seite in einer älteren IE-Version gerendert betrachten. Das reicht auch oft für den ersten Eindruck, ist aber nicht so verlässlich wie eine isolierte Version von Browser und Betriebssystem. Zudem kann man am Mac keinen IE installieren. Im Netz gibt es zwar einige Tools wie &lt;a href=&quot;http://netrenderer.de/&quot;&gt;IE NetRenderer&lt;/a&gt;, die Screenshots von IE-Versionen generieren. Das hilft aber nicht weiter wenn man einen Darstellungsfehler entdeckt, Debugging ist natürlich nicht möglich.&lt;/p&gt;
&lt;h2 id=&quot;internet-explorer-via-virtualbox-oder-vmware-fusion&quot;&gt;Internet Explorer via VirtualBox oder VMware Fusion&lt;a class=&quot;header-anchor&quot; href=&quot;#internet-explorer-via-virtualbox-oder-vmware-fusion&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Um sicher zu testen, sollte man auf virtuelle Maschinen zurück greifen. Prominente Tools sind &lt;a href=&quot;http://www.vmware.com/de/products/fusion/&quot;&gt;VMware Fusion&lt;/a&gt;, &lt;a href=&quot;http://www.parallels.com/de/products/desktop/&quot;&gt;Parallels Desktop&lt;/a&gt; oder &lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;. In VirtualBox kann man aber nicht nur Windows und IE installieren, sondern auch andere Systeme abbilden. VirtualBox wird aktuell sehr häufig mit &lt;a href=&quot;http://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt; genutzt um z.B. eine Live-Server-Umgebung abzubilden.&lt;/p&gt;
&lt;p&gt;Seit einiger Zeit gibt es eine Initiative von Microsoft um das Testen von Webseiten auf verschieden Internet Explorer zu erleichtern – &lt;a href=&quot;http://modern.ie&quot;&gt;modern.ie&lt;/a&gt;. Mit dem Online-Tool kann man eine bestehende Seite im Netz überprüfen, ob z.B. die Möglichkeiten für Windows 8 ausgeschöpft werden ob proprietäre CSS-Eigenschaften verwendet werden. Zudem bietet Microsoft dedizierte virtuelle Maschinen für das lokale Testen zum Herunterladen an. Über modern.ie bekommt man zudem eine 3-monatige Testphase für Browserstack.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/internet-explorer-debugging-mit-virtualbox-1967.html/modern-ie-test&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/AZOWjrrGMP-300.avif&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/AZOWjrrGMP-300.webp&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/AZOWjrrGMP-300.png&quot; alt=&quot;modern-ie test&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;300&quot; height=&quot;219&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testen mit Browserstack&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.browserstack.com/&quot;&gt;Browserstack&lt;/a&gt; ist ein Service, mit dem man nicht nur die IEs, sondern auch eine Vielzahl mobiler Devices testen kann. Browserstack stellt virtuelle Maschinen oder Emulatoren zur Verfügung auf denen man dann via Tunnel eine Webseite debuggen kann und besitzt zudem eine REST API zum automatisierten Testen. &lt;a href=&quot;http://codepen.io/&quot;&gt;Codepen&lt;/a&gt;-Snippets können ebenfalls „on-the-fly“ via &lt;a href=&quot;http://blog.codepen.io/2013/01/16/new-feature-open-in-browserstack/&quot;&gt;Browserstack getestet werden&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;internet-explorer-als-virtuelle-maschine-mit-virtualbox-installieren&quot;&gt;Internet Explorer als virtuelle Maschine mit VirtualBox installieren&lt;a class=&quot;header-anchor&quot; href=&quot;#internet-explorer-als-virtuelle-maschine-mit-virtualbox-installieren&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ich benutze schon seit einiger Zeit VirtualBox und spezielle virtuelle Maschinen für das lokale Testen von IE8 &amp;amp; Co. Bei der Installation der Boxen half mir ein Shell-Script von &lt;a href=&quot;https://github.com/xdissent/ievms&quot;&gt;ievms&lt;/a&gt;. Beim Installieren kann man zudem angeben welche Versionen vom IE man installieren möchte, oder einfach alle verfügbaren Versionen installieren (IE6-IE11).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Aktuelle Version von VirtualBox herunterladen:&lt;br&gt;
&lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;https://www.virtualbox.org/wiki/Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ievms über die Konsole via Shell-Script installieren&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh bash
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;oder: spezielle IE-Versionen installieren (IE8 – IE10)&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;
curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS=&amp;quot;8 9 10&amp;quot; bash
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Warten&lt;br&gt;
Das dauert je nach Verbindungsgeschwindigkeit und Rechnerleistung einige Zeit (bis zu mehreren Stunden) – am besten vielleicht nachts laufen lassen und sicher stellen, dass die Internetverbindung stabil ist und der Rechner nicht in den Ruhemodus geht. ;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;ie-vms-auf-externem-speichermedium-sd-card-installieren&quot;&gt;IE VMs auf externem Speichermedium (SD-Card) installieren&lt;a class=&quot;header-anchor&quot; href=&quot;#ie-vms-auf-externem-speichermedium-sd-card-installieren&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bei der Installation von IE VMs werden sehr große Dateien im System hinterlegt (ist ja immer ein komplettes Windows-Betriebssystem mit Browser). Das kann natürlich den verfügbaren Speicherplatz einer Festplatte sehr stark dezimieren, besonders wenn man nur eine kleine SSD hat.&lt;/p&gt;
&lt;p&gt;Da ich die VMs zwar sehr gern verwende, aber nicht mehr allzu häufig brauche und sie mir die Festplatte ein wenig zumüllen, habe ich mir die VMs auf einer externen Quelle installiert. Ich habe mir eine 64Gb Micro-SD-Karte und einen &lt;a href=&quot;http://www.amazon.de/gp/product/B00DEP295W&quot;&gt;kleinen SD-Karten-Adapter&lt;/a&gt; zugelegt, da ich den SD-Karten-Slot am MacBook Air selten brauche.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/4DT9L0OwTB-800.avif&quot; sizes=&quot;(min-width: 48em) 800px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/4DT9L0OwTB-800.webp&quot; sizes=&quot;(min-width: 48em) 800px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/4DT9L0OwTB-800.png&quot; alt=&quot;SD-Card Adapter&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;800&quot; height=&quot;600&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Bei der Installation über ievms muss dann ein anderer Pfad angegeben werden um die virtuelle Maschine auf der SD-Karte zu speichern. Das Script anwerfen und Kaffee trinken gehen oder so. Das Installieren dauert eine Weile, da extern speichern bekanntermaßen noch langsamer als intern speichern ist.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS=&amp;quot;7&amp;quot; INSTALL_PATH=&amp;quot;/Volumes/SanDisk64/.ievms&amp;quot; bash
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Installationspfad anpassen: „/Volumes/[YOUR_SDCARD_NAME]“&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Das ievms Shell-Script erstellt automatisch einen Sicherungspunkt, zu dem man nach Ablauf der 90-Tage-Windows-Testphase zurückkehren kann und die VMs nicht erneut herunterladen und installieren muss. Bis dahin kann man Windows völlig &lt;strong&gt;kostenlos&lt;/strong&gt; nutzen.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2013/12/ievms-virtualbox.jpg&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/VmQNgn_4QQ-770.avif&quot; sizes=&quot;(min-width: 48em) 770px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/VmQNgn_4QQ-770.webp&quot; sizes=&quot;(min-width: 48em) 770px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/VmQNgn_4QQ-770.png&quot; alt=&quot;IE VMs VirtualBox&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;770&quot; height=&quot;637&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wenn alles installiert ist, kann man die Maschinen starten (eine nach der anderen) und weitere Einstellungen machen. Die Maschinen werden per default mit englischer Tastatur installiert. Ich stelle diese immer auf deutsch um und erstelle dann nochmal einen Snapshot (Sicherungspunkt).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2013/12/ie11-win7.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/QMzIzM3zuV-300.avif&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/QMzIzM3zuV-300.webp&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/QMzIzM3zuV-300.png&quot; alt=&quot;maddesigns.de im IE11 auf Windows 7&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;300&quot; height=&quot;237&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ansicht maddesigns.de im IE11 auf Windows 7&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Individuelle responsive Gridsysteme mit Sass</title>
    <link href="https://maddesigns.de/archiv/responsive-grids-sass-1883.html" />
    <updated>2013-11-26T08:00:19Z</updated>
    <id>https://maddesigns.de/archiv/responsive-grids-sass-1883.html</id>
    <content type="html">&lt;p&gt;Für Responsive Webdesign ist ein Gridsystem der Grundstock um den Inhalt auf vielen verschiedenen Ausgabegeräten flexibel auszugeben. Gridsysteme sind mittlerweile unbedingt notwendig um ein Design zielgenau (nicht pixelgenau) umzusetzen. Um genau zu sein, sollte das Design bereits einem Raster folgen, das dann in der Entwicklung so umgesetzt wird.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Als Einstieg in die Thematik eignet sich der Artikel &lt;a href=&quot;https://alistapart.com/article/fluidgrids&quot; title=&quot;Fluid Grids&quot;&gt;„Fluid Grids“&lt;/a&gt; (2009) von Ethan Marcotte himself. Dort beschreibt Ethan wie man ein fixes Layout in ein flexibles Layout umrechnet. Eine einfache Formel ist das Geheimnis der fluiden Grids:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ziel/Kontext = Ergebnis in Prozent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ein klassisches Beispiel:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;300px / 960px = 0.3125 * 100% = 31.25%&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Wer sich bereits mit Responsive Webdesign beschäftigt hat, kennt sicherlich diese Grundlagen.&lt;/p&gt;
&lt;p&gt;Das responsive Frontend-Framework &lt;a href=&quot;https://foundation.zurb.com/docs/components/grid.html&quot;&gt;Foundation&lt;/a&gt; bietet die Möglichkeit mit den Klassen-Präfixen ’small-‚ und ‚large-‚ individuelle Breakpoints für die jeweilige Module zu vergeben. Dadurch kann man die prozentuale Spaltenbreite je Viewport anpassen. Im HTML fügt man dazu folgende Klassen hinzu:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;div class=&amp;quot;small-2 large-4 columns&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;small-4 large-4 columns&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;small-6 large-4 columns&amp;quot;&amp;gt;...&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://getbootstrap.com/css/#grid&quot;&gt;Bootstrap&lt;/a&gt; (formerly known as Twitter Bootstrap) hat einen ähnlichen Gridaufbau.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;div class=&amp;quot;col-xs-12 col-md-8&amp;quot;&amp;gt; .col-xs-12 .col-md-8 &amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;col-xs-6 col-md-4&amp;quot;&amp;gt; .col-xs-6 .col-md-4 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;welche-vorteile-bringt-ein-individuelles-gridsystem-gegenuber-den-gridsystemen-von-bootstrap-oder-foundation&quot;&gt;Welche Vorteile bringt ein „individuelles Gridsystem“ gegenüber den Gridsystemen von Bootstrap oder Foundation?&lt;a class=&quot;header-anchor&quot; href=&quot;#welche-vorteile-bringt-ein-individuelles-gridsystem-gegenuber-den-gridsystemen-von-bootstrap-oder-foundation&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Erst einmal sollte man sich bewusst sein, dass ein (Frontend-) Framework eine Reihe an Modulen und Features mitbringen, die beim Prototyping und bei der Entwicklung durchaus hilfreich sein können. Setzt man aber nur ein Modul davon ein (z.B. Grids) und achtet nicht darauf nur die verwendeten Dateien (die nötigen CSS-Stile) im HTML zu referenzieren, handelt man sich unter Umständen einen unnötigen Overhead ein.&lt;/p&gt;
&lt;p&gt;Wer nur ein einfaches flexibles Gridsystem sucht, könnte auch das &lt;a href=&quot;https://static.elliotjaystocks.com/responsive-grid/html-demo/&quot;&gt;1000px Gridsystem&lt;/a&gt; von Elliot Jay Stocks oder das Online-Tool &lt;a href=&quot;https://gridpak.com/&quot;&gt;Gridpak&lt;/a&gt; nutzen.&lt;/p&gt;
&lt;p&gt;Bei herkömmlichen Gridsystemen ist man an die vorgegebene Klassen-Logik des Gridsystem gebunden, um eine Änderung an der Spaltigkeit zu machen. Dazu müssten Änderungen am Markup gemacht werden. Zudem bieten die allermeisten responsiven Gridsysteme nur einen vorkonfigurierten Breakpoint (Foundation 5 hat jetzt auch zusätzlich ein &lt;a href=&quot;https://foundation.zurb.com/docs/components/grid.html#medium-grid&quot;&gt;„Medium-Grid“&lt;/a&gt;) um Layoutänderungen zu machen.&lt;/p&gt;
&lt;h3 id=&quot;sass-gridsysteme&quot;&gt;Sass Gridsysteme&lt;a class=&quot;header-anchor&quot; href=&quot;#sass-gridsysteme&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mit Sass hat man die Möglichkeit Grids unabhängig vom Markup, bzw. auf das Markup angepasst, zu erstellen. Nicht vergessen ein anderes Border-Box-Modell für alle Elemente deklarieren.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;*, *:before, *:after {
  @include box-sizing(&#39;border-box&#39;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Drei Gridsysteme möchte ich nachvolgend kurz vorstellen:&lt;/p&gt;
&lt;h3 id=&quot;semantic-gs&quot;&gt;Semantic GS&lt;a class=&quot;header-anchor&quot; href=&quot;#semantic-gs&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ein einfaches individuelles Gridsystem ist &lt;a href=&quot;https://semantic.gs/&quot;&gt;Semantic GS&lt;/a&gt;. Letztlich ist die Berechnung der Spalten in 2-3 Funktionen hinterlegt, einfach die Grid-Variablen setzen und loslegen. Selbst die Unterscheidung ob das Grid feste Breiten hat oder fluide agiert, kann konfiguriert werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@import &#39;grid.scss&#39;;

$column-width: 60;
$gutter-width: 20;
$columns: 12;
$total-width: 100%;  // fluid grid

// 9 columns main article and 3 columns aside content
article {
   @include column(9);
}
aside {
   @include column(3);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Subgrid-Logik:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;article {
    @include column(9);

    ul {
      // include grid row
      @include row(9);
      li {
        // include 3 columns of a 9 columns context (33.334%)
        @include column(3,9);
      }
   }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das Semantic.gs Gridsystem gibt es als LESS-, Stylus- und SCSS-Präprozessor-Variante.&lt;/p&gt;
&lt;h3 id=&quot;susy-responsive-grids-for-compass&quot;&gt;Susy – Responsive grids for Compass&lt;a class=&quot;header-anchor&quot; href=&quot;#susy-responsive-grids-for-compass&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://susy.oddbird.net/&quot;&gt;Susy&lt;/a&gt; ist ein responsive Grid-Framework für Compass. Wer &lt;a href=&quot;https://960.gs/&quot;&gt;960.gs&lt;/a&gt; kennt, kommt auch mit Susy schnell zurecht. Susy verwendet z.B. ebenfalls das Keyword ‚omega‘ um bei der letzte Spalte den Abstand (Gutter) nach rechts auf 0 zu setzen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gem Installation über die Kommandozeile&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;gem install compass-susy-plugin
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Susy zu einem bestehenden Projekt hinzufügen – Anpassung der Compass-Konfiguration (config.rb):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;#config.rb
require &amp;quot;susy&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Susy in die Sass-Dateien importieren&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@import &amp;quot;susy&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Grid Konfiguratuion:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// global variables
$total-columns: 12;            // a 12 column grid
$column-width:  4em;           // each column is 4em wide
$gutter-width:  1em;           // 1em gutters between columns
$grid-padding:  $gutter-width; // grid-padding equal to gutters

// usage
.page {
  @include container;
  @include susy-grid-background; // visualize the grid as bg-img
}

article {
  // content spans 9 columns of 12
  @include span-columns(9,12);
}
aside {
  // aside content spans the final 3 (omega) of 12 columns
  @include span-columns(3 omega,12);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Susy bietet eine Vielzahl an Möglichkeiten wie Push oder Pull, sowie IE &amp;lt;9 Support (.lt-ie9 Klasse) um ein eigenes Responsive Gridsystem aufzubauen, zudem eine umfangreiche Doku: &lt;a href=&quot;https://susy.oddbird.net/guides/reference/&quot;&gt;https://susy.oddbird.net/guides/reference/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An der nächsten Version von Susy wird schon fleißig gearbeitet, die Version 2.0 hat Sass 3.3 Support und brauch Compass nicht mehr unbedingt, siehe &lt;a href=&quot;https://github.com/ericam/susy/blob/susy-next/CHANGELOG-NEXT.md&quot; title=&quot;Susy Next Changelog on Github&quot;&gt;Github Changelog&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;singularity-grids-without-limits&quot;&gt;Singularity – Grids without limits&lt;a class=&quot;header-anchor&quot; href=&quot;#singularity-grids-without-limits&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://singularity.gs/&quot;&gt;Singularity&lt;/a&gt; ist etwas mehr als ein Gridsystem wie man es häufig verwendet. Singularity kann neben den üblichen symmetrischen Grids (alle Spalten gleich breit) auch asymetrische Grids erstellen, d.h. nicht alle Spalten müssen immer gleich breit sein. Es lassen sich auch Spalten unterschiedlicher Breite anlegen. Zudem hat Singularity die sogenannte &lt;a href=&quot;https://palantir.net/blog/responsive-design-s-dirty-little-secret&quot;&gt;„Isolation-Methode“;&lt;/a&gt; als standardmäßige Spalten-Positionierungslogik und umgeht damit Browserbugs durch fehlerhafte Prozentrechnung.&lt;/p&gt;
&lt;h4 id=&quot;installation-des-singularity-gridsystem&quot;&gt;Installation des Singularity Gridsystem&lt;a class=&quot;header-anchor&quot; href=&quot;#installation-des-singularity-gridsystem&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Die Installation von Singularity erfolgt genau wie bei Susy.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;gem install singularitygs
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Singularity in die Compass-Konfiguration hinzufügen:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;# config.rb
require &amp;quot;singularitygs&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Singularity in die Sass-Dateien importieren:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@import &amp;quot;singularitygs&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Globale Grid-Variablen festlegen:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// 12 columns á la 960gs:
$grids: 12;
$gutters: 1/3;

&lt;/code&gt;&lt;/pre&gt;
&lt;figure&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/rv-9TtDd_t-1440.avif&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/rv-9TtDd_t-1440.webp&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/rv-9TtDd_t-1440.png&quot; alt=&quot;12 columns grid&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1440&quot; height=&quot;100&quot;&gt;&lt;/picture&gt;&lt;/p&gt;&lt;figcaption&gt;Symmetrisches Grid (12 Spalten)&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Das SCSS Grid-Mixin:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@include grid-span($span, $position);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;$span = Spaltenlänge&lt;/p&gt;
&lt;p&gt;$position = Startposition&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// usage
article {
  // content spans 9 columns of 12 columns.
  @include grid-span(9,1);
}
aside {
  // aside content spans 3 of 12 columns.
  @include grid-span(3,10);
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p class=&quot;sassmeister&quot; data-gist-id=&quot;8296852&quot; data-height=&quot;300&quot;&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/sFA-7lC95z-1440.avif&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/sFA-7lC95z-1440.webp&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/sFA-7lC95z-1440.png&quot; alt=&quot;12 columns grid with article and aside&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1440&quot; height=&quot;100&quot;&gt;&lt;/picture&gt;&lt;br&gt; &lt;a href=&quot;https://sassmeister.com/gist/8296852&quot;&gt;Play with this gist on SassMeister.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Visuelle Positionierung (push und pull) – Der ‚$location‘ Parameter&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Mit dem zweiten Parameter im @include Aufruf kann die Start-Position ($location) der Spalte festgelegt werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;article {
  // content spans 9 columns begins at position 4.
  @include grid-span(9,4);
}
aside {
  // aside content spans 3 at position 1.
  @include grid-span(3,1);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p class=&quot;sassmeister&quot; data-gist-id=&quot;8296720&quot; data-height=&quot;300&quot;&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/VdmsEzZahf-1440.avif&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/VdmsEzZahf-1440.webp&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/VdmsEzZahf-1440.png&quot; alt=&quot;12 column grid with switched positions&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1440&quot; height=&quot;100&quot;&gt;&lt;/picture&gt;&lt;br&gt; &lt;a href=&quot;https://sassmeister.com/gist/8296720&quot;&gt;Play with this gist on SassMeister.&lt;/a&gt;
&lt;/p&gt;
&lt;h4 id=&quot;asymetrische-grids-mit-singularity&quot;&gt;Asymetrische Grids mit Singularity&lt;a class=&quot;header-anchor&quot; href=&quot;#asymetrische-grids-mit-singularity&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Singularity kann in der &lt;code&gt;$grids&lt;/code&gt; Variable nicht nur einfache Zahlen verarbeiten, sondern auch mehrere Zahlen, die dann zu einem Gesamtgrid zusammen gezählt werden.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$grids: 1 4 1; // grid of 6 columns
$gutters: 1/6;            // 1/6 gutter of 1 column
$gutter-style: split;     // split gutter - half gutter on each side

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Oder unser Ausgangsbeispiel:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$grids: 2 8 2; // grid of 12 colums
$gutters: 1/3;

article {
  // article content spans 1 column (is in fact 2 columns wide)
  // begins at position 1
  @include grid-span(1,1);
}
aside {
  // aside content spans 1 column (is in fact 8 columns wide)
  // begins at position 2
  @include grid-span(1,2);
}
.ads {
  // article content spans 1 column (is in fact 2 columns wide)
  // begins at position 3
  @include grid-span(1,3);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;figure&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/IIgfzWw0dt-1440.avif&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/IIgfzWw0dt-1440.webp&quot; sizes=&quot;(min-width: 48em) 1000px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/IIgfzWw0dt-1440.png&quot; alt=&quot;2-8-2 colums grid&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;1440&quot; height=&quot;100&quot;&gt;&lt;/picture&gt;&lt;/p&gt;&lt;figcaption&gt;Asymmetrisches Grid (2-8-2)&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Bei asymmetrischen Grids ist darauf zu achten, dass der ‘$grids’-Variable in Teile aufgeteilt wird, aus denen sich die Positionen (Start der Spalte) ergeben. Drei Teile ergeben dann die Positionen 1, 2 und 3. Die „Spaltenbreiten“ können demzufolge jeweils eine Spalte breit sein (im Beispiel eigentlich 2 Spalten von 12) oder zwei bzw. drei Spalten (100%) breit.&lt;/p&gt;
&lt;p&gt;Singularity kann auch automatisiert responsive Grids erstellen, also dass sich die Spaltenanzahl je Breakpoint geändernt wird. Ein Beispiel:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$break-small:   450px;
$break-medium:  700px;
$break-large:   900px;
$break-xlarge: 1200px;

$grids: 3; // mobile first view - 3 columns
$grids: add-grid(6 at $break-small); // 6 equal columns from 450px
$grids: add-grid(12 at $break-medium); // 12 equal columns
$grids: add-grid(2 8 2 at $break-large); // 3 columns (2|8|2)
$grids: add-grid(1 3 5 7 9 at $break-xlarge); // 5 columns (1|3|5|7|9)

$gutters: 1/3;
$gutters: add-gutter(.25 at 900px);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In dem &lt;a href=&quot;https://maddesigns.de/sgs-demos/singularity-demo.html&quot; title=&quot;Singularity Gridsystem Demo&quot;&gt;Beispiel&lt;/a&gt; sind im „Mobile First“ Viewport drei Spalten mit einem Gutter von ⅓ der Spalte deklariert. Ab dem Breakpoint „$break-small“ (450px) wird das Grid in ein 6 Spalten-Grid umgewandelt, ab „$break-medium“ (700px) in ein 12 Spalten-Grid. Diese Spalten sind alle gleich breit. Ab dem Breakpoint „$break-large“ (900px) wird das Grid in 3 Spalten (die insgesamt aus 12 Spalten bestehen) asymmetrisch aufgeteilt. Letztlich gibt es nochmal ein asymmetrisches Grid ab dem Breakpoint „$break-xlarge“ (1200px). Ich möchte darauf hinweisen, dass das nur ein Beispiel ist, was möglich ist, nicht ob das ein sinnvolles Grid ist.&lt;/p&gt;
&lt;p&gt;Hier eine &lt;a href=&quot;https://maddesigns.de/sgs-demos/singularity-demo.html&quot; title=&quot;Singularity Gridsystem Live-Demo&quot;&gt;Live-Demo&lt;/a&gt; und von allen Views mal Screenshot:&lt;/p&gt;&lt;figure&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2013/11/480x320.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/-PqT6BOGIj-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/-PqT6BOGIj-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/-PqT6BOGIj-150.png&quot; alt=&quot;Symetrisches Grid - 6 Spalten (480x320px)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;100&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a href=&quot;https://maddesigns.de/img/2013/11/320x480.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/adApS49ysB-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/adApS49ysB-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/adApS49ysB-150.png&quot; alt=&quot;Symetrisches Grid - 3 Spalten (320x480px)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;225&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a href=&quot;https://maddesigns.de/img/2013/11/768x1024.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/qUvUTS6bH8-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/qUvUTS6bH8-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/qUvUTS6bH8-150.png&quot; alt=&quot;Symmetrisches Grid - 12 Spalten (768x1024px)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;200&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a href=&quot;https://maddesigns.de/img/2013/11/1280x800.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/IQkCWHWQ0s-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/IQkCWHWQ0s-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/IQkCWHWQ0s-150.png&quot; alt=&quot;Asymmetrisches Grid bei 1280 x 800px&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;93&quot;&gt;&lt;/picture&gt;&lt;/a&gt; &lt;a href=&quot;https://maddesigns.de/img/2013/11/1024x768.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/Kj4lqXdD4R-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/Kj4lqXdD4R-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/Kj4lqXdD4R-150.png&quot; alt=&quot;Asymmetrisches Grid bei 1024 x 768px&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;112&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;&lt;figcaption&gt;Responsive Grids – unterschidliche Spalten je Breakpoint&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;&lt;/p&gt;
&lt;h3 id=&quot;relationale-grids-singularity-extras&quot;&gt;Relationale Grids – Singularity-Extras&lt;a class=&quot;header-anchor&quot; href=&quot;#relationale-grids-singularity-extras&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mit der Erweiterung „Singularity-Extras“ können mit Singularity Grids auf Basis bestimmter Relationen erstellt werden. So z.B. ein Gridsystem nach „Goldenen Schnitt“ oder „Compound-Grid“, das die Spaltenbreiten überlagert, kombiniert und zu einer Einzelspalte nach dem &lt;a href=&quot;https://gridsetapp.com/specs/gerstner/?gridset=show&quot; title=&quot;Karl Gerstner Compound Grid&quot;&gt;Vorbild von Karl Gerstner&lt;/a&gt; zusammenfügt. Dadurch sind natürlich sehr individuelle Grids möglich. Das Zuweisen der Spalten wird dann teilweise etwas komplizierter und ist manchmal ganz schöner Brain-Fuck, aber funktioniert.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@import &amp;quot;singularitygs&amp;quot;;
@import &amp;quot;singularity-extras&amp;quot;;

$break-small:   450px;
$break-medium:  700px;
$break-large:   900px;
$break-xlarge: 1200px;

$grids: 3;
$grids: add-grid(1 2 3 at $break-small);
$grids: add-grid(ratio(golden(), 6) at $break-medium);
$grids: add-grid(compound(2, 3, 4) at $break-large);

$gutters: .25;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ein Beipiel mit Singularity-Extras: &lt;a href=&quot;https://maddesigns.de/sgs-demos/extras.html&quot; title=&quot;Mobile First Grid&quot;&gt;Mobile First Grid&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Aktuell wird auch an der Sass 3.3 Kompatibilität von Singularity gearbeitet, das viele Verbesserungen intern mit sich bringt.&lt;/p&gt;
&lt;p&gt;Ich würde mich freuen, wenn ich mal ein asymmetrisches Design-Raster umsetzen könnte, die meisten Designs sind ja mit symmetrischen Spalten aufgeteilt, aber immerhin besser als gar kein Raster. Hatte ich erwähnt, dass man mit Singularity auch sowas machen kann:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$grids: 55px 55px 55px 55px 55px 55px 55px 55px 55px 55px 55px 55px 55px 55px 55px;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nicht? Jetzt aber. ;)&lt;/p&gt;
&lt;p&gt;Nutzt ihr andere Grid-Systeme und welche Erfahrungen habt ihr damit?&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Der Viewport — das unbekannte Wesen</title>
    <link href="https://maddesigns.de/archiv/meta-viewport-1817.html" />
    <updated>2013-08-23T08:17:13Z</updated>
    <id>https://maddesigns.de/archiv/meta-viewport-1817.html</id>
    <content type="html">&lt;p&gt;Seit wir uns mit Responsive Webdesign „herumschlagen müssen“, begegnet uns immer wieder das Wesen der Post-PSD-Ära – der Viewport.&lt;/p&gt;
&lt;p&gt;Mittlerweile beherrscht er unser Tun und stellt uns immer wieder Fallen. Wir versuchen ihn zu beherrschen. Wir versuchen ihn einzugrenzen. Oft schlägt dies fehl. An dieser Stelle möchte ich meine Feldforschungsergebnisse der letzten Monate mit Euch teilen.&lt;/p&gt;
&lt;figure class=&quot;wp-caption alignleft&quot;&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/H4pje6nS0X-320.avif&quot; sizes=&quot;320px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/H4pje6nS0X-320.webp&quot; sizes=&quot;320px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/H4pje6nS0X-320.png&quot; alt=&quot;Browser resizing – daily business (danke an @scheibo_ für das wiederfinden des GIFs)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;320&quot; height=&quot;240&quot;&gt;&lt;/picture&gt;
&lt;figcaption class=&quot;wp-caption-text&quot;&gt;Browser resizing – daily business (danke an @scheibo_ für das wiederfinden des GIFs)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;a href=&quot;https://www.responsinator.com/&quot;&gt;Vielerorts&lt;/a&gt; &lt;a href=&quot;https://www.resizemybrowser.com/&quot;&gt;findet&lt;/a&gt; &lt;a href=&quot;https://lab.maltewassermann.com/viewport-resizer/&quot;&gt;man&lt;/a&gt; &lt;a href=&quot;https://agentur360.de/rm/view.php?url=agentur360.de&amp;amp;lang=de&amp;amp;d1=1&amp;amp;d11=1&amp;amp;d5=1&quot;&gt;Anwendungen&lt;/a&gt;, die über einen iframe die eingegebene Website „responsive“, also in einem bestimmten Viewport darstellen. Soweit so gut. Das ist durchaus nützlich, spiegelt aber oft nicht das Ergebnis auf den echten Geräten wieder. Man kann dabei lediglich sehen, ob die Layout-Container entsprechend umbrechen oder wie Texte laufen und Bilder sich anpassen, häufig reicht das ja auch. Vieles hängt aber bei der Darstellung auf den mobilen Endgeräten von den verwendeten Media-Queries und dem Viewport-Meta-Tag ab.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;warum-ist-das-so&quot;&gt;Warum ist das so?&lt;a class=&quot;header-anchor&quot; href=&quot;#warum-ist-das-so&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ich möchte nicht zu technisch werden. &lt;a href=&quot;https://twitter.com/ppk&quot; title=&quot;Peter Paul Koch auf Twitter&quot;&gt;PPK&lt;/a&gt; erklärt den ganzen Zusammenhang zwischen CSS-Pixel und Device-Pixel &lt;a href=&quot;https://fronteers.nl/congres/2012/sessions/a-pixel-is-not-a-pixel-peter-paul-koch&quot; title=&quot;Video and transcript of Peter Paul koch&#39;s Talk A Pixel is not a Pixel&quot;&gt;hier&lt;/a&gt; und &lt;a href=&quot;https://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html&quot; title=&quot;Blog Post – A Pixel is not a Pixel&quot;&gt;hier&lt;/a&gt; exzellent. Auch bei &lt;a href=&quot;https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html&quot; title=&quot;Using the Viewport on apple.com&quot;&gt;Apple&lt;/a&gt; oder &lt;a href=&quot;https://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/&quot; title=&quot;Introduction to meta viewport on Opera.com&quot;&gt;Opera&lt;/a&gt; findet man auch gute Zusammenfassungen.&lt;/p&gt;
&lt;p&gt;Zuersteinmal erinnern wir uns, dass der Meta-Viewport-Tag gesetzt werden muss, damit die Seite „responsive“ dargestellt wird. Ansonsten wird von den mobilen Browser die Seite auf eine Breite von 980px gezoomt dargestellt. In der &lt;a href=&quot;https://html5boilerplate.com/&quot; title=&quot;HTML5 Boilerplate&quot;&gt;HTML5 Boilerplate&lt;/a&gt; findet man diese Angabe:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width&amp;quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das wisst Ihr ja sicherlich. Aber hier beginnen schon die Probleme. Nehmen wir an, der Entwickler hat im CSS einen Media-Query (für das iPad) wie folgt definiert:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media only screen and (min-width: 768px) {
	body {
		color: red;
	}
}

@media only screen and (min-width: 1024px) {
	body {
		color: blue;
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt; &lt;a href=&quot;https://codepen.io/maddesigns/full/ykJzC&quot; title=&quot;iOS zooming viewport sample&quot;&gt;https://codepen.io/maddesigns/full/ykJzC&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In der Desktop-Simulation werden wir ab 1024px blaue Schrift sehen, auf einem Android-Device auch, nicht aber auf dem iPad. Das iPad suggeriert es sei ein Hochkant-Device und meldet hier dem Browser eine Breite von 768px. Auch wenn man das Gerät quer in den Landscape-Modus dreht, bleibt die Gerätebreite auf 768px und der Inhalt wird gezoomt dargestellt. Gleiches passiert auch auf dem iPhone bei 320px. Auf den iOS-Geräten wird man also nie die Landscape-Ansicht erhalten, wenn man nicht zusätzlich für die Viewport-Angabe im Media-Query „and (orientation: landscape)“ angibt. Jetzt könnte man schmollen und &lt;a href=&quot;https://twitter.com/share?&amp;amp;via=maddesigns&amp;amp;text=Apple%20ist%20doof!&amp;amp;url=http%3A%2F%2Fmaddesigns.de%2Fmeta-viewport-1817.html&quot;&gt;twittern wie doof doch Apple ist&lt;/a&gt;, aber es ist wie es ist.&lt;/p&gt;
&lt;p&gt;Abhilfe für das Verhalten auf iOS ist die zusätzliche „initial-scale=1.0“ im Meta-Viewport. Dann wird auch bei 1024px der Media-Query aktiv. Ich nutzte also immer:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width,initial-scale=1.0&amp;quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Kleiner Nachteil: ab und zu kommt es dann zum sogenannte „iOS Zoom Bug“ Verhalten, das aber in iOS6 gefixt ist. Ein Javascript-Bugfix für die älteren Betriebssysteme gibt es von &lt;a href=&quot;https://github.com/scottjehl/iOS-Orientationchange-Fix&quot; title=&quot;iOS Orientationchange Fix - Bugfix for iOS Zoom Bug&quot;&gt;Scott Jehl&lt;/a&gt;. Im aktuellen Master der HTML5-Boilerplate wurde das nun auch wieder so eingeführt. &lt;a href=&quot;https://github.com/h5bp/html5-boilerplate/commit/ff37dba6bf025a00f58b2bb12f7c6a827e6643c5&quot; title=&quot;Github Commit for Add `initial-scale=1` to meta viewport &quot;&gt;https://github.com/h5bp/html5-boilerplate/commit/ff37dba6bf025a00f58b2bb12f7c6a827e6643c5&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Apropos „orientation: landscape“ – einigen erzähle ich nichts Neues – aber orientation: landscape/portrait ist nur die Auswertung vom Seitenverhälnis des Browserfensters, und wird nicht anderweitig durch das Device geliefert. DAS kann man also auch auf dem Desktop simulieren.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt; &lt;a href=&quot;https://codepen.io/maddesigns/full/Blygt&quot; title=&quot;orientation landscape / portrait sample&quot;&gt;https://codepen.io/maddesigns/full/Blygt&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;device-width-media-querys&quot;&gt;device-width Media-Querys&lt;a class=&quot;header-anchor&quot; href=&quot;#device-width-media-querys&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Meiner Meinung nach ist es nicht optimal mit device-width Media-Querys zu arbeiten. Aus mehreren Gründen:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;man orientiert sich an bestimmten Devices&lt;/li&gt;
&lt;li&gt;man kann es schlecht am Desktop nachvollziehen&lt;/li&gt;
&lt;li&gt;bräuchte man noch einen dritten Punkt auf der Liste?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;man-orientiert-sich-an-bestimmten-devices&quot;&gt;Man orientiert sich an bestimmten Devices&lt;a class=&quot;header-anchor&quot; href=&quot;#man-orientiert-sich-an-bestimmten-devices&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.which.co.uk/technology/tablets-2/does-samsung-make-too-many-phones-and-tablets/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/E0zbMtKLhR-591.avif&quot; sizes=&quot;(min-width: 48em) 600px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/E0zbMtKLhR-591.webp&quot; sizes=&quot;(min-width: 48em) 600px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/E0zbMtKLhR-591.png&quot; alt=&quot;Infografik Samsung smartphones und tablets&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;591&quot; height=&quot;845&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unter Umständen greifen die Anpassungen nur für ein Gerät, könnten aber für viele andere Geräte auch zutreffen, die nur geringfügig andere Werte haben. Viele Media-Query Anpassungen bedeutet also mehr Arbeit, unter Umständen mehr Pflegeaufwand. Zudem ist es bei dem rasanten Anstieg an neu veröffentlichten Geräten kaum noch möglich Schritt zu halten.&lt;/p&gt;
&lt;h3 id=&quot;man-kann-es-schlecht-am-desktop-nachvollziehen&quot;&gt;Man kann es schlecht am Desktop nachvollziehen&lt;a class=&quot;header-anchor&quot; href=&quot;#man-kann-es-schlecht-am-desktop-nachvollziehen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Noch einmal gefährliches Halbwissen vorausgesetzt dürfte bekannt sein, dass viele Geräte bereits ein hochauflösenden Display haben. Die Pixel sind kleiner und enger als bei herkömmlichen Displays. So werden – wie beim Klassiker unter den hochauflösenden Geräten dem iPhone 4 – auf der gleichen Fläche wie zuvor die 4-fache Menge an Pixel untergebracht. In der Breite nicht mehr nur 320 Pixel, sondern 640 Pixelchen. Würde die Website nun auf die Device-Pixel gematcht werden, wäre die Schrift mit Sicherheit zu klein. Deshalb bleibt der Viewport gleich und die Angaben für Schrift und Co. werden umgerechnet. Bildlich gesprochen: Eine Überschrift mit der Größenangabe 24px, wird beim iPhone 4 auf 48px hochgerechnet und erscheint uns dann auf dem hochauflösendem Display wie 24px und nebenbei noch sehr scharf. Für die Angabe der Schriftgröße nehmt ihr aber „rem“ oder „em“, klar oder? ;)&lt;/p&gt;
&lt;p&gt;Um auf unseren „Viewport-Switcher“ zurückzukommen, tritt dann natürlich folgendes Problem auf. Ich habe einen Media-Query folgendermaßen angegeben:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* iPad Retina */
@media only screen and (min-device-width: 1536px) {
	body {
		color: red;
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Diese Anpassung werde ich auf dem Desktop erst ab einer Bildschirmauflösung von min. 1536px sehen können. Selbst dann könnte man das noch nicht richtig überprüfen, weil u.U. noch ein Media-Query für „Große Desktop-Ansicht“ greift.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beispiel:&lt;/strong&gt; &lt;a href=&quot;https://codepen.io/maddesigns/full/njFcp&quot; title=&quot;device-width media query sample&quot;&gt;https://codepen.io/maddesigns/full/njFcp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Um es einfach und nachvollziehbar am Desktop zu haben, habe ich mir angewöhnt im Sinne von „Mobile first“ alle Media-Querys mit der Angabe „min-width“ zu machen. Falls Anpassungen für hochauflösende Displays zu machen sind, wird dann die Pixel-Ratio bzw. Resolution abgefragt.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media (-webkit-min-device-pixel-ratio: 1.5),
	(min-resolution: 144dpi),
	(min-resolution: 1.5dppx) {
	/* hiDPI stuff */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Diese Anpassungen greifen dann automatisch bei sehr vielen Geräten. Viele ältere Android-Geräte haben ein (laut Android) HiDPI-Display also eine Pixel-Dichte von 1.5.&lt;/p&gt;
&lt;p&gt;Zum Beispiel:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Galaxy S&lt;/li&gt;
&lt;li&gt;Galaxy S2&lt;/li&gt;
&lt;li&gt;Motorola Milestone (Droid)&lt;/li&gt;
&lt;li&gt;HTC Desire,&lt;/li&gt;
&lt;li&gt;Samsung Nexus S&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Diese Geräte haben alle einen Display mit 480x800px und einen Viewport im Browser von 320×533px. Ergo könnte man die Geräte mit&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;@media only screen and (min-device-width: 480px) {
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ansprechen, bräuchte man aber nicht, sie bekommen automatisch die Anpassungen für „iPhone“ (falls man welche hat).&lt;/p&gt;
&lt;p&gt;Zur Pixel-Density noch eine Geschichte: Ein paar Android-Geräte haben ein sehr kleines und schlechtes Display, z.B. das sehr verbreitete Galaxy Y, das Samsung Galaxy Mini oder das HTC Wildfire. Das Display ist 240×320px groß. In einigen „Responsive View“ Online-Tools kann man die Webseite mit einer Breite von 240px darstellen lassen. Das ist schön, aber diese Ansicht wird man auf diesen Geräten nicht bekommen. Zumindest, wenn man die Defaulteinstellungen so lässt. Klingt komisch, ist aber so. Diese genannten Geräte haben eine Pixel-Dichte von 0.75. Hier wird also der Viewport nicht verkleinert, sondern vergrößert und liegt bei unseren Beispielen demnach bei 320×427px, also etwa wie das iPhone 4. Es gibt auch zahlreiche Billig-Tablets, die das genauso so machen.&lt;/p&gt;
&lt;h3 id=&quot;achso-tablets&quot;&gt;Achso Tablets…&lt;a class=&quot;header-anchor&quot; href=&quot;#achso-tablets&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mein Lieblingsbeipiel das Nexus 7 macht total verrückte Sachen. Bei der Veröffentlichung des Nexus 7 (1. Generation) hatte es mit dem Chrome gemessen eine Viewport-Breite von 603px bei einem Display von 800×1280px. Einige Monate später wurde das durch irgendein Update (entweder OS oder Browser) korrigiert und der Chrome meldete 600px. Aber alle anderen Browser meldeten etwas anderes, Opera mobile (noch ohne Blink) meldete 800px, Firefox 533px und derUC-Browser 602px. Hier zu sagen „so sieht Ihre Website auf dem Nexus 7 aus“, ist schon fast fahrlässig.&lt;/p&gt;
&lt;figure class=&quot;browser-comparison&quot;&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/3hrEavXymW-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/3hrEavXymW-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/3hrEavXymW-150.png&quot; alt=&quot;Chrome Browser portrait view&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;240&quot;&gt;&lt;/picture&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/JEKgvsGM2S-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/JEKgvsGM2S-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/JEKgvsGM2S-150.png&quot; alt=&quot;Firefox Browser portrait view&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;240&quot;&gt;&lt;/picture&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/MtV05faiKE-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/MtV05faiKE-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/MtV05faiKE-150.png&quot; alt=&quot;Opera Mobile portrait view&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;240&quot;&gt;&lt;/picture&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/i-lNvExs9C-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/i-lNvExs9C-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/i-lNvExs9C-150.png&quot; alt=&quot;UC Browser HD portrait view&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;240&quot;&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;p&gt;Dann wäre da noch das iPad Mini, das so gar nicht nach den Regeln spielt. Das iPad Mini hat ein 7,9″ Display mit einer Auflösung von 768×1024px, quasi genauso wie das iPad 2, nur eben 20% kleiner (aber leicht höhere Pixeldichte). Das Gerät meldet auch den Viewport und Pixel-Dichte genau wie das iPad 2, also zeigt exakt die gleiche Menge an Inhalten an wie das iPad 2, nur eben 20% kleiner. Es zeigt auch die gleiche Ansicht wie das iPad 3/4 nur nicht so scharf und 20% kleiner. Eine Ansicht „wie im iPad mini“ kann ich am Desktop also schlecht simulieren.&lt;/p&gt;
&lt;p&gt;Na doch ich könnte folgendes machen:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;iframe.ipadmini {
	transform: scale(0.8);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;figure class=&quot;wp-caption aligncenter&quot;&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/WjcVS1xHSe-604.avif&quot; sizes=&quot;(min-width: 48em) 604px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/WjcVS1xHSe-604.webp&quot; sizes=&quot;(min-width: 48em) 604px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/WjcVS1xHSe-604.png&quot; alt=&quot;iPad mini Vergleich&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;604&quot; height=&quot;450&quot;&gt;&lt;/picture&gt;
&lt;figcaption class=&quot;wp-caption-text&quot;&gt;simpler Vergleich iPad mini vs. Desktop mit 768×1024px&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;zu-guter-letzt&quot;&gt;Zu Guter Letzt&lt;a class=&quot;header-anchor&quot; href=&quot;#zu-guter-letzt&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Was die meisten* Viewport Resizer Tools (bzw. in dem Fall die Browser) falsch machen, sie beziehen die Scrollbar mit in die Anzeige der Größe ein. WebKit basierende Browsers sind die einzigen Browser, die die Scrollbar in der Berechnung des passenden Media-Query nicht mit einbeziehen. Das kann also je nach System und Browser ein falsche Ansicht ergeben. Mobile Browser haben ja keine richtige Scrollbar.&lt;/p&gt;
&lt;h3 id=&quot;nur-was-tun&quot;&gt;Nur was tun?&lt;a class=&quot;header-anchor&quot; href=&quot;#nur-was-tun&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Nicht auf die Ansicht im Desktop-Browser verlassen! Auf echten Geräten testen, z.B. mit &lt;a href=&quot;https://html.adobe.com/edge/inspect/&quot; title=&quot;Edge Inspect – Testing on real devices&quot;&gt;Adobe Edge Inspect&lt;/a&gt;, &lt;a href=&quot;https://vanamco.com/ghostlab/&quot; title=&quot;Ghostlab – Synchronized testing for web and mobile&quot;&gt;Ghostlab&lt;/a&gt; oder &lt;a href=&quot;https://www.iunbug.com/mihtool&quot; title=&quot;MIHTool helps Front-End Engineers to debug and optimize their webpages on iPad and iPhone.&quot;&gt;MIH-Tool&lt;/a&gt;. &lt;a href=&quot;https://opendevicelab.com/&quot; title=&quot;Open Device labs near you&quot;&gt;Open Device Labs&lt;/a&gt; nutzen oder &lt;a href=&quot;https://lab-up.org/&quot; title=&quot;Lab-Up helps to open Open Device Labs&quot;&gt;eröffnen&lt;/a&gt;. Ich habe mir mittlerweile einen (klitzekleinen) Park an Devices angeschafft &lt;a href=&quot;https://odl.maddesigns.de/&quot; title=&quot;Devicelab from maddesigns.de&quot;&gt;odl.maddesigns.de&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Ein gutes Online-Tool ist Ish von (na klar) Brad Frost (auf &lt;a href=&quot;https://bradfrostweb.com/demo/ish/&quot; title=&quot;Ish - Viewport Resize Tool&quot;&gt;https://bradfrostweb.com/demo/ish/&lt;/a&gt; – mal &lt;a href=&quot;https://roxik.com/cat/&quot;&gt;https://roxik.com/cat/&lt;/a&gt; links oben bei URL eingeben und dann rechts oben bei „size“ „Disco“ anschalten =&amp;gt; Party! Hier kann man das Layout überprüfen, indem man auf die unterschiedlichen Größen (S, M, L, XL,…) klickt, klickt man mehrfach auf die Button wird der Viewport in dem gewählten Viewport-Bereich leicht angepasst. Eine Verbindung zu irgendwelchen Devicegrößen ist hier bewusst nicht gemacht worden. Persönlich finde ich auch die neue Responsive View im Firefox sehr gut gelungen (seit FF 15, also seit mehr als 6 Wochen drin ;)).&lt;/p&gt;
&lt;p&gt;Was man auf dem Desktop auch nicht simulieren kann: Systemschriftarten, deren Fallbacks, und und und … aber das ist wieder eine ganz andere Geschichte.&lt;/p&gt;
&lt;p&gt;&lt;small&gt;*es gibt kein Sternchen&lt;/small&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Lange nix gehört von dir</title>
    <link href="https://maddesigns.de/archiv/lange-nix-gehoert-1810.html" />
    <updated>2013-08-22T15:32:24Z</updated>
    <id>https://maddesigns.de/archiv/lange-nix-gehoert-1810.html</id>
    <content type="html">&lt;p&gt;Es war lange ruhig gewesen hier im Blog und ich kann auch nicht versprechen, dass sich das jetzt wieder ändern wird. Themen über die man bloggen könnte gibt es genug, so ist es nicht, aber mir hat in den letzten Monaten absolut die Zeit gefehlt (sadpanda). Erschwerend kam noch hinzu, dass ich der Seite auch längst einen neuen responsiven Anstrich verleihen wollte. Dazu bin ich leider auch noch nicht gekommen. Ich bin zu sehr mit Aufträgen und Schulungen beschäftigt, dass dafür Zeit blieb. Und Familie hab ich auch, die wollen mich auch ab und zu auch sehen. Ihr kennt das. Da ich aber an allen &lt;a href=&quot;http://www.youtube.com/watch?v=9T7eSyo7DRU&quot;&gt;Ecken&lt;/a&gt; und &lt;a href=&quot;http://webtechcon.de/sessions/ress-rwd-and-server-side-components-0&quot;&gt;Enden&lt;/a&gt; was zu Responsive Webdesign erzähle, hat es mich umso mehr geärgert, dass mein Blog noch im 2008er Design war – ich wollte auch nix über Responsive Webdesign im alten, fixen Layout veröffentlichen.&lt;/p&gt;
&lt;p&gt;Anfang der Woche hab ich dann ein WordPress-Update gemacht und dabei das neue responsive Default-Theme gesehen. Na klar, ich hätte das Theme lieber selbst erstellt, aber wie eingangs bereits erwähnt, fehlt mir aktuell absolut die Zeit. Deshalb hab ich das jetzt übergangsweise aktiviert (und werde es nach und nach noch ein wenig pimpen). Morgen wird es einen neuen Artikel geben, der mir schon länger unter den Nägeln brennt.&lt;/p&gt;
&lt;p&gt;Heute hatte ich auch die neue &lt;a href=&quot;http://t3n.de/magazin/responsive-design-prozess-tools-ansaetze-responsive-234137/&quot;&gt;T3N&lt;/a&gt; im Briefkasten, da gibt es einen Artikel von mir über den „Responsive Workflow“ zu lesen. Im Wesentlichen ist das inhaltlich der Vortrag „&lt;a href=&quot;https://maddesigns.de/responsive-workflow/&quot;&gt;Responsive Webdesign Process&lt;/a&gt;„.&lt;/p&gt;
&lt;p&gt;Also, danke fürs dran bleiben und stay tuned!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The Responsive Webdesign Process</title>
    <link href="https://maddesigns.de/archiv/the-responsive-webdesign-process-1735.html" />
    <updated>2012-10-11T09:51:41Z</updated>
    <id>https://maddesigns.de/archiv/the-responsive-webdesign-process-1735.html</id>
    <content type="html">&lt;p&gt;Bei der TYPO3 Conference (T3CON12DE) in Stuttgart hatte ich die Gelegenheit einen Vortrag über den neuen Prozess in Responsive Webdesign Projekten zu sprechen. Meiner Meinung nach muss sich bei RWD Projekten der Workflow vom üblichen „Waterfall“ Prinzip zu einem iterativen Prozess ändern. Einen Großteil der Arbeit in Responsive Webdesign Projekten sehe ich eher in konzeptionellem Bereich, als in der Programmierung selbst. Vielleicht ist auch mal ein ausführlicher Artikel zum Thema notwendig, hier aber erstmal die Slides: &lt;a href=&quot;https://maddesigns.de/rwd-process/&quot; title=&quot;The Responsive Webdesign Process&quot;&gt;/rwd-process/&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Sass &amp; Compass Introduction</title>
    <link href="https://maddesigns.de/archiv/sass-compass-introduction-1701.html" />
    <updated>2012-04-30T06:59:46Z</updated>
    <id>https://maddesigns.de/archiv/sass-compass-introduction-1701.html</id>
    <content type="html">&lt;p&gt;Meine Workshop-Slides „&lt;a href=&quot;https://maddesigns.de/sass-compass-introduction/&quot;&gt;Modern Frontend Development with Sass &amp;amp; Compass&lt;/a&gt;“ sind nun online verfügbar.&lt;/p&gt;
&lt;p&gt;Der drei Stunden Workshop, den ich bei den &lt;a href=&quot;http://t3dd12.typo3.org/sessions/&quot;&gt;TYPO3 Developer Days&lt;/a&gt; in München gegeben habe, habe ich am letzten Samstag auch nochmal beim &lt;a href=&quot;http://www.typo3camp-stuttgart.de/programm/sessions.html&quot;&gt;TYPO3camp Stuttgart&lt;/a&gt; wiederholt. Im Workshop ging es um die ersten Schritte mit Sass &amp;amp; Compass, sowie die hilfreichsten Features vorzustellen und einen Ausblick auf die neue Sass Version 3.2 zu geben.&lt;/p&gt;
&lt;p&gt;Bei Fragen, pingt mich gern auf &lt;a href=&quot;http://twitter.com/#!/maddesigns&quot;&gt;Twitter&lt;/a&gt; dazu an, kommentiert hier im Blog oder schreibt mir eine &lt;a href=&quot;mailto:sven@maddesigns.de&quot;&gt;E-Mail&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>IE9 border-radius right-to-left (direction: rtl) Bug</title>
    <link href="https://maddesigns.de/archiv/ie9-border-radius-direction-rtl-bug-1657.html" />
    <updated>2012-03-22T10:30:57Z</updated>
    <id>https://maddesigns.de/archiv/ie9-border-radius-direction-rtl-bug-1657.html</id>
    <content type="html">&lt;p&gt;Wer schon mal Layouts für arabische Websites umgesetzt hat, kennt sicherlich das HTML-Attribut „&lt;a href=&quot;http://www.w3.org/TR/html5/elements.html#the-dir-attribute&quot;&gt;dir&lt;/a&gt;„, das man z.B. im body-Tag einfügen kann um die Leserichtig des Dokuments von links-nach-rechts auf rechts-nach-links zu ändern. In CSS ist die Anweisung „direction“ dafür zuständig. Für beide Möglichkeiten kann man die Werte „rtl“ (right-to-left) oder „ltr“ (left-to-right) sowie „auto“ angeben.&lt;/p&gt;
&lt;p&gt;Hat man im Layout, runde Ecken (border-radius) nur an einer Seite, z.B. rechts abgerundet, dann sind im IE9 die Ecken allerdings links abgerundet. Der IE9 dreht von sich aus die runden Ecken im RTL-Modus um. Das ist zwar nett vom IE9, aber nicht richtig und auch nicht immer gewollt. Bei gleichmäßig abgerundeten Ecken kann man den Bug natürlich nicht nachvollziehen, deshalb fällt er selten auf.&lt;/p&gt;
&lt;p&gt;Hier mal ein jsFiddle-Beispiel:&lt;/p&gt;
&lt;iframe title=&quot;Eingebettete Demo&quot; class=&quot;u-embed u-embed--300&quot; src=&quot;http://jsfiddle.net/maddesigns/HuDRp/embedded/result/&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;Im IE9 sieht das allerdings so aus (Screenshot):&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/maddesigns/HuDRp/embedded/result/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/oCjIEyPmzg-318.avif&quot; sizes=&quot;(min-width: 48em) 318px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/oCjIEyPmzg-318.webp&quot; sizes=&quot;(min-width: 48em) 318px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/oCjIEyPmzg-318.png&quot; alt=&quot;Screenshot des IE9-RTL-Bugs bei border-radius&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;318&quot; height=&quot;221&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;**&lt;/p&gt;
&lt;p&gt;Der simplifizierte HTML-Aufbau:**&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;body dir=&amp;quot;rtl&amp;quot;&amp;gt;
    &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt; right to left &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
.box {
    background-color: red;
    padding: 48px;
    height: 100px;
    width: 200px;
    margin: 40px;
    border-radius: 0 48px 48px 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Den Bug muss man nun per Conditional-Comments für den IE9 entgegnen und die angerundeten Ecken „umdrehen“:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;!--[if IE 9]&amp;gt;
  &amp;lt;style&amp;gt;
    body[dir=&amp;quot;rtl&amp;quot;] .box  {
      border-radius: 48px 0 0 48px; /* switched from left to right */
    }
  &amp;lt;/style&amp;gt;
&amp;lt;![endif]--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Im IE10 ist der Bug bis zum Build 8250 auch noch nachzuvollziehen.&lt;/p&gt;
&lt;p&gt;Den Bug hat &lt;a href=&quot;http://twitter.com/#!/herzogkienast&quot;&gt;Andrea Herzog-Kienast&lt;/a&gt; entdeckt und ich kann das Verhalten leider nur bestätigen.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Livereload – ein Browser Refresh Tool</title>
    <link href="https://maddesigns.de/archiv/livereload-browser-refresh-tool-1640.html" />
    <updated>2012-03-12T14:08:59Z</updated>
    <id>https://maddesigns.de/archiv/livereload-browser-refresh-tool-1640.html</id>
    <content type="html">&lt;p&gt;Wer kennt es nicht… man entwickelt in der IDE oder noch besser geeignet für Frontend-Entwicklung im Texteditor &lt;a href=&quot;http://www.sublimetext.com/2&quot;&gt;Sublime Text 2&lt;/a&gt; und switcht dann zum Browser um die Änderungen anschließend zu überprüfen. Dazu muss man im Browser ein Reload durchführen. &lt;a href=&quot;http://livereload.com/&quot;&gt;Livereload&lt;/a&gt; ist ein kleines aber sehr hilfreiches Tool für Mac (Windows in Beta-Status) was diesen Prozess beschleunigt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Livereload&lt;/strong&gt; erkennt Änderungen im Projektordner beim Speichern einer Datei. Ein Browser-Plugin für Chrome (oder Firefox, Safari, Mobile Safari) führt dann umgehend im Hintergrund den Refresh/Reload durch. Das erspart natürlich einige Tastenanschläge/Mausklicks. Auf größeren Bildschirmen ist es praktisch, wenn man die beiden Fenster parallel positioniert und dann die Änderung am HTML oder CSS direkt im Blick hat.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2012/03/screenshot1.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/2LuLhaCUS5-520.avif&quot; sizes=&quot;(min-width: 48em) 520px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/2LuLhaCUS5-520.webp&quot; sizes=&quot;(min-width: 48em) 520px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/2LuLhaCUS5-520.png&quot; alt=&quot;Screenshot des Livereload-Tools für Mac&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;520&quot; height=&quot;366&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Das wäre schon schön genug, aber Livereload bietet noch mehr. Es kann auch Sass-, LESS- oder Stylus- sowie CoffeeScript-Dateien kompilieren und dann den Browser-Reload durchführen. Zudem können auch „Refresh-Pausen“ eingestellt werden. Das ist hilfreich, wenn man z.B. die geänderten Dateien beim Speichern direkt auf den Webserver hochlädt und die Änderung dort betrachtet. Diesen Zeitinterval kann man als Wartezeit zum Live-Reload konfigurieren.&lt;/p&gt;
&lt;p&gt;Das Mac-Tool ist nach der Beta-Phase nun im App-Store erhältlich und kostet $9.99. Ich kann das Tool nur jedem empfehlen und habe von &lt;a href=&quot;https://twitter.com/#!/livereload/&quot;&gt;@livereload&lt;/a&gt; 2 Promo-Codes für meine Leser erhalten. Um zu gewinnen einfach einen Kommentar abgeben!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Box-Sizing – CSS3 Adventskalender Tag 23</title>
    <link href="https://maddesigns.de/archiv/box-sizing-1597.html" />
    <updated>2011-12-23T07:00:32Z</updated>
    <id>https://maddesigns.de/archiv/box-sizing-1597.html</id>
    <content type="html">&lt;p&gt;Einer der am meist bekannten vermeintlichen “Bugs” der richtig alten Internet Explorer Versionen (IE6 in “Quirks Mode” oder älter) ist sicherlich die Darstellung von Elementen mit einer bestimmten Breite (&lt;code&gt;width&lt;/code&gt;) und definiertem Innenabstand (&lt;code&gt;padding&lt;/code&gt;):&lt;br&gt;
&lt;a href=&quot;https://de.wikipedia.org/wiki/Box-Modell-Fehler_im_Internet_Explorer&quot;&gt;Der Box-Modell-Fehler&lt;/a&gt;.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;img src=&quot;https://maddesigns.de/img/2011/12/W3C_and_Internet_Explorer_box_models.png&quot; alt=&quot;Das W3C und das Internet Explorer Box Modell&quot; title=&quot;© CC by Will Pittenger / https://de.wikipedia.org/w/index.php?title=Datei:W3C_and_Internet_Explorer_box_models.svg&amp;amp;filetimestamp=20090912075240&quot;&gt;&lt;/p&gt;
&lt;p&gt;Jeder andere Browser interpretiert ein Block-Element (wie beispielsweise ein &lt;code&gt;p&lt;/code&gt;– oder &lt;code&gt;div&lt;/code&gt;-Element) mit einer Breite von 200 Pixeln, einem Innenabstand von 10 Pixeln und einem Rahmen mit jeweils 5 Pixeln Breite wie folgt:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;200px Breite + 2x10px Padding + 2x5px Border = 230px Gesamtbreite&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Eigentlich ein bisschen komisch, wenn man mal drüber nachdenkt: Man definiert die Breite eines Elementes, welches einen bestimmten Inhalt hat. Man stellt fest, dass der Inhalt genau mit der Breite der Box abschließt, was eventuell nicht so gut aussieht und entschließt sich einen Abstand hinzuzufügen. Auf einmal ist die Box allerdings viel breiter, als die Breite die man zuvor definiert hat. Um diesem Problem zu begegnen muss man also jedes mal, wenn man den Innenabstand eines Elements ändert auch die Breite entsprechend anpassen.&lt;/p&gt;
&lt;p&gt;Microsoft dachte sich damals, dass es viel intuitiver ist, wenn der Abstand vom Browser in die Breite des Elements eingerechnet wird. Fand irgendwie keiner cool – außer Microsoft.&lt;/p&gt;
&lt;p&gt;Das Web entwickelte sich weiter und mit CSS3 wurde der Gedanke von Microsoft wieder aufgegriffen und die Eigenschaft &lt;code&gt;box-sizing&lt;/code&gt; eingeführt.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;box-sizing&lt;/code&gt; definiert, wie sich ein Element in seiner Breite verhalten soll. Diese Eigenschaft ist schon seit einiger Zeit in den meisten Browsern standardisiert, wird allerdings trotzdem häufig vergessen.&lt;/p&gt;
&lt;h2 id=&quot;eigenschaftswerte&quot;&gt;Eigenschaftswerte&lt;a class=&quot;header-anchor&quot; href=&quot;#eigenschaftswerte&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Es gibt zwei Werte, die von der &lt;a href=&quot;https://www.w3.org/TR/css3-ui/#box-sizing&quot;&gt;CSS3 Spezifikation&lt;/a&gt; für das “CSS3 Basic User Interface Module” standardisiert sind. Das sind &lt;code&gt;content-box&lt;/code&gt; und &lt;code&gt;border-box&lt;/code&gt;. Der Wert &lt;code&gt;content-box&lt;/code&gt; ist dabei das in CSS2 bereits standardisierte Box-Modell; wobei &lt;code&gt;border-box&lt;/code&gt; sich auf das Box-Modell des alten Internet Explorer bezieht.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.peterkroener.de/test/box-sizing.html&quot;&gt;Eine Demo&lt;/a&gt; der beiden verschiedenen Werte hat &lt;a href=&quot;https://workingdraft.de/&quot;&gt;Workingdraft&lt;/a&gt;-Kollege &lt;a href=&quot;https://www.peterkroener.de/&quot;&gt;Peter Kröner&lt;/a&gt; bereits in &lt;a href=&quot;https://www.peterkroener.de/schoenes-neues-css-box-sizing/&quot;&gt;seinem Artikel&lt;/a&gt; zum Thema gezeigt.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://maddesigns.de/img/2011/12/W3C_and_padding_box_models.png&quot; alt=&quot;Das Content-Box und das Padding-Box Modell&quot; title=&quot;© CC by Will Pittenger / https://de.wikipedia.org/w/index.php?title=Datei:W3C_and_Internet_Explorer_box_models.svg&amp;amp;filetimestamp=20090912075240&quot;&gt;&lt;/p&gt;
&lt;p&gt;Mozillas Implementierung von &lt;code&gt;box-sizing&lt;/code&gt; bietet zusätzlich noch den Wert &lt;code&gt;padding-box&lt;/code&gt; an, der praktisch einen Zwischenwert der beiden anderen Werte bietet: Die Rahmen-Breite (&lt;code&gt;border-width&lt;/code&gt;) wird nicht mit zur Gesamtbreite hinzugerechnet, jedoch der Innenabstand.&lt;/p&gt;
&lt;h2 id=&quot;browsersupport&quot;&gt;Browsersupport&lt;a class=&quot;header-anchor&quot; href=&quot;#browsersupport&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Das ist klasse: &lt;code&gt;box-sizing&lt;/code&gt; wird von &lt;a href=&quot;https://caniuse.com/css3-boxsizing&quot;&gt;fast allen Browsern unterstützt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Einige Besonderheiten gibt es allerdings: Im Mozilla Firefox braucht man immer noch das &lt;code&gt;-moz&lt;/code&gt;-Vendor-Prefix. Es gibt seit langer Zeit &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=243412&quot;&gt;diesen Bug&lt;/a&gt; der aber leider in der Standard-Version – ohne Prefix – immer noch nicht implementiert ist. Für den Internet Explorer 8 ist das &lt;code&gt;-ms&lt;/code&gt;-Prefix nötig. Ältere Versionen des Internet Explorers unterstützen diese Eigenschaft nicht. Erstaunlicherweise wird sie allerdings von &lt;a href=&quot;https://caniuse.com/css3-boxsizing&quot;&gt;allen mobilen Browsern&lt;/a&gt; vollständig unterstützt.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/kU8S59Ru2--521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Der Vollständigkeit halber sei erwähnt, dass es auch für diese Eigenschaft einen Polyfill gibt. Er wurde von &lt;a href=&quot;https://twitter.com/#!/derSchepp&quot;&gt;Christian Schäfer&lt;/a&gt; entwickelt, der ja &lt;a href=&quot;https://maddesigns.de/schonere-css3-transforms-%E2%80%93-css3-adventskalender-tag-5-1227.html&quot;&gt;auch&lt;/a&gt; &lt;a href=&quot;https://maddesigns.de/archiv/css3-filter-1525.html&quot;&gt;schon&lt;/a&gt; beim CSS3-Adventskalender dieses Jahr geschrieben hat und ist &lt;a href=&quot;https://github.com/Schepp/box-sizing-polyfill&quot;&gt;auf GitHub&lt;/a&gt; zu finden. Für alle Entwickler, die sich mit den älteren IE-Versionen beschäftigen müssen, sicherlich sehr hilfreich.&lt;/p&gt;
&lt;h2 id=&quot;fazit&quot;&gt;Fazit&lt;a class=&quot;header-anchor&quot; href=&quot;#fazit&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Durch den optimalen Browsersupport der Eigenschaft kann diese ohne Bedenken eingesetzt werden. Wer oldIE supportet sollte sich allerdings über den Einsatz eines Polyfills Gedanken machen. Oft ist aber die pixel-genaue Darstellung in älteren Browsern &lt;a href=&quot;https://drublic.de/blog/wo-sind-meine-abgerundeten-ecken/&quot;&gt;gar nicht nötig&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/OG2xppYnaP-110.avif&quot; sizes=&quot;110px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/OG2xppYnaP-110.webp&quot; sizes=&quot;110px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/OG2xppYnaP-110.png&quot; alt=&quot;Hans Christian Reinl&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;110&quot; height=&quot;110&quot;&gt;&lt;/picture&gt;&lt;strong&gt;Hans Christian Reinl&lt;/strong&gt; ist heute unser Gastautor im CSS3 Adventskalender. Hans ist Frontend Webdeveloper und arbeitet gerade in Freiburg bei der Agentur &lt;a href=&quot;https://gebruederheitz.de/&quot;&gt;/gebrüderheitz&lt;/a&gt; sowie als Freiberufler.&lt;/p&gt;
&lt;p&gt;In seinem Blog &lt;a href=&quot;https://drublic.de/blog/&quot;&gt;drublic.de&lt;/a&gt; schreibt er auf englisch einiges über Cutting-Edge-Webtechnologien. Auf Twitter ist er als &lt;a href=&quot;https://twitter.com/#!/drublic&quot;&gt;@drublic&lt;/a&gt; unterwegs und auf &lt;a href=&quot;https://plus.google.com/112019818423540363330/&quot;&gt;Google+&lt;/a&gt; sowie &lt;a href=&quot;https://github.com/drublic&quot;&gt;GitHub&lt;/a&gt; zu finden.&lt;br class=&quot;u-clear&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Für Fragen stehe ich gerne zur Verfügung. Schreibt einfach einen Kommentar oder haut mich &lt;a href=&quot;https://twitter.com/#!/drublic&quot;&gt;auf Twitter&lt;/a&gt; an.&lt;/p&gt;
&lt;h2 id=&quot;weiterfuhrende-informationen&quot;&gt;Weiterführende Informationen&lt;a class=&quot;header-anchor&quot; href=&quot;#weiterfuhrende-informationen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Weiterführende Informationen zu &lt;code&gt;box-sizing&lt;/code&gt; finden sich &lt;a href=&quot;https://developer.mozilla.org/En/CSS/Box-sizing&quot;&gt;im MDN&lt;/a&gt; und in &lt;a href=&quot;https://css-tricks.com/box-sizing/&quot;&gt;Chris Coyiers Artikel&lt;/a&gt; zum Thema. Auch PPK hat &lt;a href=&quot;https://www.quirksmode.org/css/box.html&quot;&gt;darüber gebloggt&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 Adventskalender 2011 – Tag 22</title>
    <link href="https://maddesigns.de/archiv/css3-adventskalender-2011-%E2%80%93-tag-22-1591.html" />
    <updated>2011-12-22T07:09:24Z</updated>
    <id>https://maddesigns.de/archiv/css3-adventskalender-2011-%E2%80%93-tag-22-1591.html</id>
    <content type="html">&lt;p&gt;…im Webstandard Blog zum Thema “&lt;a href=&quot;https://webstandard.kulando.de/post/2011/12/21/css4-die-zukunft-des-webdesign-tag-22-im-css3-adventskalender-2011&quot;&gt;CSS4 – Die Zukunft des Webdesign&lt;/a&gt;“&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Fortgeschrittene Webtypografie mit Canvas und CSS – CSS3 Adventskalender Tag 21</title>
    <link href="https://maddesigns.de/archiv/fortgeschrittene-webtypografie-mit-canvas-und-css-2-1561.html" />
    <updated>2011-12-21T07:06:54Z</updated>
    <id>https://maddesigns.de/archiv/fortgeschrittene-webtypografie-mit-canvas-und-css-2-1561.html</id>
    <content type="html">&lt;p&gt;Die letzten 3 Jahre haben uns Designern aufregende neue Möglichkeiten für die typografische Gestaltung von Schrift im Internet geschenkt. Schriften über &lt;code&gt;@font-face&lt;/code&gt; direkt ins Dokument einzubinden ist mittlerweile zur Selbstverständlichkeit geworden, neue &lt;a href=&quot;https://maddesigns.de/archiv/css3-filter-1525.html&quot; title=&quot;CSS-Filter – mehr Effekte fürs Web – CSS3 Adventskalender Tag 19&quot;&gt;CSS Filter&lt;/a&gt; und &lt;a href=&quot;https://maddesigns.de/schonere-css3-transforms-%e2%80%93-css3-adventskalender-tag-5-1227.html&quot; title=&quot;Schönere CSS3 Transforms – CSS3 Adventskalender Tag 5&quot;&gt;Transformationen&lt;/a&gt; haben unser gestalterisches Vokabular entscheidend erweitert. Darüber hinaus versprechen neue CSS Eigenschaften wie „&lt;code&gt;mask-image&lt;/code&gt;“ (derzeit nur Webkit) und Javascript Libraries wie &lt;a href=&quot;https://letteringjs.com/&quot;&gt;lettering.js&lt;/a&gt; nie dagewesene Kontrolle über die Schriftdarstellung im Web.&lt;/p&gt;
&lt;p&gt;Und trotzdem reichen alle diese Lösungen noch immer bei weitem nicht aus, um an die Grenzen des Möglichen zu kommen. Jeder, der einmal versucht hat, einen HTML-Text mit einem Verlauf zu füllen, weiss wovon ich rede.&lt;/p&gt;
&lt;p&gt;Ich möchte hier eine Methode vorstellen, die zu Unrecht noch nicht die Beachtung gefunden hat, die Sie verdient: das Gestalten von Text mit der HTML5 Canvas.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Dass die Canvas über viele aufregende typografische Methoden verfügt, hat sich bisher kaum herumgesprochen. Wahrscheinlich liegt das daran, dass sie bisher eher als Domäne der Spieleentwickler wahrgenommen wurde. Das ist Schade, denn Sie bietet uns Möglichkeiten, die weit über die klassischen Methoden die CSS zu bieten hat hinausgehen und das auch noch in allen modernen Browsern: Verläufe oder Bitmaps in Füllung und Outline, Masken, Schatten, Blendmodes sind nur einige ihrer Methoden.&lt;/p&gt;
&lt;p&gt;Ich werde zu Beginn die Textwerkzeuge der Canvas API zu Schriftgestaltung vorstellen und im zweiten Teil zeigen, wie sich diese Methoden nutzen lassen um aufregende, barrierefreie und suchmaschinenfreundliche Webtypografie zu erzeugen.&lt;/p&gt;
&lt;h3 id=&quot;x-1-die-textfunktionen-der-canvas&quot;&gt;1. Die Textfunktionen der Canvas&lt;a class=&quot;header-anchor&quot; href=&quot;#x-1-die-textfunktionen-der-canvas&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ich setze voraus, dass Ihr schon wisst wie man eine Canvas in einem HTML Dokument erstellt und anspricht.&lt;/p&gt;
&lt;p&gt;Eine bestehende Canvas (wir haben den Kontext wie meist üblich mit „ctx“ bezeichnet) muss zunächst vorbereitet werden. Mit der Anweisung „Font“ legen wir fest, welche Schrift in welcher Größe wir verwenden wollen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.font = &amp;quot;50px  &#39;Helvetica&#39; &amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Weiterhin müssen wir festlegen, wie die Grundlinie verankert werden soll. Fünf Möglichkeiten stehen zur Auswahl:&lt;/p&gt;
&lt;p&gt;„&lt;code&gt;top&lt;/code&gt;„, „&lt;code&gt;hinging&lt;/code&gt;„, „&lt;code&gt;middle&lt;/code&gt;„, „&lt;code&gt;alphabetic&lt;/code&gt;„, „&lt;code&gt;demographic&lt;/code&gt;„, „&lt;code&gt;bottom&lt;/code&gt;„. Die Entscheidung fällt uns leicht: bis auf „&lt;code&gt;alphabetic&lt;/code&gt;“ werden alle Ausrichtungen von jedem Browser anders interpretiert Die Anweisung lautet somit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.textBaseline = &#39;alphabetic&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Für Typografen sicherlich von Interesse ist die Möglichkeit für die gesamte Canvas eine Skalierung festzulegen. Gut zu wissen für den Fall, dass man mal für hochauflösende Displays entwickelt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.scale(1,1);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bleibt zu klären, wie wir unseren Text füllen möchten. Zur Auswahl stehen solide Farben, Verläufe oder Bitmap-Muster. Der Einfachheit halber starten wir mal mit einer Farbe:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.fillStyle = &amp;quot;#ff0000&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die einfachste Methode, Text in eine bestehende Canvas zu schreiben ist die Methode „&lt;code&gt;fillText&lt;/code&gt;„. Die folgende Methode schreibt „Hallo Welt“ in die Canvas, 50px von rechts und eine 100px von oben verschobene Grundlinie:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.fillText(&amp;quot;Hallo Welt&amp;quot;, 50, 100);
&lt;/code&gt;&lt;/pre&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/DirkWeber/dWqwG/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Neben der „&lt;code&gt;fillText&lt;/code&gt;“ Methode können mit der Methode „&lt;code&gt;textStroke&lt;/code&gt;“ auch Umrisslinien gezeichnet werden:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.lineWidth = 3;
ctx.strokeStyle = &amp;quot;#0000ff&amp;quot;;
ctx.textStroke(&amp;quot;Hallo Welt&amp;quot;, 50, 100);
&lt;/code&gt;&lt;/pre&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/DirkWeber/49Dxe/1/embedded/result&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h4 id=&quot;verlaufe&quot;&gt;Verläufe&lt;a class=&quot;header-anchor&quot; href=&quot;#verlaufe&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Um anstelle einer soliden Farbe eine Verlaufsfüllung zu verwenden, muss diese vorher definiert werden. Das geschieht in 2 Schritten:&lt;/p&gt;
&lt;p&gt;**&lt;/p&gt;
&lt;p&gt;1: Start- und Endpunkt festlegen:**&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var gradient = ctx.createLinearGradient(0, 0, 200, 50);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hier haben wir einen Verlauf mit dem Startpunkt (x:0, y:0) und dem Endpunkt (x:200, y: 50) definiert.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Color-Stops hinzufügen.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So sähe es aus, wenn wir einen Verlauf von weiss(0%) nach schwarz(50%) nach rot(100%) festlegen wollten:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gradient.addColorStop(0, &#39;white&#39;);
gradient.addColorStop(0.5, &#39;black&#39;);
gradient.addColorStop(1, &#39;red&#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/DirkWeber/V5FaB/1/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h4 id=&quot;bitmapfullungen&quot;&gt;Bitmapfüllungen&lt;a class=&quot;header-anchor&quot; href=&quot;#bitmapfullungen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Bitmaps können ebenfalls als Füllungen verwendet werden. In dem meisten Fällen wird man ein jpg oder png verwenden, aber es lassen sich auch interessante Effekte erzielen, indem man dynamisch in einer Canvas generierte Bilder als Füllung einsetzt.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var img = new Image(),pattern;
img.src	= &amp;quot;img/myimage.jpg&amp;quot;;
img.onload = function(){
  pattern = ctx.createPattern(img, &amp;quot;repeat&amp;quot;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hier ist zu beachten, dass wir unbedingt warten müssen bis das Bild vom Server geladen wurde, bevor wir das Muster in der Canvas verwenden.&lt;/p&gt;
&lt;p&gt;Das schöne an Verläufen und Mustern ist, dass Sie nicht nur in Textfüllungen sondern auch auf Outlines verwendet werden können. Es lassen sich somit einige beeindruckende Effekte erzielen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.strokeStyle = gradient;
ctx.strokeText(&amp;quot;Hallo Welt&amp;quot;, 50, 100);
ctx.fillStyle = pattern;
ctx.fillText(&amp;quot;Hallo Welt&amp;quot;, 50, 100);
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;schatten&quot;&gt;Schatten&lt;a class=&quot;header-anchor&quot; href=&quot;#schatten&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Die Canvas bietet auch die Möglichkeit, Schatten zu erzeugen. Ein Schatten mit 50% Opazität, 5px Versatz und einem Blur von 7 Pixeln sieht so aus:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.shadowColor = “rgba(0,0,0,0.5)”;
ctx.shadowOffsetX = 5;
ctx.shadowOffsetY = 5;
ctx.shadowBlur = 7;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wurde dem Kontext einmal Schatten zugewiesen, wird dieser fortan auf alle weiteren Zeichenoperationen angewendet. Wenn man ihn nicht mehr benötigt, sollte man ihn deswegen zurücksetzen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ctx.shadowColor		= &amp;quot;rgba(0,0,0,0)&amp;quot;;
ctx.shadowOffsetX 	= 0;
ctx.shadowOffsetY 	= 0;
ctx.shadowBlur 		= 0;
&lt;/code&gt;&lt;/pre&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/DirkWeber/nnqc8/1/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Bei dieser kurzen Übersicht über die gängigsten Textzeichenmethoden der Canvas möchte ich es hier belassen. Leider konnte ich nur an der Oberfläche kratzen, welche Vielfalt an Möglichkeiten darüber hinaus bestehen. So lassen sich z. B. mit der Methode globalCompositeOperation BlendModes für Zeichenvorgänge festlegen, die Methode &lt;code&gt;clip()&lt;/code&gt; erlaubt es uns, Shapes als Masken zu verwenden. Gute weiterführende Infos finden sich natürlich bei &lt;a href=&quot;https://developer.mozilla.org/en/Canvas_tutorial&quot; title=&quot;Canvas Tutorial&quot;&gt;Mozilla&lt;/a&gt; und in der &lt;a href=&quot;https://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/HTML-canvas-guide/Introduction/Introduction.html&quot; title=&quot;HTML5 Canvas&quot;&gt;Safari Developer Library&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;canvas-mit-css-verbinden&quot;&gt;Canvas mit CSS verbinden:&lt;a class=&quot;header-anchor&quot; href=&quot;#canvas-mit-css-verbinden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wir haben gelernt, wie die Canvas genutzt werden kann um Texte mit einer Vielzahl von Effekten zu versehen. Leider ist die Canvas eine semantisch bedeutungslose Ansammlung von Pixeln. Textliche Inhalte sind von aussen nicht lesbar und eine Trennung von Präsentations- und Inhaltsebene findet nicht statt. Wie können wir die Möglichkeiten der Canvas innerhalb eines HTML Dokumentes so einsetzen, dass Semantik und Maschinenlesbarkeit eines Textes erhalten bleiben? Wie lässt sich Barrierefreiheit erzielen?&lt;/p&gt;
&lt;p&gt;Nachdem ich nun schon einige Male mit dieser Methode in Berührung gekommen bin, hat sich für mich der folgende Weg als der praktikabelste herausgestellt:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ermittle den Textinhalt und die Textmetrik des Elementes dessen Typografie verändert werden soll.&lt;/li&gt;
&lt;li&gt;Erstelle die Canvas Grafik mit dem ermittelten Text.&lt;/li&gt;
&lt;li&gt;Weise dem Element die Grafik als Hintergrundbild zu&lt;/li&gt;
&lt;li&gt;Mach den HTML Text des Elementes transparent, damit er nicht mehr zu sehen ist, aber selektiert und kopiert werden kann und für Crawler und Screenreader zur Verfügung steht&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;EIn Beispiel macht den Prozess verständlich: nehmen wir an, auf einer Website befindet sich eine &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; der folgender CSS Stil zugewiesen ist:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#headline{
	font-family: &#39;Helvetics&#39;, sans-serif;
	font-size: 40px;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;zuerst ermitteln wir Stileigenschaften und Textinhalt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var elem = documentGetElementById(&amp;quot;headline&amp;quot;),
    text = elem.textContent,
    style = document.defaultView.getComputedStyle(elem, null),
    font = style.getPropertyValue(&amp;quot;font-family&amp;quot;).match(/^[^,]*/gi).replace(/[&#39;&amp;quot;]*/gfont,&amp;quot;&amp;quot;),
    size = parseFloat(style.getPropertyValue(&amp;quot;font-size&amp;quot;)),
    topPadding=parseFloat(style.getPropertyValue(&amp;quot;padding-top&amp;quot;)),
    leftPadding=parseFloat(style.getPropertyValue(&amp;quot;padding-left&amp;quot;));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jetzt wird’s kompliziert: damit wir den Text in der Canvas deckungsgleich mit dem HTML Text auf dieselbe Grundlinie setzen können, müssen wir diese Grundlinie mit einem komplizierten Trick ermitteln. Ich werde nur kurz beschreiben, wie die Technik funktioniert, wer mehr wissen will, sollte am besten die Source zu diesem Beispiel studieren:&lt;/p&gt;
&lt;p&gt;Zuerst müssen wir mit Javascript ein Element mit denselben Texteigenschaften wie unser &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; ins Dokument schreiben, In dieses Element hängen wir nun ein 1 x 1 Pixel Bild mit der CSS-Eigenschaft vertical-align: baseline. Wir lesen die offsetTop Eigenschaft dieses Bildes aus und haben mit diesem Wert auch die Position der Baseline. Natürlich entfernen wir unsere Testelemente nachher wieder ordentlich.&lt;/p&gt;
&lt;p&gt;Nun können wir die Canvas erstellen und der &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; als Hintergrundbild zuordnen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var canvas = document.createElement(&amp;quot;canvas&amp;quot;),
    top = topPadding+height;

if (this.canvas.getContext) {
  var ctx = canvas.getContext(&#39;2d&#39;);
  ctx.font = size+&amp;quot;px &#39;&amp;quot;+font+&amp;quot;&#39;&amp;quot;;
  ctx.textBaseline = &#39;alphabetic&#39;;
  ctx.scale(1,1);
  ctx.fillStyle = &amp;quot;green&amp;quot;;
  ctx.fillText (txt, Padding, top);

  var img = canvas.toDataURL();
  elem.style.color=&amp;quot;rgba(0,0,0,0.0)&amp;quot;;
  elem.style.backgroundImage=&amp;quot;url(&amp;quot;+img+&amp;quot;)&amp;quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Im vorliegenden Fall wurde eine einfarbige Schrift durch eine einfarbige Schrift ersetzt. Das macht natürlich außer zu Demonstrationszwecken keinen Sinn.&lt;/p&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/DirkWeber/zgQre/5/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Diese kleine Galerie zeigt aber, welche Möglichkeiten uns diese Methode sonst noch eröffnet. Die Beispiele wurden mit &lt;strong&gt;fontastiq.js&lt;/strong&gt; erstellt, einer Javascript Library für Schriftmanipulation mittels Canvas an der ich zurzeit arbeite und die Ihr auf Github Forken könnt sobald ich die gröbsten Kinderkrankheiten entfernt habe.&lt;/p&gt;
&lt;p&gt;Selbstverständlich muss man sich nicht nur mit den Standardfunktionen der Canvas zufrieden geben. Schließlich gibt es mittlerweile eine große Zahl an Javascript Libraries zur Grafikmanipulation wie z.B.: &lt;a href=&quot;https://www.pixastic.com/&quot;&gt;Pixastic&lt;/a&gt;, &lt;a href=&quot;https://github.com/mezzoblue/PaintbrushJS&quot;&gt;paintbrush.js&lt;/a&gt;, &lt;a href=&quot;https://camanjs.com/&quot;&gt;Caman.js&lt;/a&gt; oder &lt;a href=&quot;https://peternitsch.net/bitmapdata.js/&quot;&gt;Bitmapdata.js&lt;/a&gt;, mit denen sich aufregende Effekte erzielen lassen. Ich hoffe jedenfalls, dass dieser kurze Artikel Euch einige Anregungen geben konnte um weitere ausgefallene typografische Effekte zu schaffen.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;img src=&quot;https://maddesigns.de/img/2011/12/dirk-weber.jpg&quot; alt=&quot;Dirk Weber (eleqtriq)&quot; width=&quot;150&quot; height=&quot;150&quot; class=&quot;alignleft size-full wp-image-1581&quot;&gt;Gastautor &lt;strong&gt;Dirk Weber (eleqtriq)&lt;/strong&gt; ist Interfacedesigner und Webentwickler im schönen Hilden bei Düsseldorf. Dirk schreibt in seinem Blog &lt;a href=&quot;https://www.eleqtriq.com/de/&quot; title=&quot;Blog von Dirk Weber&quot;&gt;www.eleqtriq.com/de/&lt;/a&gt; über Webstandards, UX und Flash. Eines seiner Projekte ist &lt;a href=&quot;https://csswarp.eleqtriq.com/&quot; title=&quot;CSS3Warp&quot;&gt;CSS3Warp&lt;/a&gt; ein Text-to-Path Generator. Dirk &lt;a href=&quot;https://twitter.com/#!/DirkWeber&quot; title=&quot;Dirk Weber bei Twitter&quot;&gt;twittert&lt;/a&gt; zudem aktiv über seine Projekte. &lt;br class=&quot;u-clear&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Welche Möglichkeiten sich daraus ergeben, wird in der &lt;a href=&quot;https://www.eleqtriq.com/wp-content/static/demos/2011/fontastiq/&quot; title=&quot;Canvas CSS3 Demo&quot;&gt;Canvas-Demo&lt;/a&gt; deutlich.&lt;/p&gt;
&lt;iframe class=&quot;u-embed u-embed--950&quot; title=&quot;Fontastiq-Demo&quot; src=&quot;https://www.eleqtriq.com/wp-content/static/demos/2011/fontastiq/&quot; allowfullscreen&gt;&lt;/iframe&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 Adventskalender 2011 – Tag 20</title>
    <link href="https://maddesigns.de/archiv/css3-adventskalender-2011-%E2%80%93-tag-20-1588.html" />
    <updated>2011-12-20T07:00:59Z</updated>
    <id>https://maddesigns.de/archiv/css3-adventskalender-2011-%E2%80%93-tag-20-1588.html</id>
    <content type="html">&lt;p&gt;…im Webstandard Blog zum Thema “&lt;a href=&quot;https://webstandard.kulando.de/post/2011/12/19/css3-count-html-elemente-nummerierentag-20-im-css3-adventskalender-2011&quot;&gt;CSS3 Count – HTML Elemente nummerieren&lt;/a&gt;“&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>CSS-Filter – mehr Effekte fürs Web – CSS3 Adventskalender Tag 19</title>
    <link href="https://maddesigns.de/archiv/css3-filter-1525.html" />
    <updated>2011-12-19T07:00:27Z</updated>
    <id>https://maddesigns.de/archiv/css3-filter-1525.html</id>
    <content type="html">&lt;p&gt;Nachdem CSS 2.1 uns Ende der 90er einigermaßen solide Werkzeuge zum Layouten von Seiten ohne Tabellen an die Hand gegeben hat, ging es bei CSS3 zunächst viel darum, uns mit mehr dekorativen Gestaltungsmöglichkeiten auszustatten. Heute haben wir endlich einbettbare Schriftarten, runde Ecken, Farbverläufe, semitransparente Elemente und Farbwerte, Box- und Textschatten usw. Soweit, so gut.&lt;/p&gt;
&lt;p&gt;Der Blick in Richtung Photoshop und dessen Featureset offenbart jedoch immer noch Lücken. In Photoshop haben wir zum Beispiel die Möglichkeit, Bereiche zu entsättigen oder zu schärfen und weichzuzeichnen. Wofür könnten wir diese Effekte brauchen? Nun, ein Entsättigen oder ein Weichzeichnen bestimmter Areale einer Seite hilft dem Benutzer, sich auf unangetastete Bereicher besser zu fokussieren.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/pyVblk8n49-550.avif&quot; sizes=&quot;(min-width: 48em) 550px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/pyVblk8n49-550.webp&quot; sizes=&quot;(min-width: 48em) 550px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/pyVblk8n49-550.png&quot; alt=&quot;Hoverbox Image Gallery&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;550&quot; height=&quot;267&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Ein unscharf maskieren, was ein unglücklicher Name für eigentlich eine Nachschärfungsmethode ist, könnte man im Browser kleinskalierte, und damit einhergehend detailarm gewordene Bilder wieder knackiger machen.&lt;/p&gt;
&lt;p&gt;Schön wäre, wenn wir diese Effekte genauso auftragen könnten, wie wir mit &lt;code&gt;opacity&lt;/code&gt; ganze Areale transparenter machen.&lt;/p&gt;
&lt;p&gt;Für einen Entsättigungseffekt müssten wir stattdessen aufwändig per JavaScript durch die Farbwerte aller betroffenen Elemente zirkeln, und diese durch ihre entfärbte Pendants ersetzen. Leider scheitert dieser Ansatz spätestens in dem Moment, wo wir auf usergeneriertes Bild- oder Videomaterial treffen. Hier könnten wir zu &lt;a href=&quot;https://spyrestudios.com/html5-canvas-image-effects-black-white/&quot;&gt;HTML5 Canvas wechseln, das es uns erlaubt, jeden Pixelwert einzeln zu manipulieren&lt;/a&gt;. Dabei helfen uns zwar bestimmte Canvas-Effektbibliotheken wie &lt;a href=&quot;https://camanjs.com/examples&quot;&gt;CamanJS&lt;/a&gt; oder &lt;a href=&quot;https://www.iliasiovis.com/hoverizr/&quot;&gt;Hoverizr&lt;/a&gt;, aber die Umsetzung bleibt anstrengend.&lt;/p&gt;
&lt;p&gt;Einen Unschärfeeffekt können wir bislang ebenfalls nur tricksen, indem wir Texte mit &lt;a href=&quot;https://webstandard.kulando.de/post/2011/12/09/css3-text-shadow-erzeugt-blur-effekt-tag-10-im-css3-adventskalender-2011&quot;&gt;einem text-shadow gleicher Farbe versehen&lt;/a&gt; und bei &lt;a href=&quot;https://tympanus.net/codrops/2011/12/14/item-blur-effect-with-css3-and-jquery/&quot;&gt;einfarbigen Boxen einen box-shadow zum Einsatz bringen&lt;/a&gt;. Wieder müssten wir für Bilder oder Videos auf Canvas ausweichen.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://tympanus.net/codrops/2011/12/14/item-blur-effect-with-css3-and-jquery/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/h_hpngN_9R-551.avif&quot; sizes=&quot;(min-width: 48em) 551px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/h_hpngN_9R-551.webp&quot; sizes=&quot;(min-width: 48em) 551px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/h_hpngN_9R-551.png&quot; alt=&quot;Item Blur Effect with CSS3 and jQuery&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;551&quot; height=&quot;443&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Einen ziemlich brutalen Ansatz fährt das Framework &lt;a href=&quot;https://github.com/pmura/blurry.js&quot;&gt;blurry.js&lt;/a&gt;, das nämlich weichzuzeichnende Bereiche inklusive Text via Cufón nach Canvas überführt und sie dort im Ganzen weichzeichnet.&lt;/p&gt;
&lt;p&gt;Unscharf Maskieren, also nachschärfen, können wir hingegen gar nicht mit CSS umsetzen. Hier würde der Weg einzig und allein über Canvas führen.&lt;/p&gt;
&lt;h3 id=&quot;filter-uber-svg&quot;&gt;Filter über SVG&lt;a class=&quot;header-anchor&quot; href=&quot;#filter-uber-svg&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;SVG kennt eine riesige Palette an &lt;a href=&quot;https://electricbeach.org/?p=950&quot;&gt;Filtern&lt;/a&gt;, so etwa Überblenden, Farbüberlagerungen, Helligkeits- und Kontrastanpassungen, Beleuchtung und Reliefeffekte, gausssche und bewegte Unschärfe, Wolken und Rauschen, et cetera pépé.&lt;/p&gt;
&lt;p&gt;Wir haben mit SVG einerseits die Möglichkeit, anstatt unseren Texte und Bilder in HTML einzubetten, &lt;a href=&quot;https://dev.opera.com/articles/view/how-to-do-photoshop-like-effects-in-svg/&quot;&gt;diese in ein SVG zu packen, innerhalb dessen wir dann Filter auftragen können&lt;/a&gt;. Es dürfte Markup-technisch jedoch ungewohntes Terrain sein, Texte mit folgender Syntax einbauen zu müssen:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;text id=&amp;quot;header&amp;quot; font-family=&amp;quot;Arial&amp;quot; font-weight=&amp;quot;900&amp;quot; font-size=&amp;quot;40&amp;quot; x=&amp;quot;20&amp;quot; y=&amp;quot;55%&amp;quot;&amp;gt;SVG Example&amp;lt;/text&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Cooler ist daher das ForeignObject/xlink in SVG, das es uns erlaubt, &lt;a href=&quot;https://ajaxian.com/archives/foreignobject-hey-youve-got-html-in-my-svg&quot;&gt;normale HTML-Abschnitte in das SVG einzusetzen&lt;/a&gt;, die dann via Filter umgestaltet werden können. Damit lässt sich &lt;a href=&quot;https://dev.opera.com/articles/view/applying-color-tints-to-web-pages-with-s/&quot;&gt;eine komplette HTML-Seite ins SVG einbetten und von A-Z umfärben&lt;/a&gt; oder &lt;a href=&quot;https://www.flother.com/examples/canvas-blur/v4/blur.svg&quot;&gt;ein nur einzelnes eingebettetes Bitmap-Bild weichzeichnen&lt;/a&gt;. Der Grad der Unterstüzung ist schon &lt;a href=&quot;https://caniuse.com/#feat=svg-html&quot;&gt;recht weit gediehen&lt;/a&gt;, fehlt nur noch der IE, der mit Version 10 endlich nachzieht.&lt;/p&gt;
&lt;p&gt;Firefox geht seit Version 3.5 noch einen Schritt weiter und ermöglicht es, in HTML SVG-Filter anzuwenden, die in einer externen SVG-Datei definiert sind. Zum Beispiel könnten wir in einer SVG-Datei einen &lt;code&gt;feGaussianBlur&lt;/code&gt;-Filter mit einem Weichzeichnungsradius von 2 Pixeln definieren, dem wir die id &lt;code&gt;gaussian_blur&lt;/code&gt; verpassen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;
&amp;lt;!DOCTYPE svg PUBLIC &amp;quot;-//W3C//DTD SVG 1.1//EN&amp;quot;
&amp;quot;https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&amp;quot;&amp;gt;

&amp;lt;svg width=&amp;quot;710&amp;quot; height=&amp;quot;476&amp;quot; version=&amp;quot;1.1&amp;quot;
xmlns=&amp;quot;https://www.w3.org/2000/svg&amp;quot;
xmlns:xlink=&amp;quot;https://www.w3.org/1999/xlink&amp;quot;&amp;gt;
  &amp;lt;defs&amp;gt;
    &amp;lt;filter id=&amp;quot;gaussian_blur&amp;quot;&amp;gt;
      &amp;lt;feGaussianBlur in=&amp;quot;SourceGraphic&amp;quot; stdDeviation=&amp;quot;2&amp;quot; /&amp;gt;
    &amp;lt;/filter&amp;gt;
  &amp;lt;/defs&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Den Filter mit dieser id referenzieren wir dann aus unserem normalen Stylesheet heraus:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;img {
  filter: url(blur.svg#gaussian_blur);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/dmNxAsJ2Tv-519.avif&quot; sizes=&quot;(min-width: 48em) 519px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/dmNxAsJ2Tv-519.webp&quot; sizes=&quot;(min-width: 48em) 519px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/dmNxAsJ2Tv-519.png&quot; alt=&quot;Unschärfe via CSS Filter SVG&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;519&quot; height=&quot;343&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Eine Live-Demo findet sich &lt;a href=&quot;https://maddesigns.de/img/2011/12/blur.html&quot;&gt;hier&lt;/a&gt;. Leider beschränkt sich dieses praktische Verfahren auf besagten Firefox.&lt;/p&gt;
&lt;p&gt;Allerdings: Der IE kennt ja auch Filter, die allesamt von der Windows-Grafikbibliothek DirectX abgeleitet sind. Darunter befinden sich die altbekannten Alpha- oder Gradient-Filter, mit denen wir uns in alten IEs CSS3-Features herbeitricksen. Es befinden sich aber auch ein paar darunter, mit denen sich die am häufigsten benötigten Effekte realisieren lassen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* Um 2 Pixel weichzeichnen */
filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2);
/* 13 Pixel Bewegungsunschärfe in Richtung 310° */
filter: progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310);
/* In Graustufen umwandeln */
filter: gray;
/* Röntgen-Effekt (also Graustufen invertiert) */
filter: xray;
/* Lichtkegel setzen */
filter: light();
/* Emboss */
filter: progid:DXImageTransform.Microsoft.emboss();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Eine komplette Liste gibt es &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/ms673539(v=VS.85).aspx&quot;&gt;hier&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Mit Hilfe von Conditional Comments können wir damit schon zwei Browserfamilien bedienen, die zusammen immerhin &lt;a href=&quot;https://gs.statcounter.com/#browser-DE-monthly-201112-201112-bar&quot;&gt;77% des deutschen Browsermarkts&lt;/a&gt; ausmachen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;
&amp;lt;!--[if lte IE 9]&amp;gt; &amp;lt;html class=&amp;quot;ie&amp;quot; lang=&amp;quot;de&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt; &amp;lt;html lang=&amp;quot;de&amp;quot;&amp;gt; &amp;lt;!--&amp;lt;![endif]--&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;
&amp;lt;title&amp;gt;Unschärfe via CSS-Filter SVG&amp;lt;/title&amp;gt;
&amp;lt;style&amp;gt;
img {
  filter: url(blur.svg#gaussian_blur);
}
.ie img {
  margin: -2px;
  filter: progid:DXImageTransform.Microsoft.blur(pixelradius=2);
  zoom: 1;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;img src=&amp;quot;stadt.jpg&amp;quot;
  alt=&amp;quot;Some rights reserved by zigazou76&amp;quot;
  width=&amp;quot;500&amp;quot; height=&amp;quot;333&amp;quot;&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;margin: -2px gleicht den erhöhten Platzverbrauch aus. zoom: 1 sind bei Filtern für die IE6/7 immer notwendig. Wichtig zu wissen ist, dass der IE 10 keine Filter mehr unterstützen wird :(&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/12/blur2.html&quot;&gt;Hier das erweiterte Beispiel&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Weil man nun aber erkannt hat, wie unglaublich praktisch die SVG-Filter von Firefox sind, hat sich das W3C gedacht, man müsste diesen Ansatz doch mal standardisieren, und so wurde die W3C FX Task Force gegründet, welche nun die ersten Drafts für offizielle &lt;a href=&quot;https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html&quot;&gt;W3C Filter Effekte vorgelegt hat&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Diese Filter funktionieren im Prinzip genau so, wie sie der Firefox vorexzerziert, also mit Verweis auf eine externe URL, die den Filter unter einer id bereithält. Darüberhinaus definiert man aber auch ein paar Filter-Shortcuts für die prominentesten Filter, die dann keine externe Datei benötigen. Diese Shortcut-Filter wären:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;grayscale&lt;/li&gt;
&lt;li&gt;sepia&lt;/li&gt;
&lt;li&gt;saturate&lt;/li&gt;
&lt;li&gt;hue-rotate&lt;/li&gt;
&lt;li&gt;invert&lt;/li&gt;
&lt;li&gt;opacity&lt;/li&gt;
&lt;li&gt;brightness&lt;/li&gt;
&lt;li&gt;contrast&lt;/li&gt;
&lt;li&gt;blur&lt;/li&gt;
&lt;li&gt;drop-shadow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Das Gute an den Filter-Shortcuts ist zudem, dass man per Shortcut angewendete Filter in CSS animieren kann, z.B. so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.foo {
  filter: blur(2px);
  transition: filter 1s ease-in-out;
}

.foo:hover {
  filter: blur(0);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Zu guter letzt soll auch noch eine Möglichkeit bereitgestellt werden, OpenGL/WebGL-Verformungs- und Shaderfilter zu definieren, &lt;a href=&quot;https://www.adobe.com/devnet/html5/articles/css-shaders.html&quot;&gt;die das entsprechende Element z.B. dreidimensional verformen&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.adobe.com/devnet/html5/articles/css-shaders.html&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/xhGzS3MDsJ-550.avif&quot; sizes=&quot;(min-width: 48em) 550px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/xhGzS3MDsJ-550.webp&quot; sizes=&quot;(min-width: 48em) 550px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/xhGzS3MDsJ-550.png&quot; alt=&quot;CSS shaders Cinematic effects for the web&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;550&quot; height=&quot;304&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Praktischerweise sind vergangene Woche endlich erste Umsetzungen dieser Filter in der WebKit-Engine gelandet und nehmen nun den Weg über die &lt;a href=&quot;https://nightly.webkit.org/&quot;&gt;WebKit-Nightlies&lt;/a&gt; (im OSX-Nightly läuft es schon) über &lt;a href=&quot;https://tools.google.com/dlpage/chromesxs&quot;&gt;Chrome Canary&lt;/a&gt;, dann über die &lt;a href=&quot;https://www.google.com/landing/chrome/beta/&quot;&gt;Chrome Beta&lt;/a&gt;, um schließlich in 3 Monaten im stabilen Allerwelts-Chrome zu landen. Und irgendwann sicherlich auch im Safari. Und damit wären die wichtigsten Filter in 90% – 95% aller Browserversionen am Markt verfügbar.&lt;/p&gt;
&lt;p&gt;Für WebKit fügen wir für unser Beispiel also einfach ein &lt;code&gt;-webkit-filter: blur(2px);&lt;/code&gt; zusätzlich ein, und machen es in dem Zug noch ein wenig interaktiv und zumindest im WebKit animiert:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;
&amp;lt;!--[if lte IE 9]&amp;gt; &amp;lt;html class=&amp;quot;ie&amp;quot; lang=&amp;quot;de&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt; &amp;lt;html lang=&amp;quot;de&amp;quot;&amp;gt; &amp;lt;!--&amp;lt;![endif]--&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;
&amp;lt;title&amp;gt;Unschärfe via CSS-Filter SVG&amp;lt;/title&amp;gt;
&amp;lt;style&amp;gt;
img {
  filter: url(blur.svg#gaussian_blur);
  -webkit-filter: blur(2px);
  -webkit-transition: -webkit-filter 1s ease-in-out;
}
img:hover {
  filter: none;
  -webkit-filter: blur(0);
}
.ie img {
  margin: -2px;
  filter: progid:DXImageTransform.Microsoft.blur(pixelradius=2);
  zoom: 1;
}
.ie img:hover {
  margin: 0;
  filter: none;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;img src=&amp;quot;stadt.jpg&amp;quot;
  alt=&amp;quot;Some rights reserved by zigazou76&amp;quot;
  width=&amp;quot;500&amp;quot; height=&amp;quot;333&amp;quot;&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das finale Beispiel gibt es &lt;a href=&quot;https://maddesigns.de/img/2011/12/blur3.html&quot;&gt;hier&lt;/a&gt; online zu sehen. &lt;del&gt;&lt;a href=&quot;https://4moneymaker.net&quot;&gt;give me money&lt;/a&gt;&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;Eine erste Demo-Spielerei, die nicht nur CSS Filter verwendet, sondern auch CSS 3D Tranforms gibt es übrigens ganz frisch bei &lt;a href=&quot;https://lab.simurai.com/css/stars/&quot;&gt;Simurai zu bewundern&lt;/a&gt;. Viel Spaß mit den CSS Filtern!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Im aktuellen Chrome Canary sind die CSS Filter nun auch angelandet, sowohl unter Mac, als auch unter Windows.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/TYYKgJ5fym-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/TYYKgJ5fym-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/TYYKgJ5fym-150.png&quot; alt=&quot;Christian Schepp Schaefer&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;150&quot;&gt;&lt;/picture&gt;Christian ”Schepp” Schaefer ist freiberuflicher Webentwickler aus Düsseldorf. Er ist Autor der Ladezeitenbeschleuniger-Bibliothek &lt;a href=&quot;https://github.com/Schepp/CSS-JS-Booster&quot;&gt;CSS-JS-Booster&lt;/a&gt; sowie Moderator des wöchentlich erscheinenden &lt;a href=&quot;https://workingdraft.de&quot;&gt;Working Draft Podcasts&lt;/a&gt; and er verfolgt Eure Tweets mit seinem Account &lt;a href=&quot;https://twitter.com/derSchepp&quot;&gt;derSchepp&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
</content>
  </entry>
  <entry>
    <title>Compass &amp; SASS – CSS3 Adventskalender Tag 17</title>
    <link href="https://maddesigns.de/archiv/compass-sass-1472.html" />
    <updated>2011-12-17T09:34:01Z</updated>
    <id>https://maddesigns.de/archiv/compass-sass-1472.html</id>
    <content type="html">&lt;p&gt;Natürlich beschäftigt sich der diesjährige CSS3 Adventskalender auch mit dem Thema SASS &amp;amp; Compass. Was SASS &amp;amp; Compass so effizient macht beim Schreiben von CSS hat &lt;a href=&quot;https://molily.de/&quot;&gt;Mathias Schäfer&lt;/a&gt; (&lt;a href=&quot;https://twitter.com/#!/molily&quot; title=&quot;Mathias Schäfer auf Twitter&quot;&gt;molily&lt;/a&gt;) bereits sehr umfassend im &lt;a href=&quot;https://www.webkrauts.de/category/adventskalender/adventskalender-2011/&quot; title=&quot;Webkrauts Adventskalender 2011&quot;&gt;Webkrauts-Adventskalender&lt;/a&gt;-Artikel „Effiziente CSS-Entwicklung mit Sass und Compass“ (&lt;a href=&quot;https://www.webkrauts.de/2011/12/04/sass-compas/&quot;&gt;Teil 1&lt;/a&gt;, &lt;a href=&quot;https://www.webkrauts.de/2011/12/05/sass-compass2/&quot;&gt;Teil 2&lt;/a&gt;) gezeigt.&lt;/p&gt;
&lt;p&gt;Neue Techniken bringen natürlicherweise auch viel &lt;a href=&quot;https://plus.google.com/111291152590065605567/posts/LKpTjT7DcDu&quot;&gt;Diskussion&lt;/a&gt; mit sich. Und nur weil man einen Pre-Processor wie SASS verwendet, schreibt man nicht automatisch &lt;a href=&quot;https://blog.millermedeiros.com/2011/11/the-problem-with-css-pre-processors/&quot; title=&quot;The problem with CSS pre-processors&quot;&gt;&lt;em&gt;besseres&lt;/em&gt; CSS&lt;/a&gt;. Es muss schon ein gewisses Verständnis von CSS vorhanden sein, damit &lt;a href=&quot;https://sass-lang.com/&quot;&gt;SASS&lt;/a&gt;, &lt;a href=&quot;https://lesscss.org/&quot;&gt;LESS&lt;/a&gt;, &lt;a href=&quot;https://learnboost.github.com/stylus/&quot;&gt;Stylus&lt;/a&gt;, &lt;a href=&quot;https://code.google.com/p/closure-stylesheets/&quot;&gt;Closure&lt;/a&gt; und MyNewCssPreProcessor™ auch effizient eingesetzt werden kann.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;leichter-einstieg&quot;&gt;Leichter Einstieg&lt;a class=&quot;header-anchor&quot; href=&quot;#leichter-einstieg&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Durch die neue Schreibweise SCSS (“Sassy CSS”) wurde zudem der Einstieg in SASS erleichtert. Das hilft Einsteigern mit bestehenden Code die ersten Features von SASS auszuprobieren und so schnellere Erfolge zu erzielen.&lt;/p&gt;
&lt;p&gt;Bestehendes CSS in SCSS konvertieren (geht auch zu SASS und auch von SASS zu SCSS,…)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Convert CSS to SCSS
$ sass-convert style.css style.scss
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das wird über das jeweilige Kommandozeilen-Tool gemacht, gibt es aber auch &lt;a href=&quot;https://css2sass.heroku.com/&quot; title=&quot;Convert CSS to SASS&quot;&gt;online&lt;/a&gt;. Zur Installation von &lt;a href=&quot;https://sass-lang.com/tutorial.html&quot;&gt;SASS&lt;/a&gt; und &lt;a href=&quot;https://compass-style.org/install/&quot;&gt;Compass&lt;/a&gt; gibt es auch zahlreiche Anleitungen im Netz, auch für &lt;a href=&quot;https://rubyinstaller.org/&quot;&gt;Windows&lt;/a&gt; oder als &lt;a href=&quot;https://compass.handlino.com/&quot;&gt;App&lt;/a&gt;. Das sollte also kein Problem darstellen.&lt;/p&gt;
&lt;p&gt;Einige nützliche Beispiele habe ich im Folgenden mal zusammen getragen. Aktuell starte ich meine Projekte mit dem Starter-Kit von &lt;a href=&quot;https://www.xtine.net/&quot;&gt;xtine&lt;/a&gt;, das die HTML5 Boilerplate, Compass, SASS und normalize.css schon mitbringt (&lt;a href=&quot;https://github.com/xtine/compass-sass-html5boilerplate&quot;&gt;compass-sass-html5boilerplate&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Schön finde ich die Import-Funktion von SASS, so lassen sich gesplitete CSS (SASS)-Dateien zu einer zusammenfüren.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@import &amp;quot;modules/base&amp;quot;;
@import &amp;quot;partials/header&amp;quot;, &amp;quot;partials/footer&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dabei werden Dateien, die mit Unterstrich beginnen direkt ins fertige CSS kompiliert, z.B. &lt;strong&gt;_base.scss&lt;/strong&gt;, wo hingegen Dateien ohne Unterstrich, z.B. &lt;strong&gt;base.scss&lt;/strong&gt; zusätzlich als separate CSS-Datei (z.B. &lt;code&gt;base.css&lt;/code&gt;) durch den Watch-Prozess angelegt werden.&lt;/p&gt;
&lt;p&gt;Partials können auch in Anweisungen importiert werden:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@media only screen and (min-width: 320px) {
  @import &amp;quot;partials/up320&amp;quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;elternselektor&quot;&gt;Elternselektor&lt;a class=&quot;header-anchor&quot; href=&quot;#elternselektor&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die Selektierung von Elternelementen ist für mich ebenfalls unschlagbar&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;article h1 {
  font-size: 2em;

  .index &amp;amp; {
    font-size: 1.6em;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;wird zu:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;article h1 {
  font-size: 2em;
}
.index article h1 {
  font-size: 1.6em;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So kann direkt in der Anweisung eine andere Schriftgröße für H1 auf der Startseite vergeben werden&lt;/p&gt;
&lt;h3 id=&quot;compass-multifunktions-tool&quot;&gt;Compass – Multifunktions-Tool&lt;a class=&quot;header-anchor&quot; href=&quot;#compass-multifunktions-tool&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;figure id=&quot;attachment_1483&quot; class=&quot;wp-caption alignnone&quot;&gt;&lt;a href=&quot;https://sonspring.com/journal/sass-for-designers&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/uGtqLjiRJC-500.avif&quot; sizes=&quot;(min-width: 48em) 500px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/uGtqLjiRJC-500.webp&quot; sizes=&quot;(min-width: 48em) 500px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/uGtqLjiRJC-500.png&quot; alt=&quot;css_sass_compass&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;500&quot; height=&quot;360&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;figcaption class=&quot;wp-caption-text&quot;&gt;Bild von &lt;a href=&quot;https://sonspring.com/journal/sass-for-designers&quot;&gt;https://sonspring.com/journal/sass-for-designers&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Meiner Meinung nach macht SASS erst mit dem CSS-Framwork &lt;a href=&quot;https://compass-style.org/&quot; title=&quot;Framework for SASS&quot;&gt;Compass&lt;/a&gt; richtig Sinn. Compass bringt eine Vielzahl von Funktionen und Mixins mit, die das Schreiben von CSS erleichtern. Das o.a. Bild zeigt es meiner Meinung nach sehr treffend. Gerade im CSS3-Bereich spielt Compass seine Stärken aus, hier ist ein großes Set an &lt;a href=&quot;https://compass-style.org/reference/compass/css3/&quot;&gt;CSS3-Mixins&lt;/a&gt; bereits enthalten und werden &lt;a href=&quot;https://github.com/chriseppstein/compass/commits/stable&quot;&gt;ständig nachgepflegt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Ein dickes Feature ist sicherlich das Generieren von Sprites-Grafiken (&lt;a href=&quot;https://webstandard.kulando.de/post/2010/05/26/css-sprite-ladegeschwindigkeit-optimieren-http-requests-verringern&quot; title=&quot;ladegeschwindigkeit optimieren http-requests verringern&quot;&gt;warum Sprites?&lt;/a&gt;), dazu gibt es ein umfangriches &lt;a href=&quot;https://compass-style.org/help/tutorials/spriting/&quot; title=&quot;Sprites with SASS &amp;amp; Compass&quot;&gt;Tutorial auf der Compass-Website&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;css3-mixins&quot;&gt;CSS3 Mixins&lt;a class=&quot;header-anchor&quot; href=&quot;#css3-mixins&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Linear-Gradients sind nach wie vor mühsehlig, für alle Browser müssen Anweisungen mit Vendor-Prefixe geschrieben werden, aktuell sieht ein simpler &lt;a href=&quot;https://maddesigns.de/css3-responsive/template/#31&quot; title=&quot;cross-browser linear-gradient&quot;&gt;cross-browser Linear-Gradient&lt;/a&gt; so aus:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.gradient {

  background-color: yellow; /* Fallback Color */
  background: -webkit-gradient(linear,left top,left bottom,from(yellow),to(blue));
  background: -webkit-linear-gradient(top, yellow 0%, blue 100%);
  background:    -moz-linear-gradient(top, yellow 0%, blue 100%);
  background:     -ms-linear-gradient(top, yellow 0%, blue 100%);
  background:      -o-linear-gradient(top, yellow 0%, blue 100%);

  /* aktueller W3C Standard, bisher nicht implementiert */
  background:         linear-gradient(to bottom, yellow 0%, blue 100%);

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;mit Compass sieht die Anweisung so aus:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.gradient {
  @include background(linear-gradient(top, yellow, blue));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  zusätzlich könnte man noch SVG-Support für IE9 und ältere Opera über $experimental-support-for-svg: true; aktivieren, sowie die älteren Internet Explorer (IE6-IE8) mit Filtern ausstatten:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.gradient {
	$experimental-support-for-svg: true;
	@include background(linear-gradient(top, yellow, blue));

	// for older IEs
	.oldie &amp;amp; {
		background-color: yellow;
		@include filter-gradient(yellow, blue, vertical);
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  das wird dann wie folgt kompiliert
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.gradient {
  background: url(&#39;data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0i.....&#39;);
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffff00), color-stop(100%, #0000ff));
  background: -webkit-linear-gradient(top, #ffff00, #0000ff);
  background: -moz-linear-gradient(top, #ffff00, #0000ff);
  background: -o-linear-gradient(top, #ffff00, #0000ff);
  background: -ms-linear-gradient(top, #ffff00, #0000ff);
  background: linear-gradient(top, #ffff00, #0000ff);
}
.oldie .gradient{
  background-color: yellow;
  *zoom: 1;
  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr=&#39;#FFFFFF00&#39;, endColorstr=&#39;#FF0000FF&#39;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Globale Variablen wie `$experimental-support-for-svg` werden für das gesammte Compass-Projekt gesetzt (wie der Name schon sagt). Wenn man im nächsten Gradient keinen SVG-Support wünscht, müsste man `$experimental-support-for-svg` in der Anweisung wieder auf `false` setzen. `$experimental-support-for-khtml: false;` kann eigentlich als Default in `_base.scss` gesetzt werden. Man kann auch den Support von IE6 oder IE7 deaktivieren, wenn das für das Projekt nicht nötig ist:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;// _base.scss
$experimental-support-for-khtml: false;
$legacy-support-for-ie6: false;
$legacy-support-for-ie7: false;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Aber nicht alle CSS3-Mixins sind zu empfehlen, border-radius ist überfrachtet und kann mittlerweile auch &lt;a href=&quot;https://maddesigns.de/css3-responsive/template/#9&quot; title=&quot;border-radius ohne Vendor-Präfix&quot;&gt;ohne Vendor-Präfix&lt;/a&gt; eingesetzt werden.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;.box {
  @include border-radius();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  wird zu
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.box {
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  -o-border-radius: 5px;
  -ms-border-radius: 5px;
  -khtml-border-radius: 5px;
  border-radius: 5px;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Hier ist einiges zu viel und zudem falsch (-ms-border-radius). Hier reicht also einfach:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.box {
  border-radius: 5px;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Nützlich ist auch das Mixins für Links. Wenn man Links mit alle dynamischen Pseudoklassen stylt, sieht das mit SASS so aus:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$color-main: #0089B3;
a {
	text-decoration: none;
	color: $color-main;
	&amp;amp;:hover {
		text-decoration: underline;
		color: darken($color-main, 10%);
	}
	&amp;amp;:focus {
		color: darken($color-main, 10%);
	}
	&amp;amp;:active {
		color: invert($color-main);
	}
	&amp;amp;:visited {
		color: darken($color-main, 30%);
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  In Compass kann man daraus einen Zweizeiler machen:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;a {
  @include hover-link;
  @include link-colors(
    $color-main,
    darken($color-main, 10%),
    invert($color-main),
    darken($color-main, 30%),
    darken($color-main, 10%)
  );
  // hier zur Übersichtlichkeit mehrzeilig
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  wird zu
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;a { text-decoration: none; color: #0089b3; }
a:hover { text-decoration: underline; }
a:visited { color: #00141a; }
a:focus { color: #006280; }
a:hover { color: #006280; }
a:active { color: #ff764c; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Ja, Compass fasst `:hover` und `:focus` nicht zusammen, aber das kann man sicherlich verschmerzen &amp;#8211; genau solche Beispiel sind es die Kritiker dann auf den Plan bringen&amp;#8230;
&lt;/p&gt;
&lt;p&gt;
  &lt;/p&gt;&lt;figure id=&quot;attachment_1497&quot; class=&quot;wp-caption alignnone&quot;&gt;&lt;a href=&quot;https://sonspring.com/journal/sass-for-designers&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/2011/12/clint_eastwood_css.jpg&quot; alt=&quot;Clint Eastwood CSS&quot; width=&quot;500&quot; height=&quot;380&quot; class=&quot;size-full wp-image-1497&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;wp-caption-text&quot;&gt;Bild: https://sonspring.com/journal/sass-for-designers&lt;/figcaption&gt;&lt;/figure&gt;&lt;br&gt;
  Gerne bin ich bereit über Sinn und Unsinn in den Kommentaren zu diskutieren.
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;
  If-Bedingungen in CSS
&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;$main-bg: #333;
.main {
  color: if($main-bg == #333, #fff, #000);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Jeder der ein wenig Programmierkenntnisse hat, wird das zu schätzen wissen. Wenn die Hintergrundfarbe #333 (dunkles grau) ist, dann ist die Textfarbe #fff (weiß), sonst #000 (schwarz). Klasse, oder?
&lt;/p&gt;
&lt;p&gt;
  Oder die Möglichekeit Überschriften in anderen Bereichen der Website, anders zu formatieren:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;aside {
  #{headings(2,4)} {
    text-transform: uppercase;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  wird kompiliert zu
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;aside h2, aside h3, aside h4 {
  text-transform: uppercase;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Die Compass Image-Funktionen sind auch ganz toll:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;header {
  background: image-url(&amp;quot;header-bg.png&amp;quot;);
  h1 {
    height: image-height(&amp;quot;logo.png&amp;quot;);
    width: image-width(&amp;quot;logo.png&amp;quot;);
    background: transparent inline-image(&amp;quot;logo.png&amp;quot;) no-repeat;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  So kann man mit `image-height()` und `image-width()` die Höhe und Breite des Logos automatisch einfügen, falls sich das Logo ändert, ändern sich auch automatisch die Höhe und Breite. Zudem kann man das Logo als `inline-image()` einfügen. Das Beispiel wird dann folgendermaßen kompiliert:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;header {
  background: url(&#39;../img/header-bg.png&#39;);
}
header h1 {
  height: 185px;
  width: 140px;
  background: transparent url(&#39;data:image/png;base64,/9j/4AAQSkZJRgABAgAAZABkAAD....&#39;) no-repeat;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
  Plugins
&lt;/h3&gt;
&lt;p&gt;
  Für Compass gibt es mittlerweile eine große Anzahl an &lt;a href=&quot;https://github.com/chriseppstein/compass/wiki/Compass-Plugins&quot; title=&quot;Compass Plugins&quot;&gt;Plugins&lt;/a&gt;, die das Framework erweitern. Eines hab ich total lieb gewonnen: &lt;a href=&quot;https://www.aaronrussell.co.uk/&quot;&gt;Aaron Russell&lt;/a&gt;&amp;#8217;s Plugin für den &lt;a href=&quot;https://github.com/aaronrussell/compass-rgbapng&quot;&gt;RGBA PNG Support&lt;/a&gt; &amp;#8211; das erstellt für ältere Browser (IE6-IE8) transparente PNGs anhand der zugewiesenen RGBA-Farbe. Man installiert sich das Plugin und bindet es in das Compass config.rb File ein.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;// require in config.rb
require &amp;quot;rgbapng&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Dann importiert man das Mixin in das SCSS und weist es wie folgt zu:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-scss&quot;&gt;@import &amp;quot;rgbapng&amp;quot;;
footer {
  @include rgba-background(rgba(#fff,0.25));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Das Plugin RGBAPNG legt dann eine Grafik im img-Folder an. Das generierte CSS:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;footer {
  background: url(&#39;../img/rgbapng/ffffff40.png?1324100912&#39;);
  background: rgba(255, 255, 255, 0.25);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Wenn man den Alpha-Wert ändert, wird eine neue Grafik erstellt. Praktisch, oder?
&lt;/p&gt;
&lt;h3&gt;
  Fazit
&lt;/h3&gt;
&lt;p&gt;
  Für mich ist SASS &amp;#038; Compass eine Arbeitserleichterung geworden. Zudem werden einige Konzepte von SASS in die zukünftige CSS4 einfließen, wie Tab Artkins auf der diesjährigen Fronteers Konferenz in Amsterdam erwähnte (&lt;a href=&quot;https://vimeo.com/32135328&quot;&gt;Video&lt;/a&gt;).&lt;br&gt;
  Ich hoffe ich konnte ein paar nützliche Beispiele für den Einsatz von Compass mit SASS liefern. Welche Erfahrungen habt ihr mit SASS &amp;#038; Compass gemacht? Habt ihr nützliche Mixins, verlinkt die in den Kommentaren. Werdet Ihr jetzt CSS-Preprozessoren verwenden?
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>IE9 CSS3 Support – CSS3 Adventskalender Tag 15</title>
    <link href="https://maddesigns.de/archiv/ie9-css3-support-1445.html" />
    <updated>2011-12-15T08:10:23Z</updated>
    <id>https://maddesigns.de/archiv/ie9-css3-support-1445.html</id>
    <content type="html">&lt;p&gt;Heute mal ein Thema im CSS3 Adventskalender, das ja ab-und-zu etwas vernachlässigt wird, „IE9 CSS3 Support“ oder „was kann der IE9 überhaupt?“. Der Browser-Marktanteil des IE9 ist glücklicherweise steigend und wird mehr und mehr in Firmen und in Privathaushalten eingesetzt. Die &lt;a href=&quot;https://gs.statcounter.com/#browser_version-eu-monthly-201101-201112&quot; title=&quot;Browser Statistik Europa&quot;&gt;Statistik&lt;/a&gt; zeigt, das in Europa aktuell ca. 10% mit IE9, ca. 16% mit IE8 und nur knapp 3% den IE7 verwenden. Dass der IE9 nicht so fortschrittlich ist, wie seine Konkurrenten, ist sicherlich auch hinlänglich bekannt. Mit der Einführung des neuen Betriebssystem „Mango“ für Windows Phone 7 ist nun auch der IE9 auf den Windows Phone 7 als Standard-Browser vorhanden und kann hier die neuen Features rund um HTML5 und CSS3 verarbeiten. Der Marktanteil ist sicherlich noch sehr gering, wird aber &lt;a href=&quot;https://blog.e-net.info/2011/windows-phone-vor-android-291.html&quot;&gt;sicherlich steigen&lt;/a&gt; in den nächsten Jahren. Und wer behauptet, dass das Windows Phone 7 noch keine Relevanz hat, optimiert sicherlich noch für IE6 (#bewusstprovokantethese).&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;ubersicht-css3-features-ie9&quot;&gt;Übersicht – CSS3-Features IE9&lt;a class=&quot;header-anchor&quot; href=&quot;#ubersicht-css3-features-ie9&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Nun aber Butter bei die Fische, was geht mit dem Internet Explorer 9 und was nicht.&lt;/p&gt;
&lt;table class=&quot;ie9table&quot;&gt;
&lt;thead&gt;
  &lt;tr&gt;
    &lt;th scope=&quot;col&quot;&gt;
      CSS3 Eigenschaft
    &lt;/th&gt;
    &lt;th scope=&quot;col&quot;&gt;
      IE9 Support
    &lt;/th&gt;
  &lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
  &lt;tr&gt;
    &lt;td&gt;
      opacity
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      multiple backgrounds
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      background-clip
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      background-size
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      background-origin
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      border-radius
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      box-shadow
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      box-sizing
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      transform
    &lt;/td&gt;
    &lt;td&gt;
      ja (mit -ms-Präfix)
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      RGBA colors
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      HSL colors
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      HSLA colors
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      @font-face
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      @media
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      CSS3 Selektoren
    &lt;/td&gt;
    &lt;td&gt;
      ja
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class=&quot;ie9table&quot;&gt;
&lt;thead&gt;
  &lt;tr&gt;
    &lt;th scope=&quot;col&quot;&gt;
      CSS3 Eigenschaft
    &lt;/th&gt;
    &lt;th scope=&quot;col&quot;&gt;
      IE9 Support
    &lt;/th&gt;
  &lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
  &lt;tr&gt;
    &lt;td&gt;
      border-image
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      text-shadow
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      gradients
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      transitions
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      animations
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      multiple columns
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      resize
    &lt;/td&gt;
    &lt;td&gt;
      nein
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&quot;darfs-ein-wenig-mehr-sein&quot;&gt;Darfs ein wenig mehr sein?&lt;a class=&quot;header-anchor&quot; href=&quot;#darfs-ein-wenig-mehr-sein&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ja gern, aber erst im IE10… Aber der IE9 unterstützt Größenangaben wie &lt;code&gt;rem&lt;/code&gt; und &lt;code&gt;vh&lt;/code&gt;, sowie &lt;code&gt;vw&lt;/code&gt; (Blogartikel von &lt;a href=&quot;https://snook.ca/archives/html_and_css/vm-vh-units&quot;&gt;Jonathan Snook&lt;/a&gt;). Allerdings sind die aufgeführten Eigenschaften (bis auf &lt;code&gt;-ms-transform&lt;/code&gt;) ohne Präfix integriert, also standardkonform. Über das &lt;a href=&quot;https://blogs.msdn.com/b/ie/archive/2010/03/19/the-css-corner-about-css-corners.aspx&quot; title=&quot;IE9 border-radius rendering&quot;&gt;Rendering von border-radius&lt;/a&gt; wurde sich zudem ausführlich Gedanken gemacht und ist sehr gelungen meiner Meinung nach.&lt;/p&gt;
&lt;p&gt;Eine Eigenschaft, die der IE9 unterstützt, aber auch noch nicht so häufig verwendet wurde, sind multiple Hintergrundbilder (background-image).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.box {
  background: url(images/background-1.png) no-repeat 50% 0,
              url(images/background-2.png) no-repeat 100% 100%;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Man sollte allerdings vorsichtig sein, wenn man für ältere Internet Explorer die filter-Eigenschaft verwendet, es kann dann zu Problemen führen. Ein Beispiel im Zusammenhang mit border-radius und linear-gradient habe ich &lt;a href=&quot;https://maddesigns.de/archiv/ie9-mit-css3-border-radius-und-linear-gradient-problemen-813.html&quot; title=&quot;IE9 mit CSS3 border-radius und linear-gradient Problemen&quot;&gt;hier&lt;/a&gt; beschrieben.&lt;/p&gt;
&lt;h3 id=&quot;link-tipps&quot;&gt;Link-Tipps&lt;a class=&quot;header-anchor&quot; href=&quot;#link-tipps&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.technet.com/b/sieben/archive/2010/09/15/was-entwickler-ueber-internet-explorer-9-wissen-sollten.aspx&quot;&gt;Was Entwickler über Internet Explorer 9 wissen sollten&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Referenz: &lt;a href=&quot;https://www.impressivewebs.com/css3-support-ie9/&quot; title=&quot;IE9 CSS3 Support&quot;&gt;CSS3 Support in Internet Explorer 9&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/ie/ff468705.aspx&quot; title=&quot;IE9 Developer Guide&quot;&gt;Internet Explorer 9 Guide for Developers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/ie/gg593671&quot; title=&quot;IE9 CSS3&quot;&gt;Internet Explorer Learning &amp;gt; CSS3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://nicolasgallagher.com/mobile-first-css-sass-and-ie/&quot; title=&quot;mobile first with SASS &quot;&gt;“Mobile first” CSS and getting Sass to help with legacy IE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://css3wizardry.com/2010/10/29/css-gradients-for-ie9/&quot;&gt;Attention! IE9 will not destroy the world, kill babies, or take away your home or job.&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;fazit&quot;&gt;Fazit&lt;a class=&quot;header-anchor&quot; href=&quot;#fazit&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Der Internet Explorer 9 unterstützt mehr CSS3-Eigenschaften als erwartet, allerdings sicherlich weniger als erhofft. Und mit der Version 10 werden weitere CSS3-Eigenschaften unterstützt, bleibt nur zu hoffen, dass die älteren Versionen bald verschwinden. Als kleine Gute Tat, könnt ihr in den Weihnachtsfeiertagen die Browser eurer Verwandten updaten (wenn ihr das nicht schon getan habt).&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Individuelle Checkbox &amp; Radio Inputs – CSS3 Adventskalender Tag 13</title>
    <link href="https://maddesigns.de/archiv/individuelle-checkbox-radio-inputs-1396.html" />
    <updated>2011-12-13T08:00:57Z</updated>
    <id>https://maddesigns.de/archiv/individuelle-checkbox-radio-inputs-1396.html</id>
    <content type="html">&lt;h2 id=&quot;css-checkbox-update-2016&quot;&gt;CSS Checkbox Update 2016&lt;a class=&quot;header-anchor&quot; href=&quot;#css-checkbox-update-2016&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Da der Artikel nun 5 Jahre alt ist und sich CSS &amp;amp; Design weiterentwickelt haben, hab ich mal ein Update gemalt. Custom Radio-Button und Checkboxen mit pure™ CSS, barrierefrei &amp;amp; überhaupt:&lt;/p&gt;
&lt;p data-height=&quot;519&quot; data-theme-id=&quot;light&quot; data-slug-hash=&quot;jbiDn&quot; data-default-tab=&quot;result&quot; data-user=&quot;maddesigns&quot; data-embed-version=&quot;2&quot; class=&quot;codepen&quot;&gt;
  See the Pen &lt;a href=&quot;https://codepen.io/maddesigns/pen/jbiDn/&quot;&gt;CSS3 Custom Checkbox, Radio Input and Select&lt;/a&gt; by Sven Wolfermann (&lt;a href=&quot;https://codepen.io/maddesigns&quot;&gt;@maddesigns&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.
&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;strong&gt;Ab hier folgt der alte Artikel von 2011.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Um es vorweg zu nehmen, beim Stylen von Input-Feldern muss man aus Usability-Gesichtspunkten Vorsicht walten lassen. Der normale User ist an das Aussehen der Formular-Elemente in seinem OS/Browser gewöhnt. Wenn die Input-Felder nun stark von der gewohnten Umgebung abweichen, ist er skeptischer beim Ausfüllen von Formularen und bricht u.U. den Prozess sogar ganz ab. (Quelle: Internet)&lt;/p&gt;
&lt;p&gt;Auch wenn man es wollte, einige Formular-Elemente lassen sich zudem nur schwerlich, bis gar nicht cross-browser-konform stylen, z.B. das &lt;code&gt;input[type=&amp;quot;file&amp;quot;]&lt;/code&gt;. Für Checkboxen und Radio-Buttons möchte ich heute eine Möglichkeit zeigen, die zudem auch die neuen CSS3 Pseudo-Klasse &lt;code&gt;:checked&lt;/code&gt; beinhaltet.&lt;/p&gt;
&lt;h3 id=&quot;als-erstes-erstellen-wir-ein-kleines-html5-formular&quot;&gt;Als erstes erstellen wir ein kleines HTML5-Formular&lt;a class=&quot;header-anchor&quot; href=&quot;#als-erstes-erstellen-wir-ein-kleines-html5-formular&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;form class=&amp;quot;comment-form&amp;quot; action=&amp;quot;#&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;
  &amp;lt;fieldset&amp;gt;
    &amp;lt;ol&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;h3&amp;gt;War das Tutorial nützlich? &amp;lt;sup title=&amp;quot;Das ist ein Pflichtfeld&amp;quot;&amp;gt;*&amp;lt;/sup&amp;gt;&amp;lt;/h3&amp;gt;
        &amp;lt;input id=&amp;quot;radio_yes&amp;quot; type=&amp;quot;radio&amp;quot; value=&amp;quot;ja&amp;quot; name=&amp;quot;radio&amp;quot; required&amp;gt;
        &amp;lt;label for=&amp;quot;radio_yes&amp;quot;&amp;gt;Ja&amp;lt;/label&amp;gt;
        &amp;lt;input id=&amp;quot;radio_no&amp;quot; type=&amp;quot;radio&amp;quot; value=&amp;quot;nein&amp;quot; name=&amp;quot;radio&amp;quot; required&amp;gt;
        &amp;lt;label for=&amp;quot;radio_no&amp;quot;&amp;gt;Nein&amp;lt;/label&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ckeck&amp;quot; id=&amp;quot;check&amp;quot; value=&amp;quot;japp&amp;quot; required&amp;gt;
        &amp;lt;label for=&amp;quot;check&amp;quot;&amp;gt;Ja, ich habe das Tutorial auch gelesen.&amp;lt;sup title=&amp;quot;Das ist ein Pflichtfeld&amp;quot;&amp;gt;*&amp;lt;/sup&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; id=&amp;quot;submit&amp;quot; value=&amp;quot;Absenden&amp;quot;&amp;gt;
      &amp;lt;/li&amp;gt;
    &amp;lt;/ol&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das Formular braucht zunächst ein wenig Grundgestaltung.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

li {
  padding: 1em 0;
}

label {
  cursor: pointer;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wie schon erwähnt, ist es fast unmöglich die Input-Types einheitlich zu stylen. Deshalb werden wir die Input-Felder über &lt;code&gt;background-clip&lt;/code&gt; „ausblenden“ und das folgende &lt;code&gt;label&lt;/code&gt; mit dem Styling versorgen.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;input[type=&amp;quot;checkbox&amp;quot;], input[type=&amp;quot;radio&amp;quot;] {
  position: absolute;
  clip: rect(0,0,0,0);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jetzt sind die Input-Felder der Checkbox und auch die Radio-Buttons nicht mehr sichtbar, aber grundsätzlich noch für die Tasterturbenutzung erreichbar (Stichwort: barrierefrei). Da der Browser uns jetzt allerdings kein visionelles Feedback mehr geben kann, wenn die Checkbox oder Radio-Buttons fokusiert werden, verlegern wir das Verhalten auf das folgende Label. Wenn das Input-Feld fokusiert wird, wird das folgende &lt;code&gt;label&lt;/code&gt; fett dargestellt:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;input[type=&amp;quot;checkbox&amp;quot;]:focus + label , input[type=&amp;quot;radio&amp;quot;]:focus + label{
  font-weight: bold;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;spritegrafik-hinzufugen&quot;&gt;Spritegrafik hinzufügen&lt;a class=&quot;header-anchor&quot; href=&quot;#spritegrafik-hinzufugen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Als nächstes fügen wir eine Hintergrund-Spritegrafik hinzu, sowie das Styling für den CSS3 &lt;code&gt;:checked&lt;/code&gt; Status:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;input[type=&amp;quot;radio&amp;quot;] + label {
  background: transparent url(&amp;quot;s-radio.png&amp;quot;) no-repeat 0 -34px;
  padding: 0 20px;
}
input[type=&amp;quot;radio&amp;quot;][value*=&amp;quot;nein&amp;quot;] + label {
  background-position: 0 -50px;
}
input[type=&amp;quot;radio&amp;quot;]:checked + label {
  background-position: 0 -2px;
  color: green;
}
input[type=&amp;quot;radio&amp;quot;][value*=&amp;quot;nein&amp;quot;]:checked + label {
  background-position: 0 -18px;
  color: red;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Spritegrafik-Position wird also verschoben und visuell auf grün für „ja“ gesetzt, oder eben rot für „nein“. Dazu ist natürlich zu sagen, wenn man den Barrierefrei-Aspekt hinzuzieht, rot/grün natürlich nicht optimal sind und man sich darüber in klaren sein sollte, das ein Großteil der Nutzer eine Rot-Grün-Schwäche haben. Deshalb sind in unserem Beispiel zudem andere Symbole für ja/nein gewählt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ein ähnliches Verhalten implementieren wir nun auch für die Checkbox.&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;input[type=&amp;quot;checkbox&amp;quot;] + label {
  background: transparent url(&amp;quot;s-checkbox.png&amp;quot;) no-repeat 0 -16px;
  padding-left: 20px;
}

input[type=&amp;quot;checkbox&amp;quot;]:checked + label {
  background-position: 0 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Da im Beispiel ein HTML5-Formular mit dem Attribut &lt;code&gt;required&lt;/code&gt; in den Inputs verwendet wurde, wird die browserseitige Validierung aktiv, wenn keine Option ausgewählt wurde, sowie wenn die Checkbox nicht aktiviert wurde.&lt;/p&gt;
&lt;p&gt;Diesen Pseudo-Status kann ebenfalls stylen, ist allerdings in den verschiedenen Browsern mit Browser-Präfixen implementiert. Am Beispiel von Firefox, kann man &lt;code&gt;:-moz-ui-invalid&lt;/code&gt; verwenden:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;input[type=&amp;quot;checkbox&amp;quot;]:-moz-ui-invalid + label {
  background: transparent url(&amp;quot;s-checkbox.png&amp;quot;) no-repeat 0 -32px;
  color: red;
}
input[type=&amp;quot;checkbox&amp;quot;]:-moz-ui-invalid + label:after {
  content: &#39;&amp;lt;&amp;lt;&amp;lt;--- Pflichtfeld!&#39;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/12/form-selectors.html&quot;&gt;Das HTML5-Formular mit individuellen Radio-Buttons&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Der verwendeten Pseudo-Selektoren sind bereits in CSS 2.1 spezifiziert, allerdings erst vollständig implementiert mit dem Release des IE9.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/kU8S59Ru2--521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Weitere Infos zu dieser Technik gibt es beim CSS Ninja (Ryan Seddon) im Artikel “&lt;a href=&quot;https://www.thecssninja.com/css/custom-inputs-using-css&quot; title=&quot;CSS Ninja&quot;&gt;Custom radio and checkbox inputs using CSS&lt;/a&gt;” und in Lea Verou’s Vortrag “&lt;a href=&quot;https://lea.verou.me/css3-secrets/#custom-form-controls&quot; title=&quot;CSS3 Secrets&quot;&gt;CSS3 Secrets&lt;/a&gt;”.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 transitions to go – CSS3 Adventskalender Tag 9</title>
    <link href="https://maddesigns.de/archiv/css3-transitions-to-go-1328.html" />
    <updated>2011-12-09T07:39:06Z</updated>
    <id>https://maddesigns.de/archiv/css3-transitions-to-go-1328.html</id>
    <content type="html">&lt;p&gt;Transitions ist auch heute wieder Thema im CSS3 Adventskalender. Am Tag 4 zeigte Heiko im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog&quot;&gt;Webstandard-Blog&lt;/a&gt; am &lt;a href=&quot;https://webstandard.kulando.de/post/2011/12/03/css-transform-und-transition-tag-4-im-css3-advenstkalender-2011&quot; title=&quot;CSS3 transition und transform&quot;&gt;Beispiel eines Call-to-Action Button&lt;/a&gt; was man mit Transion und Transform mit CSS3 für Effekte erziehlen kann. Seit der Einführung von -moz-transition im Firefox 4 konnten Transitions endlich mehr verwendet werden, da der Browsermarkanteil der unterstützenden Browser enorm gestiegen ist. Auf die detailierte Funktionweise möchte ich heute nicht weiter eingehn, das war ja schon &lt;a href=&quot;https://maddesigns.de/archiv/css3-transitions-css-animation-css3-adventskalender-tag-21-661.html&quot; title=&quot;CSS3 transitions – CSS Animation – CSS3 Adventskalender Tag 21&quot;&gt;Thema im letzten Jahr&lt;/a&gt;.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Vielmehr gibt es heut ein paar Snippets um &lt;code&gt;:hover&lt;/code&gt;-Transitions auf Bildern zu animieren. Doch nur nochmal zur Erinnerung, transitions können auch auf andere dynamische Pseudoklassen wie &lt;code&gt;:active&lt;/code&gt;, &lt;code&gt;:focus&lt;/code&gt;, &lt;code&gt;:target&lt;/code&gt;, &lt;code&gt;:disabled&lt;/code&gt;, etc., aber auch auf @media-Queries angewendet werden. Schaut durch die Demo – durch CSS3 werden nun einige jQuery Animation überflüssig.&lt;/p&gt;
&lt;h3 id=&quot;image-transition-demo-auf-das-bild-klicken&quot;&gt;image transition Demo – auf das Bild klicken ;)&lt;a class=&quot;header-anchor&quot; href=&quot;#image-transition-demo-auf-das-bild-klicken&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;imagebox&quot;&gt;
  &lt;a href=&quot;https://maddesigns.de/img/2011/12/css3-transition.html&quot;&gt;&lt;span class=&quot;overlay zoom-black&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/j3wRw7K6QN-400.avif&quot; sizes=&quot;400px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/j3wRw7K6QN-400.webp&quot; sizes=&quot;400px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/j3wRw7K6QN-400.png&quot; alt=&quot;CSS3 transition demo&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;400&quot; height=&quot;281&quot;&gt;&lt;/picture&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a class=&quot;u-clear u-block&quot; href=&quot;https://maddesigns.de/img/2011/12/transitions.txt&quot; target=&quot;_blank&quot;&gt;CSS-Datei aus der Demo zum Download&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;tools&quot;&gt;Tools:&lt;a class=&quot;header-anchor&quot; href=&quot;#tools&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ceaser – CSS Easing Animation Tool (&lt;a href=&quot;https://matthewlein.com/ceaser/&quot; title=&quot;Ceaser transition timing tool&quot;&gt;matthewlein.com/ceaser/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;cubic-bezier.com (&lt;a href=&quot;https://cubic-bezier.com/&quot; title=&quot;transition timing tool by Lea Verou&quot;&gt;cubic-bezier.com&lt;/a&gt;)&lt;/p&gt;
&lt;h3 id=&quot;link-tipps&quot;&gt;Link Tipps:&lt;a class=&quot;header-anchor&quot; href=&quot;#link-tipps&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;CSS Transitions 101 (&lt;a href=&quot;https://www.webdesignerdepot.com/2010/01/css-transitions-101/&quot; title=&quot;transition 101 tutorial&quot;&gt;www.webdesignerdepot.com/2010/01/css-transitions-101/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Let the Web move you — CSS3 Animations and Transitions (&lt;a href=&quot;https://www.webdirections.org/blog/let-the-web-move-you-css3-animations-and-transitions/&quot; title=&quot;transitions and animations&quot;&gt;www.webdirections.org/blog/let-the-web-move-you-css3-animations-and-transitions/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.msdn.com/b/eternalcoding/archive/2011/12/06/css3-transitions.aspx&quot; title=&quot;Introduction to CSS3 transitions&quot;&gt;Introduction to CSS3 Transitions&lt;/a&gt; (via &lt;a href=&quot;https://twitter.com/#!/Flocke/&quot; title=&quot;Jens Grochdreis auf Twitter&quot;&gt;@Flocke&lt;/a&gt;)&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Alle Browser verwenden noch die jeweiligen Vendor-Prefixe, z.B. -moz-transition. Der Internet Explorer unterstütz CSS3 transitions ab IE10. &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/kU8S59Ru2--521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>border-image – CSS3 Adventskalender Tag 7</title>
    <link href="https://maddesigns.de/archiv/border-image-1281.html" />
    <updated>2011-12-07T09:04:08Z</updated>
    <id>https://maddesigns.de/archiv/border-image-1281.html</id>
    <content type="html">&lt;p&gt;Heute im CSS3 Adventskalender eine kleines Tutorial, zum Thema „&lt;strong&gt;&lt;code&gt;border-image&lt;/code&gt;&lt;/strong&gt;„. Responsive Design ist ja in aller Munde und auch in allen &lt;a href=&quot;https://24ways.org/2011&quot; title=&quot;24ways advent calendar&quot;&gt;Adventskalendern&lt;/a&gt; dieses Jahr. Die Eigenschaft &lt;code&gt;border-image&lt;/code&gt; ist dem einen oder anderen Webworker nicht neu, aber im Zusammenhang mit Responsive Images gewinnt es sicherlich mehr an Bedeutung. Die Möglichkeit, dass sich die Content-Box, das Bild und das Border-Image anpassen ist mit CSS3 in modernen Browsern möglich.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Ich möchte auch nicht zu sehr ins Detail gehen, das haben &lt;a href=&quot;https://www.css3files.com/border/&quot; title=&quot;border-image&quot;&gt;andere&lt;/a&gt; &lt;a href=&quot;https://www.useragentman.com/blog/2011/03/29/pixel-perfect-css3-border-image-in-depth/&quot; title=&quot;border-image in depth&quot;&gt;Tutorials&lt;/a&gt; &lt;a href=&quot;https://css-tricks.com/6883-understanding-border-image/&quot;&gt;bereits&lt;/a&gt; &lt;a href=&quot;https://www.sitepoint.com/css3-border-image/&quot;&gt;sehr gut gemacht&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Das W3C beschreibt es ebenfalls sehr gut und liefert auch ein gutes Beispiel für die Verwendung von &lt;code&gt;border-image&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/12/groovy-border-image-slice.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/3f12XHqRf6-396.avif&quot; sizes=&quot;(min-width: 48em) 396px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/3f12XHqRf6-396.webp&quot; sizes=&quot;(min-width: 48em) 396px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/3f12XHqRf6-396.png&quot; alt=&quot;groovy-border-image-slice&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;396&quot; height=&quot;375&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;border-image: url(border-image.jpg) 124 repeat;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/wA4hwgFKDY-452.avif&quot; sizes=&quot;(min-width: 48em) 452px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/wA4hwgFKDY-452.webp&quot; sizes=&quot;(min-width: 48em) 452px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/wA4hwgFKDY-452.png&quot; alt=&quot;groovy-border-image-slice1&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;452&quot; height=&quot;537&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Zusammenfassen kann man die Shorthand-Notation in der Form:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;border-image: uri top right bottom left x_repeat y_repeat
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;und man kann optinal auch die border-width in die Notation aufnehmen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;border-image: uri top right bottom left / border x_repeat y_repeat
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Trennung zwischen Slice-Wert und Border-Width erfolgt durch ein / (Slash). Die &lt;code&gt;border-width&lt;/code&gt; kann natürlich auch vier unterschiedliche Werte annehmen für jede Seite.&lt;/p&gt;
&lt;h3 id=&quot;ein-einfaches-beispiel&quot;&gt;Ein einfaches Beispiel&lt;a class=&quot;header-anchor&quot; href=&quot;#ein-einfaches-beispiel&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/12/border-image-xmas.png&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/-yqdqSZUiL-100.avif&quot; sizes=&quot;100px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/-yqdqSZUiL-100.webp&quot; sizes=&quot;100px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/-yqdqSZUiL-100.png&quot; alt=&quot;border-image-xmas&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;100&quot; height=&quot;100&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Einen einfachen weihnachtlichen Rahmen mit Fireworks erstellt und eingebunden:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.xmas {
	-webkit-border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
	   -moz-border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
	     -o-border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
	        border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Der Browser-Support ist für moderne Browser gewohnt gut. Leider unterstützt der Internet Explorer in keiner Version &lt;code&gt;border-image&lt;/code&gt; und es ist aktuell auch nicht für IE10 geplant. Deshalb sollte man (wenn man einen visuellen Rahmen hinzufügen müsste) für die Internet Explorer ein Fallback hinzufügen.&lt;/p&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/maddesigns/xzHCh/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Der JSFiddle-Code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.box {
    width: 150px;
    height: 100px;
    padding: 10px;
    margin: 10px;
    float: left;
    /* IE Fallback */
    border: 7px double green;
}
.xmas {
    -webkit-border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
       -moz-border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
         -o-border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;
            border-image: url(&amp;quot;border-image-xmas.png&amp;quot;) 14 repeat;

    border-width: 14px;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;link-tipps&quot;&gt;Link-Tipps&lt;a class=&quot;header-anchor&quot; href=&quot;#link-tipps&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.norabrowndesign.com/css-experiments/border-image-frame.html&quot;&gt;border-image Demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://border-image.com/&quot;&gt;border-image.com&lt;/a&gt; – test und play around&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wie schon erwähnt kann der Internet Explorer bis zur aktuellen IE10 Preview kein border-image.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.png&quot; alt=&quot;browserChoice-no-IE&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;In Webkit-Browsern kann zusätzlich auch eine Gradient-Funktion (&lt;code&gt;linear-gradient&lt;/code&gt;) als Image verwendet werden (&lt;a href=&quot;https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266--webkit-border-image&quot;&gt;Safari Referen&lt;/a&gt;z). Ein JS-Fiddle dazu von Divya Manian:&lt;/p&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/nimbu/fbw2q/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Geht das auch im Firefox oder Opera? Hat das schon mal jemand gemacht? Dann könnte man sich beim Tutorial zu &lt;a href=&quot;https://maddesigns.de/archiv/css3-gradient-border-1141.html&quot; title=&quot;Gradient Border – CSS3 Adventskalender Tag 1&quot;&gt;gradient-border&lt;/a&gt; ein paar Zeilen sparen.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>”CSS3 &amp; Responsive Web” – CSS3 Adventskalender Tag 3</title>
    <link href="https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html" />
    <updated>2011-12-03T08:03:59Z</updated>
    <id>https://maddesigns.de/archiv/css3-responsive-web-mmt28-1205.html</id>
    <content type="html">&lt;p&gt;Heute gibt es das 3. Türchen im CSS3 Adventskalender etwas später. Ich bin heute beim &lt;a href=&quot;https://www.multimediatreff.de/&quot; title=&quot;Multimediatreff 28&quot;&gt;Multimediatreff&lt;/a&gt; in Köln eingeladen um über &lt;strong&gt;CSS3 &amp;amp; Responsive Web&lt;/strong&gt; zu sprechen. Die Slides vom Vortrag werden nach dem &lt;a href=&quot;https://www.multimediatreff.de/naechstestreffen.php#vortrag3&quot; title=&quot;Vortrag: CSS3 und responsive Web&quot;&gt;Vortrag&lt;/a&gt; hier gegen 14 Uhr veröffentlicht. Bis dahin kann man den &lt;a href=&quot;https://www.multimediatreff.de/livestream/&quot; title=&quot;Multimediatreff 28 Livestream&quot;&gt;Multimediatreff auch im Live-Stream verfolgen&lt;/a&gt;. Hochkarätige Vorträge sind zu erwarten, u.a. zum Thema HTML5 von Patrick H. Laucke (Opera) sowie Peter Kröner (&lt;a href=&quot;https://twitter.com/sir_pepe&quot;&gt;@sir_pepe&lt;/a&gt;) oder zum Thema „JavaScript: Von einfachen Scripten zu komplexen Anwendungen“ von Mathias Schäfer (&lt;a href=&quot;https://twitter.com/molily&quot;&gt;@molily&lt;/a&gt;).&lt;/p&gt;
&lt;h3 id=&quot;die-slides&quot;&gt;Die Slides&lt;a class=&quot;header-anchor&quot; href=&quot;#die-slides&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/css3-responsive/template/&quot;&gt;Slides zu „CSS3 &amp;amp; Responsive Web“&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;das-video-vom-vortrag&quot;&gt;Das Video vom Vortrag&lt;a class=&quot;header-anchor&quot; href=&quot;#das-video-vom-vortrag&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 Adventskalender 2011 – Tag 2</title>
    <link href="https://maddesigns.de/archiv/css3-adventskalender-2011-tag-2-1199.html" />
    <updated>2011-12-02T11:06:30Z</updated>
    <id>https://maddesigns.de/archiv/css3-adventskalender-2011-tag-2-1199.html</id>
    <content type="html">&lt;p&gt;…im Webstandard Blog zum Thema “&lt;a href=&quot;https://webstandard.kulando.de/post/2011/12/02/css-regions-tag-2-im-css3-advenstkalender-2011&quot; title=&quot;CSS Regions&quot;&gt;CSS Regions – Bereiche zur Aufnahme von Inhalten definieren&lt;/a&gt;”&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Gradient Border – CSS3 Adventskalender Tag 1</title>
    <link href="https://maddesigns.de/archiv/css3-gradient-border-1141.html" />
    <updated>2011-12-01T07:00:35Z</updated>
    <id>https://maddesigns.de/archiv/css3-gradient-border-1141.html</id>
    <content type="html">&lt;p&gt;Tag 1 im CSS3 Advancedkalender und wir gehen gleich ins Eingemachte! ;)&lt;/p&gt;
&lt;p&gt;In der &lt;a href=&quot;https://www.w3.org/TR/css3-text/#text-decoration-color&quot; title=&quot;W3C CSS3 text spec&quot;&gt;CSS Text Level 3 Spezifikation&lt;/a&gt; gibt es seit einiger Zeit die Eigenschaft &lt;code&gt;text-decoration-color&lt;/code&gt; mit der man die Text-(Link-)Unterlinie andersfarbig gestalten kann. Bisher wird diese Eigenschaft laut &lt;a href=&quot;https://developer.mozilla.org/en/CSS/text-decoration-color#Browser_compatibility&quot; title=&quot;Mozilla Developer Network - CSS3 text-decoration-color&quot;&gt;MDN&lt;/a&gt; nur vom Firefox ab der Version 6 mit dem Prefix -moz- unterstützt. Zukünftig soll es ähnlich wie auch für border oder outline möglich sein für &lt;code&gt;text-decoration&lt;/code&gt; Shorthand-Values wie folgt anzugeben: &lt;code&gt;&amp;lt;br /&amp;gt; text-decoration: &amp;lt;text-decoration-line&amp;gt; || &amp;lt;text-decoration-color&amp;gt; || &amp;lt;text-decoration-style&amp;gt; || blink&amp;lt;br /&amp;gt; &lt;/code&gt; anzugeben. Das ist ein Vorteil, wenn weitere Browser das unterstützen. Auf &lt;a href=&quot;https://www.perun.net&quot; title=&quot;perun.net Weblog&quot;&gt;perun.net&lt;/a&gt; gibt es bereits einen umfassenden &lt;a href=&quot;https://www.perun.net/2011/08/14/css3-art-stil-und-farbe-des-unterstrichs-beeinflussen/&quot; title=&quot;CSS3 text-decoration Artikel&quot;&gt;Artikel über CSS3 text-decoration&lt;/a&gt;.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;was-bisher-geschah&quot;&gt;…was bisher geschah&lt;a class=&quot;header-anchor&quot; href=&quot;#was-bisher-geschah&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Viele Webentwickler setzen allerdings auf die Variante, dass Sie nicht die Text-(Link-)Unterlinie verwenden, sondern ein &lt;code&gt;border-bottom&lt;/code&gt; vergeben.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a {
	text-decoration: none;
	border-bottom: 1px solid red;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das hat den Vorteil, dass Zeichenunterlängen nicht durchschnitten werden. Der Border sitzt tiefer, direkt unterm &lt;code&gt;padding&lt;/code&gt; bei Blockelementen, unter der &lt;code&gt;line-height&lt;/code&gt;-Höhe bei Inline-Elementen. Hier kann man nun auch mit unterschiedlichen Farben variieren, z.B.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a {
	color: #000;
	text-decoration: none;
	border-bottom: 1px solid red;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Was allerdings nicht funktioniert, sind Farbverläufe. Man kann lediglich über &lt;code&gt;border-style&lt;/code&gt; das Aussehen variieren. Farbverläufe können der Eigenschaft &lt;code&gt;border-color&lt;/code&gt; nicht zugewiesen werden.&lt;/p&gt;
&lt;h3 id=&quot;generierung-von-inhalt-uber-css&quot;&gt;Generierung von Inhalt über CSS&lt;a class=&quot;header-anchor&quot; href=&quot;#generierung-von-inhalt-uber-css&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Man kann sich allerdings mit der Generierung von „Inhalt“ über CSS behelfen. In einigen &lt;a href=&quot;https://maddesigns.de/archiv/teaserboxen-komplett-ohne-bilder-css3-adventskalender-tag-9-489.html&quot; title=&quot;Content-Generierung mit CSS&quot;&gt;Tutorials aus dem letzten Jahr&lt;/a&gt; haben wir schon mit der Generierung von Inhalten über „&lt;code&gt;content&lt;/code&gt;“ gearbeitet. Das machen wir uns auch beim Gradient-Border zu nutze. Wir generieren über ein &lt;code&gt;:after&lt;/code&gt; Pseudo-Element leeren Inhalt.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a:after {
	content: &#39;&#39;;
	display: block;
	background-color: red
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Solange wir unseren Inhalt keine Höhe und Breite geben, sehen wir auch keinen Inhalt (hier also keine Hintergrundfarbe).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a:after {
	...

	width: 100%;
	height: 1px;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jetzt ist unser 1px großer Inhaltsblock nach dem Link hinzugefügt worden und bewirkt, dass der Text getrennt wird &lt;code&gt;(display: block)&lt;/code&gt;. Die Linie sitz im Moment auf der gleichen Höhe wie unser 1px Border, da der Beginn von &lt;code&gt;:after&lt;/code&gt; gleich &lt;code&gt;border-bottom&lt;/code&gt; ist. Um nun den gleichen Effekt wie mit &lt;code&gt;border-bottom&lt;/code&gt; nachzustellen, muss man den &lt;a href=&quot;https://developer.mozilla.org/en/CSS/block_formatting_context&quot; title=&quot;MDN - Block Formatting Context&quot;&gt;Block-Formatting-Context&lt;/a&gt; verändern, wir fügen Positioning hinzu.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* Elternelement */
a {
	color: #000;
	text-decoration: none;
	border-bottom: 1px solid red;
	position: relative;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Anker-Tags werden nun relativ zum Textfluss positioniert, also unverändert. Trotzdem erzeugen wir dadurch für alle Kindelemente (also auch für &lt;code&gt;:before&lt;/code&gt; und &lt;code&gt;:after&lt;/code&gt;) einen neuen Kontext. Alle Elemente, die nun über &lt;code&gt;position: absolute&lt;/code&gt; positioniert werden, orientieren sich am nächsthöheren Elternelement, das relativ positioniert ist. Klingt komisch, ist aber so ;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a:after {
	...

	position: absolute;
	bottom: 0;
	left: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unsere blaue Linie sitz nun am untersten Ende der Inhalts-Box, ist also 1px über &lt;code&gt;border-bottom&lt;/code&gt; gerutsch. Somit müsste die generierte Linie noch um -1px nach unten verschoben werden um genau auf der &lt;code&gt;border-bottom&lt;/code&gt; zu sitzen. 80% der Arbeit ist getan, jetzt nur noch den Verlauf über &lt;code&gt;linear-gradient&lt;/code&gt; hinzufügen und &lt;code&gt;border-bottom&lt;/code&gt; im &lt;a&gt; entfernen.&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a:after {
	...

	background: -webkit-gradient(linear, left top, right top, from(red), to(blue));
	background: -webkit-linear-gradient(left, red, blue);
	background: -moz-linear-gradient(left, red, blue);
	background: -ms-linear-gradient(left, red, blue);
	background: -o-linear-gradient(left, red, blue);
	background: linear-gradient(to right, red, blue);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ein Problem zeigt sich natürlich mit Inline-Elementen die einen Umbruch haben, hier funktioniert unsere Lösung nicht. Deshalb ist die Technik grundsätzlich nur bei Block-Elementen zu empfehlen. Falls man diese Technik doch auf Inline Elementen (z.B. &lt;a&gt;-Links) anwenden möchte, empfiehlt sich hier die &lt;code&gt;white-space&lt;/code&gt; Eigenschaft auf &lt;code&gt;nowrap&lt;/code&gt; zu setzen. Falls der Link über eine Zeile gehen würde, würde der „Inline-Block“ komplett auf die neue Zeile rutschen.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nun kann man natürlich die unzähligen Möglichkeiten von &lt;code&gt;linear-gradient&lt;/code&gt; ausspielen, z.B. Stop-Punkte oder mehrere Farbwerte einfügen, sowie mit Höhe und Breite varrieren.&lt;/p&gt;
&lt;h3 id=&quot;vollstandiger-code&quot;&gt;vollständiger Code&lt;a class=&quot;header-anchor&quot; href=&quot;#vollstandiger-code&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;a {
    color: #000;
    text-decoration: none;
    /* border-bottom: 1px solid #f00; */
    position: relative;
    white-space: nowrap;
}
a:after {
    content: &#39;&#39;;
    display: block;
    background-color: red;
    width: 100%;
    height: 1px;
    position: absolute;
    bottom: -1px;
    left: 0;

    background: -webkit-gradient(linear, left top, right top, from(blue), to(red));
    background: -webkit-linear-gradient(left, blue, red);
    background: -moz-linear-gradient(left, blue, red);
    background: -ms-linear-gradient(left, blue, red);
    background: -o-linear-gradient(left, blue, red);
    background: linear-gradient(to right, blue, red);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;jsfiddle-demo&quot;&gt;JSFiddle-Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#jsfiddle-demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;iframe class=&quot;u-embed u-embed--300&quot; title=&quot;JSFiddle-Demo&quot; src=&quot;https://jsfiddle.net/maddesigns/dBSfx/embedded/result/&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Da der Internet Explorer leider in keiner aktuellen Version Hintergrundverläufe unterstützt, kann man die Technik nur in modernen Browsern verwenden. Der IE10 wird &lt;code&gt;linear-gradient&lt;/code&gt; über den Prefix &lt;code&gt;-ms-&lt;/code&gt; unterstützen, bis dahin zeigt er in den Versionen IE8 und IE9 die Fallbackfarbe an.&lt;/p&gt;
&lt;p&gt;Internet Explorer &amp;lt;= Version 7 können keinen Inhalt via &lt;code&gt;content&lt;/code&gt; generieren. Für diese Browser müsste man also Hintergrundbilder verwenden, die natürlich nicht flexibel sind, was bedeutet man kann diese Technik ausschließlich auf Blockelemente mit fester Breite anwenden.&lt;/p&gt;
&lt;img src=&quot;https://maddesigns.de/img/2011/11/browserChoice-no-IE.jpg&quot; alt=&quot;browserChoice.no ohne IE&quot; width=&quot;521&quot; height=&quot;115&quot; class=&quot;alignright size-full wp-image-1188&quot;&gt;
&lt;h3 id=&quot;link-tipps&quot;&gt;Link-Tipps&lt;a class=&quot;header-anchor&quot; href=&quot;#link-tipps&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ein Beispiel ist die Generierung von geometrischen Formen wie z.B. Dreiecke oder Sterne, siehe &lt;a href=&quot;https://css-tricks.com/examples/ShapesOfCSS/&quot; title=&quot;Shapes of CSS&quot;&gt;Shapes Of CSS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html&quot; title=&quot;CSS linear-gradient&quot;&gt;linear-gradient (Verlauf) – CSS3 Adventskalender 2010 – Tag 3&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;css3-adventskalender-gewinnspiel&quot;&gt;CSS3 Adventskalender Gewinnspiel&lt;a class=&quot;header-anchor&quot; href=&quot;#css3-adventskalender-gewinnspiel&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wir haben vom &lt;a href=&quot;https://www.galileo-videotrainings.de/&quot; title=&quot;Galileo Videotrainings&quot;&gt;Galileo-Verlag&lt;/a&gt; einige Bücher für &lt;strong&gt;unsere große Weihnachtsverlosung&lt;/strong&gt; erhalten und zusätzlich ein paar Video-Trainings. In Woche 1 verlosen wir die DVD „&lt;a href=&quot;https://www.galileo-videotrainings.de/css-in-der-praxis/2552/training/&quot; title=&quot;DVD Video-Training - CSS in der Praxis&quot;&gt;CSS in der Praxis&lt;/a&gt;“ – Hier ein kleiner Einblick:&lt;/p&gt;
&lt;p&gt;Um das Video-Training zu gewinnen gebt einfach ein Kommentar ab. Nutzt Ihr mittlerweile CSS3, habt ihr dieses Jahr Projekte mit CSS3 umgesetzt? Teilnahmeschluß ist der 04.12.2010 um 24 Uhr. Der Rechtsweg ist ausgeschlossen. Die Auslosung erfolgt unter Zuhilfenahme von random.org.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>HTML E-Mail Newsletter cross-client-konform erstellen</title>
    <link href="https://maddesigns.de/archiv/html-newsletter-1030.html" />
    <updated>2011-11-01T10:00:23Z</updated>
    <id>https://maddesigns.de/archiv/html-newsletter-1030.html</id>
    <content type="html">&lt;p&gt;Mein Artikel aus dem &lt;a href=&quot;https://www.webstandards-magazin.de/index.php/news/203/36&quot; title=&quot;Webstandards Magazin&quot;&gt;Webstandards-Magazin Ausgabe 9&lt;/a&gt; zum Thema HTML E-Mail Newsletter:&lt;/p&gt;
&lt;h2 id=&quot;schoner-mailen&quot;&gt;Schöner mailen&lt;a class=&quot;header-anchor&quot; href=&quot;#schoner-mailen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;**&lt;/p&gt;
&lt;p&gt;HTML-Newsletter sind und bleiben ein beliebtes Kommunikationsmittel, um Informationen zu transportieren. Das Marketing liebt sie, weil sich Produktbilder oder visuelle Grafiken in die Werbebotschaft einbinden lassen. Standardkonforme Newsletter-Vorlagen für alle Mailprogramme zu generieren, ist allerdings nicht die einfachste Aufgabe. Wir haben einige Tipps und Tricks zusammengefasst und zeigen Lösungswege auf.**&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Emotionen und Handlungsaktionen lassen sich mit grafischen HTML-Newslettern gezielt wecken. Im Gegensatz zu Nur-Text-Newslettern können Sie in HTML die Bedeutung mit Überschriftenhierarchien oder die Bedeutung mit unterschiedlichen Schriftfarben hervorheben. Ein Firmenlogo können Sie einbinden, um Wiedererkennbarkeit (Branding) und demzufolge Vertrauen zu schaffen. Und das Beste: Alle Mail-Clients unterstützen inzwischen HTML.&lt;/p&gt;
&lt;figure class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/10/Email-client-market-share-statistic.png&quot; rel=&quot;attachment wp-att-1039&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/AWUmmxF7j0-300.avif&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/AWUmmxF7j0-300.webp&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/AWUmmxF7j0-300.png&quot; alt=&quot;E-Mail-Client Markt Verteilung - Quelle: litmusapp.com 2010&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;300&quot; height=&quot;161&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;figcaption class=&quot;wp-caption-text&quot;&gt;Großes Angebot: Zahlreiche Mail-Clients wetteifern um die Gunst der Kunden.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;zu-schon-um-wahr-zu-sein&quot;&gt;Zu schön, um wahr zu sein …&lt;a class=&quot;header-anchor&quot; href=&quot;#zu-schon-um-wahr-zu-sein&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wenn Sie sich bereits mit dem Thema beschäftigt haben, wissen Sie, dass besagte Mail-Clients zwar HTML verstehen, jedoch leider weitab von modernen Webstandards. Eine Vielzahl der Programme unterstützt nur rudimentäre CSS-Eigenschaften und auch nur dann, wenn diese als Inline-Styles definiert wurden. Das Testen eines HTML-Newsletters auf Kompatibilität in unterschiedlichen Clients gestaltet sich erheblich störrischer als der Cross-Browser-Test von Webseiten. Hinzu kommt eine weitere Schwierigkeit, denn HTML-Newsletter landen allzu gerne im Spamfilter. Diese Probleme gilt es zu bewältigen. Das E-Mail Standards Project hat es sich zur Aufgabe gemacht, zusammen mit Entwicklern von Mailprogrammen und Designern einen Standard für HTML-Newsletter zu finden. Die zugehörige Webseite &lt;a href=&quot;https://www.email-standards.org/&quot; title=&quot;E-Mail Standards Project&quot;&gt;https://www.email-standards.org/&lt;/a&gt; stellt eine Dokumentation bekannter Bugs und Missstände in den jeweiligen Clients zur Verfügung. Bekannt wurde das Projekt vor allem durch die Twitter-Kampagne „&lt;a href=&quot;https://www.fixoutlook.org/&quot; title=&quot;Fix Outlook Campaign&quot;&gt;Fix Outlook&lt;/a&gt;“, bei der Nutzer mit einem Tweet ihre Unterstützung signalisieren konnten. Abgesehen vom Medienecho sollten vor allem die Twitter-Avatare aller Unterstützer auf der Webseite des Projektes Microsoft auf die Problematik und die Dringlichkeit einer Lösung hinweisen.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.fixoutlook.org/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/JAb7ffitx--263.avif&quot; sizes=&quot;(min-width: 48em) 263px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/JAb7ffitx--263.webp&quot; sizes=&quot;(min-width: 48em) 263px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/JAb7ffitx--263.png&quot; alt=&quot;Fix Outlook Campaign&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;263&quot; height=&quot;299&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;html-mails-entwickeln-coding-a-la-1999&quot;&gt;HTML-Mails entwickeln: Coding à la 1999&lt;a class=&quot;header-anchor&quot; href=&quot;#html-mails-entwickeln-coding-a-la-1999&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Um eine übereinstimmende Darstellung in den verschiedenen Clients zu gewährleisten, muss gegenwärtig noch auf veraltete Techniken zurückgegriffen werden. Als Tenor gilt dabei „Code like 1999“ – verschachtelte Tabellen, Font-Tags und Inline-CSS, zudem keine CSS-Positioning über floats. Die jüngeren Webworker allerdings wissen (zum Glück) nicht mehr, wie unsereins früher Designs auf Basis von Layouttabellen erstellt hat.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;table border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;98%&amp;quot;&amp;gt;
  &amp;lt;tr&amp;gt;
    &amp;lt;td&amp;gt;
      &amp;lt;table border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;500&amp;quot;&amp;gt;
        &amp;lt;tr&amp;gt;
          &amp;lt;td&amp;gt;
            ... das ist der HTML-Inhalt ...
          &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Medieninhalte können ebenfalls nicht wiedergegeben werden, also kein Video, kein Audio und ebenfalls kein Flash. Leider können Desktop-Mail-Clients keine Formulare und aus Sicherheitsgründen auch kein &amp;amp;&amp;amp;&amp;lt;script&amp;gt; verarbeiten. Zudem wurde mit der Einführung von Outlook 2007 die Rendering-Engine von Internetexplorer auf Word umgestellt, was letztlich die Ausgangssituation für die zuvor genannte „Fix Outlook“-Kampagne darstellte. Eine weitere Hürde, mit der Sie rechnen müssen, sind nutzerspezifische Einstellungen. Durch die verschiedenen möglichen Fensteransichten werden jeweils unterschiedliche Teile eines Newsletters im Vorschaufenster angezeigt. Grundlegend können Sie von einem Fensterausschnitt mit einer Größe von 250x250px ausgehen. Wichtig ist, dass der Newsletter eine Gesamtbreite von 550-600px nicht übersteigen sollte. Eine gute Übersicht der unterstützen CSS-Eigenschaften hat &lt;a href=&quot;https://www.campaignmonitor.com/css/&quot; title=&quot;CSS support in Emails&quot;&gt;Campaignmonitor&lt;/a&gt; zusammengestellt.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.campaignmonitor.com/css/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/UHT11CPpdQ-300.avif&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/UHT11CPpdQ-300.webp&quot; sizes=&quot;(min-width: 48em) 300px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/UHT11CPpdQ-300.png&quot; alt=&quot;Guide to CSS support in email clients&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;300&quot; height=&quot;237&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;designfalle-deaktivierte-bilder-und-fotos&quot;&gt;Designfalle – deaktivierte Bilder und Fotos&lt;a class=&quot;header-anchor&quot; href=&quot;#designfalle-deaktivierte-bilder-und-fotos&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Die bei Weitem größte Hürde stellen Bilder dar. Mit der Einführung von Outlook 2007 wurde die Anzeige von eingebundenen Bildern sowie Hintergrundbildern unterdrückt und muss in Outlook explizit pro Absender aktiviert werden. Grund hierfür war das Übermaß an Spam-Mails. Google erlaubte in Gmail bis vor Kurzem ebenfalls keine Hintergrundbilder, doch auch hier können Sie die Darstellung inzwischen explizit aktivieren. Für Bilder, die via &amp;lt;img&amp;gt; eingebunden werden, ist es wichtig, das „alt“-Attribut sinnvoll auszufüllen. Bei barrierefreien Internetseiten ist dies ohnehin bereits Pflicht, da bei abgeschalteten Bildern der Alternativtext angezeigt wird – für blinde Menschen wird eben jener Text vorgelesen. Achten Sie auf dieses wichtige Detail, denn viele Menschen sind schlichtweg zu faul, die Anzeige der Bilder in ihrem Mail-Client zu aktivieren. Schüren Sie das Interesse also verstärkt durch den (Alt-)Text! Bitte beachten Sie, dass viele Mail-Programme die Schriftauszeichnung aus den umschließenden Tabellenzellen auch auf den Alt(ernativ)-Text anwenden. Wichtig zudem: Verlinken Sie Bilder ausschließlich mit absoluten Pfaden von einem offenen und schnellen Webserver. Vermeiden Sie PNG als Bildformat. Wenn Sie Ihr Newsletter-Design mit deaktivierten Bildern testen möchten, können Sie das am besten mit der &lt;a href=&quot;https://chrispederick.com/work/web-developer/&quot; title=&quot;Webdeveloper Toolbar&quot;&gt;Webdeveloper Toolbar&lt;/a&gt; tun, indem Sie dort einfach unter Bilder &amp;gt; Grafiken durch Alt-Attribute ersetzen auswählen. Auf gar keinen Fall sollten Sie Spacer-Gifs einsetzen, da diese als Spam angesehen werden. Um nicht in die Spam-Falle zu tappen, sollten Sie sich einfach ein paar Mails aus dem Spam-Ordner ansehen und schauen, was dort im Quelltext steht – und diese Fehler nicht im eigenen Newsletter begehen.&lt;/p&gt;
&lt;h3 id=&quot;webmailer-der-neue-client-standard&quot;&gt;Webmailer – der neue Client-Standard&lt;a class=&quot;header-anchor&quot; href=&quot;#webmailer-der-neue-client-standard&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Webmailer wie Gmail, Yahoo Mail oder web.de sind zweifelsohne sehr beliebt bei den Usern, da sie nirgendwo installiert werden müssen und Nutzer ihre E-Mails auch bequem an anderen Rechnern abrufen können. Kompliziert hingegen gestaltet es sich, standardkonforme HTML-Newsletter auszuliefern, da nahezu jeder Dienst E-Mails anders interpretiert. Grundsätzlich werden der &amp;lt;head&amp;gt;-Bereich und der öffnende &amp;lt;body&amp;gt;-Tag herausgeschnitten sowie der &lt;a href=&quot;https://www.emailonacid.com/blog/details/C18/doctype_-_the_black_sheep_of_html_email_design&quot; title=&quot;der Doctype wird ersetzt&quot;&gt;Doctype ersetzt&lt;/a&gt;. Das bedeutet, dass CSS-Styles, die im &amp;lt;head&amp;gt; verlinkt wurden, natürlich nicht mehr vorhanden sind. Gleiches gilt für Hintergrundgrafiken, die dem &amp;lt;body&amp;gt; zugewiesen sind – sie fallen schlicht und ergreifend einfach weg (Gmail verschiebt die Anweisungen mittlerweile in einen zusätzlichen DIV-Wrapper). Deshalb sollten Sie Hintergrundbilder in eine Wrapper-Tabelle einbinden (Stichwort: Verschachtelung). Weiterhin sollten Sie darauf achten, dass in der HTML-Mail keine CSS-Klassen zugewiesen sind, die mit dem Webmail-Service kollidieren könnten, bedeutet also: kein, sondern eher kundenbezogene Klassennamen wie. Gmail mag zudem keine Hochkommata in der Zuweisung einer bestimmten Schrift, also font-family: „Lucida Grade“ wird zu font-family: Lucida Grande. Vermeiden Sie ebenfalls relative Größenangaben und geben Sie dafür alle Angaben in Pixeln an.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hier noch weitere wichtige Hinweise für die Erstellung:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alle paddings und margins auf 0 setzen.&lt;/li&gt;
&lt;li&gt;Für Abstände lieber padding anstatt margin verwenden (margin wird selten richtig interpretiert).&lt;/li&gt;
&lt;li&gt;Keine Kurzschreibweisen für font verwenden, also font-size, font-weight, font-family einzeln aufzählen.&lt;/li&gt;
&lt;li&gt;Vermeiden Sie RGB als Farbwerte, geben Sie diese besser als Hexadezimalwerte an.&lt;/li&gt;
&lt;li&gt;Kein Whitespace in Tabellenzellen.&lt;/li&gt;
&lt;li&gt;Überschriften H1, H2 und H3 verwenden sowie sämtliche CSS-Eigenschaften hierfür neu vergeben, damit kein Default-Style greift.&lt;/li&gt;
&lt;li&gt;Text-Stile in Tabellenzellen jeweils neu vergeben, nicht darauf vertrauen, dass die Stile vererbt werden.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;test-tools&quot;&gt;Test-Tools&lt;a class=&quot;header-anchor&quot; href=&quot;#test-tools&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Haben Sie Ihren HTML-Newsletter fertig erstellt, geht es ans Testen. Wichtig beim Testen ist es, dass Textinhalte schon die echten Inhalte sind, Dummy-Texte werden meist als Spam angesehen. Zudem kommt somit auch nicht erst nach dem Versenden das böse Erwachen, wenn es heißt, dass ein Teil der Newsletter als Spam erkannt worden ist. Optimal geeignet für einen Spamtest ist ein kleines Programm namens &lt;a href=&quot;https://www.mailingcheck.com/&quot; title=&quot;Mailcheck Spam Check&quot;&gt;Mailingcheck&lt;/a&gt;. Das Programm erkennt zudem, ob die E-Mail als Phishing gekennzeichnet wurde und weist Sie darauf hin. Einen Test auf Cross-Client-Kompatibilität können Sie wunderbar mit dem kostenpflichtigen Onlineservice von &lt;a href=&quot;https://litmus.com/&quot; title=&quot;Litmus Mail Preview clients and mobile devices&quot;&gt;litmus.com&lt;/a&gt; durchführen. Für die Programme Outlook 2003 und Gmail bietet litmus.com die kostenlose Möglichkeit, eine Test-Mail an den Service zu senden, die dann in Form von Screenshots wenige Minuten später online abrufbar sind. Insgesamt können Sie über litmus Previews von mehr als 30 Mail-Clients erzeugen – dann allerdings kostenpflichtig.&lt;/p&gt;
&lt;h3 id=&quot;auf-der-sicheren-seite-mailvorlagen-von-mailchimp&quot;&gt;Auf der sicheren Seite – Mailvorlagen von MailChimp&lt;a class=&quot;header-anchor&quot; href=&quot;#auf-der-sicheren-seite-mailvorlagen-von-mailchimp&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Sicherlich, Webdesigner erstellen am liebsten alles selbst, allerings ist es bei der Fülle an Stolpersteinen, die auf dem Weg zum Cross-Client-HTML-Newsletter liegen, müßig bis schier unmöglich, alles richtig zu machen. Der Anbieter &lt;a href=&quot;https://www.mailchimp.com&quot; title=&quot;Mail Chimp Newsletter Service&quot;&gt;MailChimp&lt;/a&gt; stellt auf seiner Webseite eine große Sammlung an Template-Vorlagen zur Verfügung, die in diversen Mail-Clients getestet wurden. Zudem hat &lt;a href=&quot;https://github.com/mailchimp/Email-Blueprints&quot; title=&quot;E-Mail Templates&quot;&gt;MailChimp diese Sammlung auf GitHub veröffentlicht&lt;/a&gt; . Wenn Sie MailChimp als Newsletter-Versandservice nutzen möchten, haben Sie zudem den Vorteil, dass die Mails über einen sicheren Absender verfügen und ein Tracking der Kampagnen bereits mit zum Service gehört. Neu ist, dass in die Mails auch Social-Buttons für Facebook oder Twitter integriert werden können. Des Weiteren können A/B-Tests bei den Kampagnen auf einfache Art und Weise durchgeführt werden.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/mailchimp/Email-Blueprints&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/4uhMZCs5Hm-253.avif&quot; sizes=&quot;(min-width: 48em) 253px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/4uhMZCs5Hm-253.webp&quot; sizes=&quot;(min-width: 48em) 253px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/4uhMZCs5Hm-253.png&quot; alt=&quot;mailchimp html email templates&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;253&quot; height=&quot;299&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;tools&quot;&gt;Tools&lt;a class=&quot;header-anchor&quot; href=&quot;#tools&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;css-inline-style-konverter&quot;&gt;CSS Inline-Style-Konverter&lt;a class=&quot;header-anchor&quot; href=&quot;#css-inline-style-konverter&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Die Firma Torchbox stellt einen &lt;a href=&quot;https://inlinestyler.torchboxapps.com/styler/&quot; title=&quot;CSS Inline Style Converter&quot;&gt;Onlineservice&lt;/a&gt; zur Verfügung, der extern eingebundenes CSS zu Inline-Styles wandelt. Auch eine rudimentäre API zum Service können Sie aus einer eigenen Anwendung heraus ansprechen T. Einen ähnlichen Service bietet Dialect aus Kanada, wobei &lt;a href=&quot;https://premailer.dialect.ca/&quot; title=&quot;Pre-flight for HTML email.&quot;&gt;Premailer&lt;/a&gt; sogar noch mit zusätzlichen Hinweisen glänzt.&lt;/p&gt;
&lt;h4 id=&quot;e-mail-tracking-mit-google-analytics&quot;&gt;E-Mail-Tracking mit Google-Analytics&lt;a class=&quot;header-anchor&quot; href=&quot;#e-mail-tracking-mit-google-analytics&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In seinem Artikel beschreibt Justin Cutroni sehr ausführlich, wie Sie mit Google Analytics eine E-Mail-Kampagne tracken können. Obwohl der Artikel bereits aus dem Jahr 2008 stammt, ist er nach wie vor sehr aufschlussreich und nützlich.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://cutroni.com/blog/2008/11/04/email-tracking-with-google-analytics/&quot; title=&quot;E-Mail Campaign Tracking with Google Analytics&quot;&gt;https://cutroni.com/blog/2008/11/04/email-tracking-with-google-analytics/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Das war mein Artikel aus dem Webstandards-Magazin Nr. 9&lt;/p&gt;
&lt;h3 id=&quot;neue-link-tipps&quot;&gt;neue Link-Tipps&lt;a class=&quot;header-anchor&quot; href=&quot;#neue-link-tipps&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://spamcheck.postmarkapp.com/&quot; title=&quot;Spam Check Service&quot;&gt;https://spamcheck.postmarkapp.com/&lt;/a&gt;: Spam Check Service incl. API&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://htmlemailboilerplate.com/&quot; title=&quot;E-Mail Boilerplate&quot;&gt;https://htmlemailboilerplate.com/&lt;/a&gt;: HTML E-Mail Boilerplate Starter Kit&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://litmus.com/blog/anatomy-mobile-email/anatomy-mobile-email-24-1000px&quot; title=&quot;Anatomy of a mobile email&quot;&gt;https://litmus.com/blog/anatomy-mobile-email/anatomy-mobile-email-24-1000px&lt;/a&gt;: Anatomy of a Perfect Mobile Email&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.1stwebdesigner.com/wp-content/uploads/2011/08/email_marketing_infographic_upd.jpg&quot; title=&quot;E-Mail Marketing Infografik&quot;&gt;https://www.1stwebdesigner.com/wp-content/uploads/2011/08/email_marketing_infographic_upd.jpg&lt;/a&gt;: E-Mail Marketing Infografik&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 im praktischen Einsatz</title>
    <link href="https://maddesigns.de/archiv/css3-im-praktischen-einsatz-1013.html" />
    <updated>2011-10-18T07:12:55Z</updated>
    <id>https://maddesigns.de/archiv/css3-im-praktischen-einsatz-1013.html</id>
    <content type="html">&lt;p&gt;…lautet der Titel meines Vortrags auf der Web DevCon in Hamburg gestern. Eine Stunde lang habe ich über die aktuellen Einsatzmöglichkeiten von CSS3 erzählt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Die HTML-Slideshow findet ihr hier: &lt;a href=&quot;https://maddesigns.de/css3/css3-im-praktischen-einsatz.html&quot; title=&quot;Slideshow CSS3 - Web DevCon 2011&quot;&gt;CSS3 im praktischen Einsatz&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Die letzte Zeit war sehr hektisch für mich, viele Konferenzen und BarCamp habe ich besucht. Zuerst aber die Gewinner der &lt;a href=&quot;https://maddesigns.de/archiv/page-speed-1-web-performance-optimierung-2011-typo3camp-munchen-session-978.html&quot; title=&quot;„page.speed = 1“ Web Performance Optimierung 2011&quot;&gt;Buchverlosung&lt;/a&gt; vom letzten Blogbeitrag:&lt;/p&gt;
&lt;p&gt;Praxiswissen TYPO3 4.5: Andy&lt;/p&gt;
&lt;p&gt;Einstieg in TYPO3 4.5: Lukas&lt;/p&gt;
&lt;p&gt;TYPO3 4.5: Markus&lt;/p&gt;
&lt;p&gt;TYPO3 Extensions mit Extbase &amp;amp; Fluid: Marc&lt;/p&gt;
&lt;p&gt;Herzlichen Glückwunsch an alle Gewinner und Danke an alle, die mitgemacht haben!&lt;/p&gt;
&lt;h3 id=&quot;unterwegs&quot;&gt;Unterwegs&lt;a class=&quot;header-anchor&quot; href=&quot;#unterwegs&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wie schon eingangs erwähnt, war ich in den letzten Wochen ziemlich viel unterwegs, 1,5 Tage (jaja, eigentlich 2) auf der fantastischen &lt;a href=&quot;https://fronteers.nl/congres/2011&quot; title=&quot;Fronteers 2011&quot;&gt;Fronteers&lt;/a&gt; Konferenz in Amsterdam, bei der ich endlich auch &lt;a href=&quot;https://twitter.com/#!/derSchepp/&quot; title=&quot;Christian Schäfer auf Twitter&quot;&gt;derSchepp&lt;/a&gt;, &lt;a href=&quot;https://twitter.com/#!/drublic/&quot; title=&quot;Hans Christian Reinl auf Twitter&quot;&gt;Häääns&lt;/a&gt; und &lt;a href=&quot;https://twitter.com/#!/Fernmuendlich/&quot; title=&quot;Maik Wagner auf Twitter&quot;&gt;Maik&lt;/a&gt; in RL kennen lernen durfte. Von da aus ging es fast direkt zum &lt;a href=&quot;https://mobilecamp-hamburg.de/&quot; title=&quot;mobilecamp Hamburg&quot;&gt;mobilecamp Hamburg&lt;/a&gt;. Hier habe ich nochmal meine Präzi zum Thema &lt;a href=&quot;https://lanyrd.com/2011/mchh11/skfhr/&quot; title=&quot;Lanyrd Session - CSS3 - mobile performance optimierung&quot;&gt;„Mit CSS3 das mobile Web beschleunigen – Mobile Performance Optimierung“&lt;/a&gt; gehalten und eine kleine Einführung in jQuery Mobile gegeben (Slides folgen).&lt;/p&gt;
&lt;p&gt;Zwischenstop auf der &lt;a href=&quot;https://www.sae-alumni-convention.org/2011/Wordpress/&quot;&gt;SAE Alumni Convention&lt;/a&gt; in Berlin und von der &lt;a href=&quot;https://www.web-devcon.de/&quot; title=&quot;Web DevCon 2011 in Hamburg&quot;&gt;Web DevCon&lt;/a&gt; direkt nach München zum &lt;a href=&quot;https://www.managementcircle.de/weiterbildung/07-68952web.pdf&quot;&gt;B2B-Marketing – Social Media (PDF Link)&lt;/a&gt;. Als wäre das nicht genug für dieses Jahr, freue ich mich noch auf den &lt;a href=&quot;https://www.google.com/events/developerday/2011/berlin/&quot; title=&quot;Google Developer Day 2011&quot;&gt;Google Developer Day&lt;/a&gt; am 19.11. in Berlin, die &lt;a href=&quot;https://2011.beyondtellerrand.com/&quot; title=&quot;Beyond Tellerrand Conference&quot;&gt;Beyond Tellerrand&lt;/a&gt; am 21.-22.11. in Düsseldorf und letztlich auf dem &lt;a href=&quot;https://multimediatreff.de&quot; title=&quot;Multimedia Treff 28&quot;&gt;Multimediatreff 28&lt;/a&gt; am 03.12. in Köln. &lt;a href=&quot;https://www.multimediatreff.de/naechstestreffen.php#vortrag3&quot; title=&quot;Vortrag: CSS3 und responsive Web&quot;&gt;Dort erzähle ich dann wieder etwas über CSS3.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ohne zuviel zu verraten, es gibt im Dezember wieder mehr CSS3 ;)&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>„page.speed = 1“ &lt;br&gt;Web Performance Optimierung 2011</title>
    <link href="https://maddesigns.de/archiv/page-speed-1-web-performance-optimierung-2011-typo3camp-munchen-session-978.html" />
    <updated>2011-09-13T09:00:28Z</updated>
    <id>https://maddesigns.de/archiv/page-speed-1-web-performance-optimierung-2011-typo3camp-munchen-session-978.html</id>
    <content type="html">&lt;p&gt;Nach den diesjährigen TYPO3camps in &lt;a href=&quot;https://www.typo3camp-stuttgart.de/&quot; title=&quot;TYPO3camp Stuttgart&quot;&gt;Stuttgart&lt;/a&gt;, &lt;a href=&quot;https://www.t3c-berlin.de/&quot; title=&quot;TYPO3camp Berlin&quot;&gt;Berlin&lt;/a&gt; und &lt;a href=&quot;https://typo3camp.mixxt.de/&quot; title=&quot;TYPO3camp Hamburg&quot;&gt;Hamburg&lt;/a&gt; fand am letzten Wochenende das TYPO3camp in &lt;a href=&quot;https://typo3camp-munich.mixxt.de/&quot; title=&quot;TYPO3camp München&quot;&gt;München&lt;/a&gt; statt. Ein Themen-Barcamp bei dem es vorrangig um das CMS TYPO3 ging und eine super Möglichkeit die Community mal persönlich kennen zu lernen. Die Organisatoren haben es auch im 4. Jahr hintereinander geschafft ein perfektes Camp auf die Beine zu stellen. Natürlich hängt wie bei einem Barcamp traditionell üblich viel von den Teilnehmer ab. Sie tragen mit ihren mal gut vorbereitet, mal spontan gehaltenen Sessions zum Gelingen bei. So hatte &lt;a href=&quot;https://www.xing.com/profile/Felix_Oertel&quot; title=&quot;Extbase Session von Felix Oertel&quot;&gt;Felix Oertel&lt;/a&gt; eine Doppelsession über Extbase gehalten, &lt;a href=&quot;https://www.stuttgartmedia.de/&quot; title=&quot;FLUIDTEMPLATE Session von Thomas Löffler&quot;&gt;Thomas Löffler&lt;/a&gt; stellte die neue Möglichkeit der Template-Erstellung mit FLUIDTEMPLATE vor und &lt;a href=&quot;https://www.jweiland.net&quot;&gt;Jochen Weiland&lt;/a&gt; zeigte, was man machen muss, wenn die Website gehackt wurde (&lt;a href=&quot;https://vimeo.com/25648250&quot; title=&quot;Sessionvideo Webseite gehackt - was tun? (Jochen Weiland)&quot;&gt;Sessionvideo vom TYPO3camp Stuttgart&lt;/a&gt;). Weitere Sessions und Slides findet man auf &lt;a href=&quot;https://www.slideshare.net/event/typo3camp-munich-2011&quot; title=&quot;TYPO3camp München 2011 Slides on Slidesshare&quot;&gt;Slideshare&lt;/a&gt; und &lt;a href=&quot;https://lanyrd.com/2011/typo3camp-munich/schedule/&quot; title=&quot;TYPO3camp München - Lanyrd Übersicht der Sessions&quot;&gt;Lanyrd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In meiner Session „page.speed = 1“ ging es um Web Performance Optimierung 2011, also um die Möglichkeiten die Ladezeit der Website im Browser zu verbessern und die Unterschiede zwischen Desktop- und Mobil-Browser Optimierung.&lt;/p&gt;
&lt;p&gt;Hier der Link zur Slideshow: &lt;a href=&quot;https://maddesigns.de/page-speed/t3cm11-page-speed.html&quot; title=&quot;Web Performance Optimierung 2011 Slideshow&quot;&gt;&lt;strong&gt;„page.speed = 1“ Web Performance Optimierung 2011&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Mit der nächsten Version TYPO3 4.6 ist es dann möglich per Konfigurationsparameter&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;config.compressJs = 1
config.compressCss = 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;sowie&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;config.concatenateJs = 1
config.concatenateCss = 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;im TYPOscript Setup eingebunden Dateien zu komprimieren und zusammenzufassen. Das ist erstmals in &lt;a href=&quot;https://wiki.typo3.org/TYPO3_4.6#JS.2FCSS_Compression&quot; title=&quot;TYPO3 4.6 Release Notes&quot;&gt;TYPO3 4.6&lt;/a&gt; ohne die Verwendung zusätzlicher externer Scripte möglich.&lt;/p&gt;
&lt;p&gt;Viele Buchverlage haben das TYPO3camp mit Exemplaren aus dem Verlagsprogramm unterstützt. So konnten sich die Vortragsreferenten jeweils ein Buch ihrer Wahl aussuchen.&lt;/p&gt;
&lt;p&gt;Mittlerweile haben sich bei mir einige Büchern angesammelt ;) die ich jetzt an Interessierte verlosen möchte.&lt;/p&gt;
&lt;img src=&quot;https://maddesigns.de/img/2011/09/typo3-buecher.jpg&quot; alt=&quot;typo3-buecher&quot; title=&quot;TYPO3 4.5 Bücher Verlosung&quot; width=&quot;520&quot; height=&quot;388&quot; class=&quot;aligncenter size-full wp-image-996&quot;&gt;
&lt;p&gt;Ich freue mich über Kommentare zu den Slides, gern auch andere Meinungen oder Anregungen.&lt;/p&gt;
&lt;p&gt;Wenn ihr an der Verlosung teilnehmen wollt fügt am Ende einfach an, welches Buch ihr haben wollt. Ihr könnt natürlich auch einfach nur kommentieren „Buch TYPO3 4.5“ und ihr seid dabei. ;)&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>TYPO3 4.5.4 Update – Überschriften Rendering Bug #not</title>
    <link href="https://maddesigns.de/archiv/typo3-4-5-4-update-uberschriften-rendering-bug-not-961.html" />
    <updated>2011-07-29T11:06:12Z</updated>
    <id>https://maddesigns.de/archiv/typo3-4-5-4-update-uberschriften-rendering-bug-not-961.html</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Die Bugfix-Releases 4.3.13, 4.4.10 und 4.5.5 enthalten ein Kompatibilitätsfix für ältere Versionen wenn die Überschriftengenerierung über lib.stdheader verändert wurde.&lt;/p&gt;
&lt;p&gt;—&lt;/p&gt;
&lt;p&gt;Wie heißt es doch so schön: „&lt;strong&gt;Due to several security issues found in the TYPO3 Core, there was a combined release of TYPO3 4.3.12, 4.4.9 and 4.5.4.&lt;/strong&gt;„! Obwohl TYPO3 Updates in der Regel schnell von der Hand gehen, wenn man nichts an den Core-Dateien rumgeschraubt hat, sollte man immer mal in die &lt;strong&gt;Release-Notes&lt;/strong&gt; schauen.&lt;/p&gt;
&lt;p&gt;Ich muss jetzt mal den Oberlehrer spielen auf die aktuellen &lt;a href=&quot;http://wiki.typo3.org/TYPO3_4.5.4#Upgrading&quot;&gt;Release-Notes von TYPO3 4.5.4&lt;/a&gt;, &lt;a href=&quot;http://wiki.typo3.org/TYPO3_4.4.9#Upgrading&quot;&gt;4.4.9&lt;/a&gt; und &lt;a href=&quot;http://wiki.typo3.org/TYPO3_4.3.12#Upgrading&quot;&gt;4.3.12&lt;/a&gt; verweisen. Dort steht, dass das Rendering der Überschriften mit css_styled_content über lib.stdheader.10 verändert wurde und nötigenfalls das TYPOscript angepasst werden muss!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# Old
lib.stdheader.10.1 {
  insertData = 1
  fontTag = &amp;lt;h1{register:headerStyle}{register:headerClass}&amp;gt;|&amp;lt;/h1&amp;gt;
}
# New
lib.stdheader.10.1 {
  dataWrap = &amp;lt;h1{register:headerStyle}{register:headerClass}&amp;gt;|&amp;lt;/h1&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Viele haben in ihren TYPO3-Projekten (so wie auch ich) das Rendering der Überschriften verändert/verbessert um z.B. eine saubere Überschriften-Hierarchie von H1-H5 zu erhalten.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
/**
 * header tags old - do not use!
 */
lib.stdheader.stdWrap.dataWrap = |
lib.stdheader.10.1.fontTag = &amp;lt;h1&amp;gt;|&amp;lt;/h1&amp;gt;
lib.stdheader.10.2.fontTag = &amp;lt;h2&amp;gt;|&amp;lt;/h2&amp;gt;
lib.stdheader.10.3.fontTag = &amp;lt;h3&amp;gt;|&amp;lt;/h3&amp;gt;
lib.stdheader.10.4.fontTag = &amp;lt;h4&amp;gt;|&amp;lt;/h4&amp;gt;
lib.stdheader.10.5.fontTag = &amp;lt;h5&amp;gt;|&amp;lt;/h5&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Da Überschriften nun über dataWrap gerendert werden (due to a security reason), werden aktuell 2 Wraps ausgegeben und aus kommt u.U. zu Layout Bugs.&lt;/p&gt;
&lt;p&gt;Also von nun an nur noch das verwenden:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
/**
 * header tags new - go and get it!
 */
lib.stdheader.stdWrap.dataWrap = |
lib.stdheader.10.1.dataWrap = &amp;lt;h1&amp;gt;|&amp;lt;/h1&amp;gt;
lib.stdheader.10.2.dataWrap = &amp;lt;h2&amp;gt;|&amp;lt;/h2&amp;gt;
lib.stdheader.10.3.dataWrap = &amp;lt;h3&amp;gt;|&amp;lt;/h3&amp;gt;
lib.stdheader.10.4.dataWrap = &amp;lt;h4&amp;gt;|&amp;lt;/h4&amp;gt;
lib.stdheader.10.5.dataWrap = &amp;lt;h5&amp;gt;|&amp;lt;/h5&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Einige Kollegen haben dazu schon gestern berichtet: &lt;a href=&quot;http://jweiland.net/aktuell/artikel/layout-zerschossen-nach-update.html&quot;&gt;Riona auf jWeiland.net&lt;/a&gt;, &lt;a href=&quot;http://www.kupix.de/nc/news/news-singleview/vorsicht-typo3-upgrade-auf-449-oder-454-datawrap-ersetzt-fonttag.html&quot;&gt;Kupix Webdesign&lt;/a&gt; und der &lt;a href=&quot;http://nikonierer.de/typo3-quelltext-aufraeumen-wraps-entfernen/&quot;&gt;Nikonierer&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>TYPO3.org Relaunch könnte besser sein</title>
    <link href="https://maddesigns.de/archiv/typo3-org-relaunch-konnte-besser-sein-861.html" />
    <updated>2011-04-27T13:01:07Z</updated>
    <id>https://maddesigns.de/archiv/typo3-org-relaunch-konnte-besser-sein-861.html</id>
    <content type="html">&lt;p&gt;In der Woche vor Ostern wurde im Linuxhotel Essen von 20 freiwilligen Entwicklern im Rahmen der „T3O Relaunch Week“ ein Relaunch der bestehenden &lt;a href=&quot;https://typo3.org&quot;&gt;typo3.org&lt;/a&gt; Website durchgeführt. Ich hatte ebenfalls vor mich dort für die Mithilfe zu bewerben, leider konnte ich das auf Grund der aktuellen Projekte nicht.&lt;/p&gt;
&lt;p&gt;Umso mehr ärgere ich mich jetzt, dass ich nicht teilnehmen konnte, denn das, was ich aktuell unter &lt;a href=&quot;https://preview.typo3.org/&quot;&gt;https://preview.typo3.org/&lt;/a&gt; sehe, gefällt mir rein gar nicht. Dabei, will ich auch nicht übers Design sprechen, dem es auch an Kontrast und Usability fehlt, sondern ich habe als Frontendentwickler und Webstandards-Verfechter mir sofort den Quellcode angesehen…&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Um es nochmal zu verdeutlichen, ich möchte hier keinem zu nahe treten, ich weiß, dass es viel Arbeit war und jeder sein bestes gegeben hat, den Einsatz und das freiwillig, honoriere ich! Ich weiß auch, dass man bei einem Projekt dieser Größenordnung Kompromisse eingehen muss um nicht nur zielgruppenorientiert sondern auch Cross-Browser-übergreifend ein gutes Ergebnis abzuliefern und eben nicht nur mit der Speerspitze der Technologie agieren darf.&lt;/p&gt;
&lt;p&gt;Trotzdem bin ich der Meinung der Quellcode des TYPO3.org Relaunch hätte besser sein können. Ich sehe keine Unterstützung der aktuellen Browserfeatures, ich sehe keinerlei CSS3, gerade mal der &lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;&lt;/code&gt; ist auf HTML5 umgestellt, mehr nicht! Warum dann nicht die Möglichkeiten von HTML5 nutzen? Wenigstens die neuen semantischen Elemente wie &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, … nix! Warum dann HTML5?&lt;/p&gt;
&lt;p&gt;Warum nicht die Möglichkeit nutzen die &lt;a href=&quot;https://typo3.org/teams/design/style-guide/the-typo3-font/&quot;&gt;TYPO3-Schrift „Share“&lt;/a&gt; als Webfont über @font-face zu integrieren, funktioniert browserübergreifend bis IE6! Der Webservice &lt;a href=&quot;https://www.fontsquirrel.com/fontface/generator&quot;&gt;Fontsquirrel bietet einen Font Face Generator&lt;/a&gt;, dort kann man die Schrift hochladen und es werden on-the-fly die benötigten Formate generiert.&lt;/p&gt;&lt;figure id=&quot;attachment_867&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.fontsquirrel.com/fontface/generator&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/2011/04/font-squirrel-generator.png&quot; alt=&quot;Font Face Generator&quot; title=&quot;font-squirrel-generator&quot; width=&quot;300&quot; height=&quot;173&quot; class=&quot;size-medium wp-image-867&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;figcaption class=&quot;wp-caption-text&quot;&gt;@font-face Generator von Font Squirrel&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Warum ist die Navigation nicht mit CSS ausklappbar, warum nur per Javascript? Wieso kann man die Navi nicht mit der Tastertur bedienen? Es ist zudem nicht notwendig, so viele Grafiken für das visuelle Erscheinungsbild zu nutzen, viele Dinge können mit CSS3 abgedeckt werden. Verläufe und Schatten funktionieren in den allermeisten Browser mittlerweile sehr gut. Die Möglichkeiten habe ich Ende letzten Jahres zusammen mit dem &lt;a href=&quot;https://webstandard.kulando.de/&quot;&gt;Webstandard-Blog&lt;/a&gt; im &lt;a href=&quot;https://maddesigns.de/archiv/&quot;&gt;CSS3-Adventskalender&lt;/a&gt; dargestellt.&lt;/p&gt;
&lt;p&gt;Was ist mit „Progressive enhancement“? &lt;a href=&quot;https://dowebsitesneedtolookexactlythesameineverybrowser.com/&quot;&gt;Muss eine Website in jedem Browser genau gleich aussehen?&lt;/a&gt; Im TYPO3-Backend wird mittlerweile &lt;a href=&quot;https://www.modernizr.com/&quot;&gt;Modernizr&lt;/a&gt; verwendet, warum nicht im neuen TYPO3.org Template?&lt;/p&gt;
&lt;p&gt;Was machen diese leeren DIVs im preview.typo3.org Quelltext eigentlich? -&amp;gt; Schatten! Aha!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- shadow elements --&amp;gt;
&amp;lt;div class=&amp;quot;b-drop-body-l&amp;quot;&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;b-drop-r-tl&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;b-drop-body-b&amp;quot;&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;b-drop-body-r&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Und es gibt noch weitere schöner Fundstücke…&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;aside-shade-head&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;aside-shade-cont&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div class=&amp;quot;aside-shade-foot&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Um aber nicht nur zu meckern, habe ich mir mal die Mühe gemacht, eine Navigationsdemo zu entwickeln wie es mit CSS3 funktionieren könnte (no Javascript):&lt;/p&gt;
&lt;h4 id=&quot;typo3org-relaunch-css3-demo&quot;&gt;&lt;a href=&quot;https://maddesigns.de/typo3-relaunch/&quot;&gt;TYPO3.org relaunch CSS3 Demo&lt;/a&gt;&lt;a class=&quot;header-anchor&quot; href=&quot;#typo3org-relaunch-css3-demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Ich muss allerdings dazu sagen, dass ich die Testsite nicht in allen Browsern getestet hab, dazu blieb nebenher nicht die Zeit, sorry.&lt;/p&gt;
&lt;p&gt;Passend dazu: &lt;a href=&quot;https://www.smashingmagazine.com/2011/04/21/css3-vs-css-a-speed-benchmark/&quot;&gt;CSS3 vs. CSS: A Speed Benchmark&lt;/a&gt; – ein Vergleich auf Smashing Magazine&lt;/p&gt;
&lt;h4 id=&quot;typo3camp-stuttgart&quot;&gt;TYPO3camp Stuttgart&lt;a class=&quot;header-anchor&quot; href=&quot;#typo3camp-stuttgart&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Auf dem &lt;a href=&quot;https://www.typo3camp-stuttgart.de/programm/sessions.html&quot;&gt;TYPO3camp Stuttgart werde ich ein HTML5 tt_news Template&lt;/a&gt; vorstellen, dass dann für HTML5 Webseiten zusammen mit tt_news verwendet werden kann.&lt;/p&gt;
&lt;p&gt;Wie schon eingangs erwähnt, wäre ich gern beim Relaunch dabei gewesen, naja, vielleicht ist ja noch nix zu spät und ich kann hier und da noch helfen…&lt;/p&gt;
&lt;p&gt;Was meint Ihr zur aktuellen Preview?&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Internet Explorer 10 mit CSS3 linear-gradient Support</title>
    <link href="https://maddesigns.de/archiv/internet-explorer-10-mit-css3-linear-gradient-support-847.html" />
    <updated>2011-04-13T08:00:56Z</updated>
    <id>https://maddesigns.de/archiv/internet-explorer-10-mit-css3-linear-gradient-support-847.html</id>
    <content type="html">&lt;p&gt;Microsoft ist aufgewacht und arbeitet kontinuierlich an der Weiterentwicklung des Internet Explorer. Gestern stellten Sie auf der &lt;a href=&quot;https://live.visitmix.com/&quot;&gt;MIX11 Konferenz&lt;/a&gt; in Las Vegas die neue Preview des IE10 vor. Umfangreiche Neuerungen sind bereits integriert.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Ein Highlight ist, dass mit Erscheinen der finalen Version endlich auch der Internet Explorer CSS3-Verläufe unterstützen wird. Nach dem aktuellem W3C Standard ist linear-gradient und radial-gradient in der zum Download frei gegebenen &lt;a href=&quot;https://go.microsoft.com/?linkid=9739661&quot;&gt;Preview des IE10&lt;/a&gt; implementiert.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;background: -ms-linear-gradient (yellow, blue);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Das halbe Dutzend ist also perfekt ;-)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.linear-top {
/* Für WebKit alt (Safari, Chrome, etc.) */
background: -webkit-gradient(linear, left top, left bottom, ⏎
from(#c8482c), to(#fff));

/* Für WebKit neu (Safari, Chrome, etc.) */
background: -webkit-linear-gradient(top, #c8482c, #fff);

/* Für Mozilla/Gecko (Firefox etc) */
background: -moz-linear-gradient(top, #c8482c, #fff);

/* Für Presto (Opera etc) */
background: -o-linear-gradient(top, #c8482c, #fff);

/* NEU - NEU - NEU ab IE10 */
background: -ms-linear-gradient(top, #c8482c, #fff);

/* aktueller W3C working draft */
background: linear-gradient(top, #c8482c, #fff);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Microsoft bietet ein &lt;a href=&quot;https://ie.microsoft.com/testdrive/Graphics/CSSGradientBackgroundMaker/Default.html&quot;&gt;Online-Tool&lt;/a&gt; zum Erstellen der linear-gradients.&lt;/p&gt;
&lt;p&gt;Weitere CSS3-Neuerungen im IE10 sind CSS3 Multi-column Layout, CSS3 Grid Layout, CSS3 Flexible Box Layout, CSS3 Transitions und CSS3 3D Transforms – es bleibt abzuwarten, wie schnell die finale Version veröffentlicht wird. Ich denke dieses Jahr nicht mehr…&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>IE9 mit CSS3 border-radius und linear-gradient Problemen</title>
    <link href="https://maddesigns.de/archiv/ie9-mit-css3-border-radius-und-linear-gradient-problemen-813.html" />
    <updated>2011-03-19T14:55:46Z</updated>
    <id>https://maddesigns.de/archiv/ie9-mit-css3-border-radius-und-linear-gradient-problemen-813.html</id>
    <content type="html">&lt;p&gt;Nach Einführung des IE9 ist es nicht nur &lt;a href=&quot;https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html&quot;&gt;Fritz Weisshart&lt;/a&gt; aufgefallen, dass der IE9 zwar die propritären CSS-Eigenschaft „filter“ zum Erstellen von Verläufen, wie im IE6-8 zwar weiterhin unterstützt, aber diese nicht so funktionieren wie erhofft.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Runde Ecken über border-radius unterstützt der Internet Explorer 9 nun ohne jeglichen Vendor-Präfix.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;border-radius: 20px;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bisherige Internet Explorer konnten wie im &lt;a href=&quot;https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html&quot;&gt;CSS3 Adventskalender 2010 Tag 3&lt;/a&gt; beschrieben per &lt;code&gt;filter&lt;/code&gt; bzw. &lt;code&gt;-ms-filter&lt;/code&gt; auch einfache Verläufe darstellen. Leider unterstützt der IE9 keine Verläufe über CSS3 linear-gradient, sondern nur über Einbindung einer SVG-Grafik. Deshalb müssen ab jetzt SVG-Grafiken erstellt werden, damit im Zusammenspiel mit border-radius auch der IE9 das Design darstellt wie vorgestellt.&lt;/p&gt;
&lt;p&gt;Michael Barrett hat in seinem Blog abouthalf.com das &lt;a href=&quot;https://abouthalf.com/2010/10/25/internet-explorer-9-gradients-with-rounded-corners/&quot;&gt;Problem&lt;/a&gt; ausführlich beschrieben.&lt;/p&gt;
&lt;p&gt;Um das Beispiel des CSS3 Adventskalender 2010 Tag 3 aufzugreifen, sind kleine zusätzliche Änderungen notwendig.&lt;/p&gt;
&lt;h3 id=&quot;svg-sprite-grafik-erstellen&quot;&gt;SVG-Sprite Grafik erstellen&lt;a class=&quot;header-anchor&quot; href=&quot;#svg-sprite-grafik-erstellen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Im Schritt 1 erstellen wir eine SVG-Grafik mit den Farbverläufen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;
&amp;lt;!DOCTYPE svg PUBLIC &amp;quot;-//W3C//DTD SVG 1.1//EN&amp;quot; ⏎
  &amp;quot;https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&amp;quot;&amp;gt; ⏎
&amp;lt;svg width=&amp;quot;100&amp;quot; height=&amp;quot;600&amp;quot; version=&amp;quot;1.1&amp;quot;
xmlns=&amp;quot;https://www.w3.org/2000/svg&amp;quot;&amp;gt;
 &amp;lt;defs&amp;gt;
  &amp;lt;linearGradient id=&amp;quot;linear-top&amp;quot; x1=&amp;quot;0%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;100%&amp;quot;&amp;gt;
   &amp;lt;stop offset=&amp;quot;0%&amp;quot; stop-color=&amp;quot;#C8482C&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
   &amp;lt;stop offset=&amp;quot;100%&amp;quot; stop-color=&amp;quot;#ffffff&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
  &amp;lt;/linearGradient&amp;gt;
  &amp;lt;linearGradient id=&amp;quot;linear-right&amp;quot; x1=&amp;quot;100%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;0%&amp;quot;&amp;gt;
   &amp;lt;stop offset=&amp;quot;0%&amp;quot; stop-color=&amp;quot;#C8482C&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
   &amp;lt;stop offset=&amp;quot;100%&amp;quot; stop-color=&amp;quot;#ffffff&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
  &amp;lt;/linearGradient&amp;gt;
  &amp;lt;linearGradient id=&amp;quot;linear-bottom&amp;quot; x1=&amp;quot;0%&amp;quot; y1=&amp;quot;100%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;0%&amp;quot;&amp;gt;
   &amp;lt;stop offset=&amp;quot;0%&amp;quot; stop-color=&amp;quot;#C8482C&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
   &amp;lt;stop offset=&amp;quot;100%&amp;quot; stop-color=&amp;quot;#ffffff&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
  &amp;lt;/linearGradient&amp;gt;
  &amp;lt;linearGradient id=&amp;quot;linear-left&amp;quot; x1=&amp;quot;0%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;100%&amp;quot;&amp;gt;
   &amp;lt;stop offset=&amp;quot;0%&amp;quot; stop-color=&amp;quot;#C8482C&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
   &amp;lt;stop offset=&amp;quot;100%&amp;quot; stop-color=&amp;quot;#ffffff&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
  &amp;lt;/linearGradient&amp;gt;
  &amp;lt;linearGradient id=&amp;quot;gradient&amp;quot; x1=&amp;quot;0%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;100%&amp;quot;&amp;gt;
   &amp;lt;stop offset=&amp;quot;0%&amp;quot; stop-color=&amp;quot;#E0EDF3&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
   &amp;lt;stop offset=&amp;quot;100%&amp;quot; stop-color=&amp;quot;#30393D&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
  &amp;lt;/linearGradient&amp;gt;
  &amp;lt;linearGradient id=&amp;quot;searchForm&amp;quot; x1=&amp;quot;0%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;100%&amp;quot;&amp;gt;
   &amp;lt;stop offset=&amp;quot;0%&amp;quot; stop-color=&amp;quot;#E0EDF3&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
   &amp;lt;stop offset=&amp;quot;100%&amp;quot; stop-color=&amp;quot;#ffffff&amp;quot; stop-opacity=&amp;quot;1&amp;quot;/&amp;gt;
  &amp;lt;/linearGradient&amp;gt;
 &amp;lt;/defs&amp;gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; ⏎
 fill=&amp;quot;url(#linear-top) rgb(0, 0, 0)&amp;quot;/&amp;gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; ⏎
 fill=&amp;quot;url(#linear-right) rgb(0, 0, 0)&amp;quot;/&amp;gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;200&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; ⏎
 fill=&amp;quot;url(#linear-bottom) rgb(0, 0, 0)&amp;quot;/&amp;gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;300&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; ⏎
 fill=&amp;quot;url(#linear-left) rgb(0, 0, 0)&amp;quot;/&amp;gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;500&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; ⏎
 fill=&amp;quot;url(#gradient) rgb(0, 0, 0)&amp;quot;/&amp;gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;400&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; ⏎
 fill=&amp;quot;url(#searchForm) rgb(0, 0, 0)&amp;quot;/&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/03/gradients.svg&quot;&gt;erstellte SVG-Grafik im Sprite-Verfahren&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;css-anpassen&quot;&gt;CSS anpassen&lt;a class=&quot;header-anchor&quot; href=&quot;#css-anpassen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Im 2. Schritt werden über Conditional Comments für den IE9 spezielle Eigenschaften zugewiesen.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if  ie 9]&amp;gt;
&amp;lt;style type=&amp;quot;text/css&amp;quot; media=&amp;quot;screen&amp;quot;&amp;gt;
.searchForm,
.searchButton,
.linear-top,
.linear-right,
.linear-bottom,
.linear-left,
.gradient {
  filter: none;
  background-image: url(gradients.svg);
  background-size: 100% 600%;
  zoom: 1;
}
&amp;lt;/style&amp;gt;
&amp;lt;![endif]--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Für den IE9 wird die SVG-Grafik als Hintergrund zugewiesen (&lt;code&gt;background-image: url(gradients.svg);&lt;/code&gt;) und die Hintergrundgröße auf 600% Höhe (&lt;code&gt;background-size: 100% 600%;&lt;/code&gt;) ausgedehnt. Das wird durch die generierte Sprite-Grafik nötig (&lt;a href=&quot;https://abouthalf.com/2010/10/25/internet-explorer-9-gradients-with-rounded-corners/&quot;&gt;Michael Barett beschreibt die Vorgehensweise genauer&lt;/a&gt;). Zudem wird die Filter-Eigenschaft deaktiviert.&lt;/p&gt;
&lt;p&gt;Für die einzelnen Elemente, die die SVG zugewiesen bekommen, ist es noch notwendig die &lt;code&gt;background-position&lt;/code&gt; zuzuweisen um den richtigen Teil des Hintergrundes anzuzeigen.&lt;/p&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/03/linear-gradient-beispiel-ie9.html&quot; title=&quot;IE9 mit CSS3 border-radius und linear-gradient Lösung&quot;&gt;CSS3 linear-gradient (Verlauf) IE9 Demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Es bleibt zu hoffen, dass Microsoft dem Internet Explorer, so &lt;a href=&quot;https://maddesigns.de/archiv/css3-gradient-jetzt-auch-in-opera-799.html&quot;&gt;wie Opera&lt;/a&gt; doch noch den aktuellen W3C-Syntax implementiert.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 gradient jetzt auch in Opera</title>
    <link href="https://maddesigns.de/archiv/css3-gradient-jetzt-auch-in-opera-799.html" />
    <updated>2011-03-18T11:57:55Z</updated>
    <id>https://maddesigns.de/archiv/css3-gradient-jetzt-auch-in-opera-799.html</id>
    <content type="html">&lt;p&gt;Gestern wurde mit der &lt;a href=&quot;https://www.zdnet.de/news/wirtschaft_investition_software_beta_von_opera_11_10_mit_erweitertem_speed_dial_erschienen_story-39001022-41550429-1.htm&quot;&gt;Veröffentlichung der Beta von Opera 11.10&lt;/a&gt; der Support von linear-gradient unterstützt.&lt;/p&gt;
&lt;p&gt;Damit reiht sich &lt;a href=&quot;https://dev.opera.com/articles/view/css3-linear-gradients/&quot;&gt;Opera&lt;/a&gt; in die Liste der Browser (z.B. Chrome, Safari, Firefox) die Hintergrundverläufe mit CSS3 unterstützen.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Auch Opera hat wie viele Andere gradient über den Vendor-Präfix implementiert.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;background: -o-linear-gradient (yellow, blue);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Man kann also die Eigenschaften für CSS3 Gradient jetzt wie folgt angeben:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.linear-top {
/* Für WebKit alt (Safari, Chrome, etc.) */
background: -webkit-gradient(linear, left top, left bottom, ⏎
from(#c8482c), to(#fff));

/* Für WebKit neu (Safari, Chrome, etc.) */
background: -webkit-linear-gradient(top, #c8482c, #fff);

/* Für Mozilla/Gecko (Firefox etc) */
background: -moz-linear-gradient(top, #c8482c, #fff);

/* NEU NEU NEU - Für Presto (Opera etc) */
background: -o-linear-gradient(top, #c8482c, #fff);

/* aktueller W3C working draft */
background: linear-gradient(top, #c8482c, #fff);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Leider unterstützt der Anfang der Woche veröffentlichte Internet Explorer 9 kein CSS3 linear-gradient, sondert nur die Möglichkeit über SVG. Wer unbedingt einen einfachen linear-gradient (Verlauf) für Internet-Explorer 6-8 einbinden möchte, dem empfehle ich den Artikel aus dem &lt;a href=&quot;https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html&quot; title=&quot;linear-gradient (Verlauf) für Internet-Explorer 6-8&quot;&gt;CSS3 Adventskalender 2010&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>„CSS &amp; Performance“ Artikel Teil 2</title>
    <link href="https://maddesigns.de/archiv/css-performance-artikel-teil-2-751.html" />
    <updated>2011-02-03T08:25:39Z</updated>
    <id>https://maddesigns.de/archiv/css-performance-artikel-teil-2-751.html</id>
    <content type="html">&lt;p&gt;Beim TYPO3camp 2010 in München hielt ich eine Vortrag zum Thema „CSS &amp;amp; Performance“. Im &lt;a href=&quot;https://maddesigns.de/archiv/css-performance-vortrag-auf-dem-typo3camp-munchen-203.html&quot; title=&quot;CSS &amp;amp; Performance Teil1: CSS Optimierung&quot;&gt;Teil 1&lt;/a&gt; ging es überwiegend um das Optimieren von CSS. Im 2. Teil geht es um die Frontend-Performance, also die Optimierung der Ladezeit.&lt;/p&gt;
&lt;!--more--&gt;
&lt;div class=&quot;prezi-player&quot;&gt;
  &lt;p&gt;
    &lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;h2&gt;
Teil 2: Performance
&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Seit einiger Zeit bezieht Google die &lt;a href=&quot;https://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html&quot;&gt;Ladezeit der Website&lt;/a&gt; in die Berechnung der Suchergebnisposition mit ein. Auch wenn es nur ein kleiner Teil der vielen Faktoren ist, sieht Google den Grund dafür, dass schnelle Webseiten dem User nützlich sind.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Um die Ladezeit zu verbessern kann man nicht nur serverseitig Optimierung, wie Optimierung der Datenbank-Abfragen, verbesserte Funktionsaufrufe der jeweiligen Programmiersprache oder die Serverleistung durch Hardware-Optimierung durchführen, sondern man kann viel mehr beim Laden von Bilder, CSS und Javascript optimieren.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Bilder optimieren
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Für Grafiken sollte man das Bildformat PNG vor GIF bevorzugen, da man PNG besser komprimieren kann und zudem das vielseitigere Format ist. Für Logo-Grafiken oder andere grafische Elemente ist das Format PNG8 mit bis zu 256 Farben (ähnlich GIF) zu verwenden. Möchte man Transparenzen (z.B. weiche Schatten) in Bildern verwenden, ist PNG24 das übliche Format für weboptimierte Bilder. Diese Grafiken werden problemlos in allen modernen Browsern &amp;lt;IE7 unterstützt. JPG sollte man ausschließlich für Fotografien verwenden. Hier muss man abwägen, wie stark die Komprimierung sein soll, je stärker, desto kleiner die Bildgröße. Nach Erstellung der weboptimieren Grafiken durch Photoshop’s Export oder Fireworks sollte man die PNG-Bilder mit einem zusätzlichen Programm optimieren. &lt;a href=&quot;https://de.wikipedia.org/wiki/Pngcrush&quot;&gt;Crushing PNG&lt;/a&gt; heißt die Methode und entfernt unnötige Bilddaten, bzw. komprimiert diese. Das für die Kommandozeile von Linux entwickelte Tool, gibt es mittlerweile auch als Progrämmchen für &lt;a href=&quot;https://imageoptim.pornel.net/&quot;&gt;Mac&lt;/a&gt; oder &lt;a href=&quot;https://psydk.org/PngOptimizer.php&quot;&gt;PC &lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
CSS Sprites
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
CSS Sprite bedeutet in der englischen Sprache Kobold oder Geistwesen und ist der Begriff für eine Grafik, die aus mehreren einzelnen Grafiken zu einer einzigen Grafik zusammengefügt wird. Diese Technik ist nicht neu, denn sie wurde bereits früher beim Erstellen von Computerspielen verwenden, da Grafikspeicher damals noch klein waren und das Nachladen lange dauerte. Auch im Webdesign sind CSS Sprites keine „brandneue“ Technik, sondern wurde bereits im Jahr 2004 von Dave Shea bei A List Apart vorgestellt. Allerdings erst in den letzten Jahren fand man mehr und mehr Websites, die diese Technik nicht zuletzt auch aufgrund der daraus resultierenden verbesserten Ladezeit anwenden. Denn der größte Vorteil von CSS Sprites liegt in der Einsparung von HTTP-Requests, der Reduzierung der Gesamtgröße der Bilder und somit in der Verkürzung der Ladezeit von Webseiten.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Einen umfassenden Artikel von mir gibt es dazu im Webstandard-Blog „&lt;a href=&quot;https://webstandard.kulando.de/post/2010/05/26/css-sprite-ladegeschwindigkeit-optimieren-http-requests-verringern&quot;&gt;CSS Sprite – Ladegeschwindigkeit optimieren und HTTP-Requests verringern&lt;/a&gt;“.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Webseiten die CSS-Sprites einsetzen:&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/e1LthhVsOX-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/e1LthhVsOX-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/e1LthhVsOX-150.png&quot; alt=&quot;google-sprites&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;226&quot;&gt;&lt;/picture&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/qDQHXq00kH-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/qDQHXq00kH-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/qDQHXq00kH-150.png&quot; alt=&quot;amazone-sprites&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;473&quot;&gt;&lt;/picture&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/S8hCDYr7Z7-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/S8hCDYr7Z7-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/S8hCDYr7Z7-150.png&quot; alt=&quot;typo3-sprites&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;159&quot;&gt;&lt;/picture&gt;&lt;br&gt; &lt;br class=&quot;u-clear&quot;&gt;&lt;br&gt; Google, Amazon und selbst TYPO3 setzt seit der Version 4.4 auf Sprites für das Backend
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Rendering optimieren
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Grundsätzlich sind hier die „&lt;a href=&quot;https://developer.yahoo.com/performance/rules.html&quot;&gt;Performance Rules&lt;/a&gt;“ von Yahoo zu nennen. Regeln, die man leicht und ohne zusätzliche Serverstruktur umsetzen kann, sind:&lt;br&gt; – CSS mit &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; in den &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; einbinden&lt;br&gt; – @import vermeiden (&lt;a href=&quot;https://www.stevesouders.com/blog/2009/04/09/dont-use-import/&quot;&gt;https://www.stevesouders.com/blog/2009/04/09/dont-use-import/&lt;/a&gt;)&lt;br&gt; – Javascript vorm schließenden &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; wenn nicht onload-relevant&lt;br&gt; – Wenn JS im Head, dann nach CSS, weil Javascript das Rendering blockiert&lt;br&gt; – Javascript und CSS extern einbinden (sind dann vom Browser cachebar)&lt;br&gt; – Komprimieren und Zusammenfügen&lt;br&gt; – Max 4 Dateien mit &amp;lt; 10kb gleichzeitig, sind schneller als eine große Datei&lt;br&gt; – Mit GZIP komprimiert ausliefern
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Tools
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Standard-Tools für Firebug sind &lt;a href=&quot;https://addons.mozilla.org/de/firefox/addon/yslow/&quot;&gt;Yslow&lt;/a&gt; oder &lt;a href=&quot;https://code.google.com/intl/de-DE/speed/page-speed/&quot;&gt;Pagespeed&lt;/a&gt; die ähnliche Punkte der aktuellen Webseite prüfen.&lt;br&gt; &lt;a href=&quot;https://www.webpagetest.org&quot;&gt;Webpagetest&lt;/a&gt; ist ein Online-Service mit dem man die Performance der Website an unterschiedlichen Server-Standorten der Welt und mit unterschiedlichen Verbindungsgeschwindigkeiten testen kann. Ein weiteres Highlight ist die visuelle Gegenüberstellung eines Aufrufs mehrerer Webseiten. Ein Beispiel wäre der Test für ein Relaunch-Projekt. Ist die aktuelle Entwicklungswebsite online erreichbar, kann man die mit der bestehenden in Puncto Ladegeschwindigkeit gleichzeitig testet. Dabei wird ein Video generiert, dass deutliche Unterschiede zeigt (sofern vorhanden).
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Weitere Spielwiesen:
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;a href=&quot;https://websiteoptimization.com/services/analyze/&quot;&gt;https://websiteoptimization.com/services/analyze/&lt;/a&gt;&lt;br&gt; &lt;a href=&quot;https://tools.pingdom.com/&quot;&gt;https://tools.pingdom.com/&lt;/a&gt;&lt;br&gt; &lt;a href=&quot;https://www.httpwatch.com/&quot;&gt;https://www.httpwatch.com/&lt;/a&gt;&lt;br&gt; &lt;a href=&quot;https://stevesouders.com/cuzillion/&quot;&gt;https://stevesouders.com/cuzillion/&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
empfohlene Bücher
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;a href=&quot;https://www.amazon.de/High-Performance-Websites-Steve-Souders/dp/389721850X/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/tzkI-kok-3-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/tzkI-kok-3-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/tzkI-kok-3-150.png&quot; alt=&quot;High Performance Websites (auch in deutsch)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;150&quot;&gt;&lt;/picture&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;a href=&quot;https://www.amazon.de/Even-Faster-Web-Sites-Performance/dp/0596522304&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/lFKyP6mDM3-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/lFKyP6mDM3-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/lFKyP6mDM3-150.png&quot; alt=&quot;Even Faster Web Sites (englisch)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;150&quot;&gt;&lt;/picture&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;a href=&quot;https://www.amazon.de/Website-Optimization-Andrew-B-King/dp/0596515081/&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/h5FN_j6z1o-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/h5FN_j6z1o-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/h5FN_j6z1o-150.png&quot; alt=&quot;Website Optimization (englisch)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;150&quot;&gt;&lt;/picture&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;br class=&quot;u-clear&quot;&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>WebKit ändert CSS3 Gradient Support und orientiert sich am Mozilla Syntax</title>
    <link href="https://maddesigns.de/archiv/webkit-andert-css3-gradient-support-und-orientiert-sich-am-mozilla-syntax-739.html" />
    <updated>2011-01-18T08:31:11Z</updated>
    <id>https://maddesigns.de/archiv/webkit-andert-css3-gradient-support-und-orientiert-sich-am-mozilla-syntax-739.html</id>
    <content type="html">&lt;p&gt;Letzte Woche änderte das Webkit-Team die Syntax für CSS3 linear-gradient und radial-gradient und orientiert sich jetzt an der vom &lt;a href=&quot;https://dev.w3.org/csswg/css3-images/#gradients&quot;&gt;W3C&lt;/a&gt; favourisierten Syntax von Mozilla. Die Integration ist bereits in die Nightly Builds eingeflossen und wird sicherlich demnächst auch in die Webkit-basierenden Browser, wie Chrome oder Safari integriert.&lt;/p&gt;
&lt;p&gt;Bisher hatte man recht viel Schreibarbeit, wenn man CSS3 Verläufe browserübergreifend einsetzen wollte. Im &lt;a href=&quot;https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html&quot;&gt;CSS3 Adventskalender Tag3&lt;/a&gt; kann man die derzeitige Anweisungen cross-browser-fähig nachlesen. Zukünftig wird &lt;a href=&quot;https://webkit.org/blog/1424/css3-gradients/&quot;&gt;Webkit&lt;/a&gt; als Übergang auch weiterhin die bestehende Syntax unterstützen.&lt;/p&gt;
&lt;p&gt;Man kann also die Eigenschaften für CSS3 Gradient wie folgt angeben:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.linear-top {
/* Für WebKit alt (Safari, Chrome, etc.) */
background: -webkit-gradient(linear, left top, left bottom, ⏎
from(#c8482c), to(#fff));

/* NEU NEU NEU - WebKit (Safari, Chrome, etc.) */
background: -webkit-linear-gradient(top, #c8482c, #fff);

/* Für Mozilla/Gecko (Firefox etc) */
background: -moz-linear-gradient(top, #c8482c, #fff);

/* aktueller W3C working draft */
background: linear-gradient(top, #c8482c, #fff);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ein richtiger Schritt und auch ein Ereignis, bei dem man sieht, dass CSS3 noch in der Entwicklung ist. Trotzdem empfehle ich heute schon CSS3 einzusetzen, wo es geht.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Fun with Border-Radius – CSS Sprechblasen – CSS3 Adventskalender Tag 23</title>
    <link href="https://maddesigns.de/archiv/fun-with-border-radius-css-sprechblasen-css3-adventskalender-tag-23-692.html" />
    <updated>2010-12-23T08:42:06Z</updated>
    <id>https://maddesigns.de/archiv/fun-with-border-radius-css-sprechblasen-css3-adventskalender-tag-23-692.html</id>
    <content type="html">&lt;p&gt;Am vorletztem Tag des CSS3 Adventskalender will ich nochmal ein paar interessante Einsatzmöglichkeiten von border-radius zeigen. Nicht zuletzt auch durch das Gewinnspiel „&lt;a href=&quot;https://maddesigns.de/archiv/verlosung-1-jahr-webstandards-magazin-abonnement-623.html&quot; title=&quot;Verlosung: 1 Jahr Webstandards Magazin Abonnement&quot;&gt;Gewinne ein Jahres-Abo des Webstandards Magazin&lt;/a&gt;“ hat sich border-radius als das CSS3-Feature herauskristalisiert, auch die Zugriffszahlen zeigen das.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;facebook-modal-window-lightbox&quot;&gt;Facebook Modal-Window (Lightbox)&lt;a class=&quot;header-anchor&quot; href=&quot;#facebook-modal-window-lightbox&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Das Facebook-Modal (oder Lightbox/PopUp Window) dürfte jeder kennen. Nachdem Heiko im &lt;a href=&quot;https://webstandard.kulando.de/&quot;&gt;Webstandard-Blog&lt;/a&gt; gestern im CSS3-Adventskalender das &lt;a href=&quot;https://webstandard.kulando.de/post/2010/12/22/hsla-color-module-rgba-alternative-css3-adventskalender-tag-22&quot;&gt;Color-Modul HLSA als RGBA-Alternative&lt;/a&gt; vorgestellt hat, kommt heute aber nochmal RGBA zum Einsatz.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.facebook.com/maddesigns.webdeveloper&quot; title=&quot;maddesigns Facebook Fan-Page&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/wglfV6-k4A-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/wglfV6-k4A-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/wglfV6-k4A-521.png&quot; alt=&quot;facebook-border-radius&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;155&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;small&gt;Screenshot der Facebook-Lightbox auf der &lt;a href=&quot;https://www.facebook.com/maddesigns.webdeveloper&quot;&gt;maddesigns Facebook Fanpage&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
&lt;h4 id=&quot;ein-einaches-css-modal-window&quot;&gt;Ein einaches CSS-Modal-Window&lt;a class=&quot;header-anchor&quot; href=&quot;#ein-einaches-css-modal-window&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Das HTML für unser Lightbox-Fenster:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;block&amp;quot;&amp;gt;
  &amp;lt;p&amp;gt;Lorem ipsum ...&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;Curabitur consequat...&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;Senectus dui l...&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;Quis consectetuer ...&amp;lt;/p&amp;gt;
  &amp;lt;p class=&amp;quot;facebook-modal&amp;quot;&amp;gt;Lorem ipsum dolor ...&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In diesem einfachen Beispiel gibt es einen Paragraphen mit der Klasse facebook-modal, die durch CSS position: absolute mittig über den Textblock positioniert wird.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.facebook-modal {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -150px;
  margin-top: -100px;
  width: 300px;
  height: 200px;

  background-color: #fff;
  padding: 15px;
  border: 10px solid rgba(0,0,0,0.5);
  /* halb-transparenter Border durch RGBA-Wert 0.5 */

  -moz-border-radius: 10px;
  border-radius: 10px;

  -moz-background-clip: padding;      /* Firefox 1.0-3.6 */
  -webkit-background-clip: padding-box;  /* Safari, Chrome */
  background-clip: padding-box;  /* Firefox 4.0+, Opera */
}
.block {position: relative}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Der Border-Radius beträgt in dem Beispiel 10px, also genauso viel wie die Starke des Rahmens – so wird nur der Rahmen abgerundet und nicht die Content-Box. Damit die Hintergrundfarbe nicht in den Border ragt, wird zusätzlich noch die Eigenschaft background-clip verwendet.&lt;/p&gt;
&lt;h3 id=&quot;css-sprechblasen&quot;&gt;CSS-Sprechblasen&lt;a class=&quot;header-anchor&quot; href=&quot;#css-sprechblasen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/css3bubbles-beispiel1.html&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/7BqMUrTMDT-150.avif&quot; sizes=&quot;150px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/7BqMUrTMDT-150.webp&quot; sizes=&quot;150px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/7BqMUrTMDT-150.png&quot; alt=&quot;css3bubbles-small&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;150&quot; height=&quot;93&quot;&gt;&lt;/picture&gt;&lt;/a&gt;Ein tolles Experiment mit CSS3 Border-Radius hat Nicolas Gallagher (&lt;a href=&quot;https://twitter.com/necolas&quot; title=&quot;Nicolas Gallagher on Twitter&quot;&gt;@necolas&lt;/a&gt;) in seinem Blog vorgestellt. Er hat unzählige Varianten von CSS Sprechblasen (Speech Bubbles) kreiert. Zwei Beispiele habe ich mal in der &lt;a href=&quot;https://maddesigns.de/img/2010/12/css3bubbles-beispiel1.html&quot;&gt;Demo-Datei „Fun with Border-Radius“&lt;/a&gt; übernommen.&lt;/p&gt;
&lt;h3 id=&quot;css3-badge&quot;&gt;CSS3-Badge&lt;a class=&quot;header-anchor&quot; href=&quot;#css3-badge&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ein schönes Beispiel für den Einsatz von CSS3 kann man auf der Website des diesjährigen SXSW Beercamp sehen. Dort ist auch ein schönes CSS3-Badge, das ich als Beispiel hier mal nutze.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Das HTML-Gerüst:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;css3badge&amp;quot;&amp;gt;
  &amp;lt;p&amp;gt;
    &amp;lt;a href=&amp;quot;https://webstandard.kulando.de/&amp;quot;&amp;gt;
      CSS3 Adventskalender &amp;lt;br /&amp;gt;
      Gewinnspiel Tag 24
    &amp;lt;/a&amp;gt;
  &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.css3badge {
  -moz-border-radius: 140px / 75px;
  border-radius: 140px / 75px;

  -webkit-box-shadow: -8px 4px  rgba(197, 81, 17,.6);
  -moz-box-shadow: -8px 4px  rgba(197, 81, 17,.6);
  box-shadow: -8px 4px  rgba(197, 81, 17,.6);

  -moz-transform: rotate(-14deg);
  -webkit-transform: rotate(-14deg);
  -o-transform: rotate(-14deg);
  transform: rotate(-14deg);

  background-color: rgba(197, 81, 17,1);
  color: #fff;
  height: 100px;
  padding: 20px 0;
  width: 260px;
}
.css3badge p {
  font-family: &#39;Lobster&#39;, Helvetica, Arial, sans-serif;
  font-size: 20px;
  padding: 5px 0 0 50px;
}

.css3badge a {
  color: #fff;
  text-decoration: none;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Das Live-Ergebnis:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;css3badge&quot;&gt;
  &lt;p&gt;
    &lt;a title=&quot;CSS3 Adventskalender Tag 24 - Gewinnspiel&quot; href=&quot;https://webstandard.kulando.de/&quot;&gt;CSS3 Adventskalender&lt;br&gt; Gewinnspiel Tag 24&lt;/a&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Wie ihr sehen könnt, gibt es am letzten Tag des CSS3 Adventskalender von maddesigns und dem Webstandard Blog nochmal ein tolles Gewinnspiel für Euch, also morgen nochmal beim &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;CSS3 Adventskalender Tag 24 - Gewinnspiel&quot;&gt;CSS3 Adventskalender Gewinnspiel Tag 24&lt;/a&gt; teilnehmen!&lt;/p&gt;
&lt;h3 id=&quot;links&quot;&gt;Links:&lt;a class=&quot;header-anchor&quot; href=&quot;#links&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://nicolasgallagher.com/pure-css-speech-bubbles/&quot;&gt;Pure CSS speech bubbles&lt;/a&gt; – CSS-Sprechblasen Experiment von Nicolas Gallagher&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://sxsw.beercamp.com/&quot;&gt;BEERCAMP – SXSW 2010 Edition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/css3bubbles-beispiel1.html&quot;&gt;Fun with Border-Radius Demo&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 transitions – CSS Animation – CSS3 Adventskalender Tag 21</title>
    <link href="https://maddesigns.de/archiv/css3-transitions-css-animation-css3-adventskalender-tag-21-661.html" />
    <updated>2010-12-21T07:30:47Z</updated>
    <id>https://maddesigns.de/archiv/css3-transitions-css-animation-css3-adventskalender-tag-21-661.html</id>
    <content type="html">&lt;p&gt;CSS3 Transitions und CSS3 Animations sind ein sehr umfassendes Thema, mit dem man glatt noch einen Monat füllen könnte. Gleichzeitig revolutiert es CSS, da zukünftig Animationen und Elementveränderungen ohne Javascript möglich sind. Zum Einstieg werde ich ein kleines Beispiel für CSS3 Transitions zeigen.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h4 id=&quot;transitions-eigenschaften&quot;&gt;Transitions-Eigenschaften&lt;a class=&quot;header-anchor&quot; href=&quot;#transitions-eigenschaften&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;transition-property&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;welche Eigenschaft wird verändert, z.B. background-color, opacity, … oder all – also alle Eigenschaften gleichzeitig&lt;/p&gt;
&lt;p&gt;&lt;code&gt;transition-duration&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Die Dauer der Veränderung – Angabe einer Zeit für alle oder kommagetrennt je „transition-property“ Eigenschaft&lt;/p&gt;
&lt;p&gt;&lt;code&gt;transition-timing-function&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Bézierkurve á la jQuery Animation, also ob die Animation gleichmäßig abläuft linear oder ease-Kurven.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;transition-delay&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Eine Verzögerung der Veränderung, sozusagen bis die Animation beginnt&lt;/p&gt;
&lt;h4 id=&quot;cross-browser-css3-transitions&quot;&gt;Cross-Browser CSS3 Transitions&lt;a class=&quot;header-anchor&quot; href=&quot;#cross-browser-css3-transitions&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;a {
   color: #000;
   -webkit-transition: color .5s ease-out;
   -moz-transition: color .5s ease-out;
   -o-transition: color .5s ease-out;
   transition: color .5s ease-out;
}
a:hover {
  color: #f00;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Die Shorthand-Schreibweise von transition ist ähnlich der Border-Shorthand Schreibweise, also hintereinander geschrieben mit Leerzeichen, im Beispiel oben wird also die Farbe jedes Links bei Mouseover von schwarz (#000) zu rot (#f00) verändert. Genau 0,5 Sekunden lang wobei die Transition am Anfang stärker als am Ende der 0,5s ist (ease-out).&lt;/p&gt;
&lt;h3 id=&quot;beispiel-social-icon-links&quot;&gt;Beispiel: Social-Icon Links&lt;a class=&quot;header-anchor&quot; href=&quot;#beispiel-social-icon-links&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/FwCLBriMlT-273.avif&quot; sizes=&quot;(min-width: 48em) 273px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/FwCLBriMlT-273.webp&quot; sizes=&quot;(min-width: 48em) 273px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/FwCLBriMlT-273.png&quot; alt=&quot;css3-transitions&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;273&quot; height=&quot;98&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Rechts in der Sidebar habe ich einige Social-Icons eingebaut und mit ein paar Links belegt. Bei Mouseover wird Tool-Tip-mäßig das „Linkziel“ eingeblendet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Das HTML dazu&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;ul class=&amp;quot;social&amp;quot;&amp;gt;
   &amp;lt;li class=&amp;quot;tweet&amp;quot;&amp;gt;
      &amp;lt;a href=&amp;quot;https://twitter.com/maddesigns&amp;quot;&amp;gt;
         &amp;lt;strong&amp;gt;Twitter&amp;lt;/strong&amp;gt;
      &amp;lt;/a&amp;gt;
   &amp;lt;/li&amp;gt;
   &amp;lt;li class=&amp;quot;facebook&amp;quot;&amp;gt;
      &amp;lt;a href=&amp;quot;https://www.facebook.com/maddesigns.webdeveloper&amp;quot;&amp;gt;
         &amp;lt;strong&amp;gt;Facebook&amp;lt;/strong&amp;gt;
      &amp;lt;/a&amp;gt;
   &amp;lt;/li&amp;gt;
   ...
&amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.social {list-style: none outside none;}
.social li {float:left; margin: 0 4px 0 0 }
.social li a {
  display:block;
  width:48px;
  height:48px;
  position:relative;
}
.social li a strong {
  position:absolute;
  left:15px;
  top:-1px;
  text-shadow:1px 1px 0 rgba(0, 0, 0, 0.75);
  background-color:rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px;

  -moz-border-radius:3px;
  -webkit-border-radius:3px;
  border-radius:3px;

  -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

li.facebook { background-image:url(&amp;quot;facebook-48x48.png&amp;quot;); }
li.tweet { background-image:url(&amp;quot;twitter-48x48.png&amp;quot;); }
li.tumblr { background-image:url(&amp;quot;tumblr-48x48.png&amp;quot;); }
li.xing { background-image:url(&amp;quot;xing-48x48.png&amp;quot;); }
li.rss { background-image:url(&amp;quot;feed-48x48.png&amp;quot;); }

.social:hover li { opacity:0.2; }

.social li {
  -webkit-transition-property: opacity;
  -webkit-transition-duration: 500ms;
  -moz-transition-property: opacity;
  -moz-transition-duration: 500ms;
  -o-transition-property: opacity;
  -o-transition-duration: 500ms;
  transition-property: opacity;
  transition-duration: 500ms;
}
.social li a strong { opacity:0;
  -webkit-transition-property: opacity, top;
  -webkit-transition-duration: 300ms;
  -moz-transition-property: opacity, top;
  -moz-transition-duration: 300ms;
  -o-transition-property: opacity, top;
  -o-transition-duration: 300ms;
  transition-property: opacity, top;
  transition-duration: 300ms;
}

.social li:hover { opacity:1; }
.social li:hover a strong { opacity:1; top:-20px; }
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;links&quot;&gt;Links:&lt;a class=&quot;header-anchor&quot; href=&quot;#links&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://developer.mozilla.org/en/CSS/CSS_transitions#Properties_that_can_be_animated&quot;&gt;Eigenschaften die animiert werden können (Firefox)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://demo.marcofolio.net/social_css3_display/&quot;&gt;Social Icons Display&lt;/a&gt; (Original Tutorial &amp;amp; jQuery Fallback von Marcofolio.net)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.alistapart.com/articles/understanding-css3-transitions&quot;&gt;Understanding CSS3 Transitions&lt;/a&gt; Kapitel 2 aus dem Buch „CSS3 for Web Designers“&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://farukat.es/&quot;&gt;Faruk Ateş Website&lt;/a&gt; Social Links Leiste rechts&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.webdesignerdepot.com/2010/01/css-transitions-101/&quot;&gt;CSS Transitions 101&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Supported in Safari 3.1+, Chrome 3+, Opera 10.5+ und Firefox ab der Version 4&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.png&quot; alt=&quot;browserChoice-no-IE&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 22 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; mit „HSLA“ weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>selectivizr – CSS3 selectors for IE – CSS3 Adventskalender Tag 19</title>
    <link href="https://maddesigns.de/archiv/selectivizr-css3-selectors-for-ie-css3-adventskalender-tag-19-644.html" />
    <updated>2010-12-19T08:00:45Z</updated>
    <id>https://maddesigns.de/archiv/selectivizr-css3-selectors-for-ie-css3-adventskalender-tag-19-644.html</id>
    <content type="html">&lt;p&gt;Heute ein kurzer Tipp am Sonntag: &lt;strong&gt;selectivizr – CSS3 selectors for IE&lt;/strong&gt; – ist das hilfreichste, was ich zum Thema CSS3 &amp;amp; Internet Explorer 6-8 empfehlen kann. Selectivizr ist eine Javascript-Bibliothek, die CSS3-Selektoren erkennt und für IE6-8 übersetzt. Als Basis muss eine andere JS-Bibliothek wie jQuery, MooTools, Dojo, Prototype, etc. eingesetzt werden.&lt;/p&gt;
&lt;img src=&quot;https://maddesigns.de/img/2010/12/logo-selectivizr.png&quot; alt=&quot;Selectivizr Logo&quot; width=&quot;431&quot; height=&quot;102&quot; class=&quot;aligncenter size-full wp-image-646&quot;&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;strong&gt;Einbindung im Head-Bereich der Webseite:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;[JS library]&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;!--[if (gte IE 6)&amp;amp;(lte IE 8)]&amp;gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;selectivizr.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;noscript&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;[fallback css]&amp;quot; /&amp;gt;
  &amp;lt;/noscript&amp;gt;
&amp;lt;![endif]--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Bei der Einbindung ist folgendes zu beachten:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Selectivizr erkennt automatisch die beste JavaScript-Bibliothek für den Job. Wenn bereits eine Bibliothek eingesetzt wird und es unterstützt nicht die Selektoren die sie brauchen – einfach eine andere einbinden.&lt;/li&gt;
&lt;li&gt;Stylesheets müssen mit &amp;lt;link /&amp;gt;
eingefügt werden, Styles in &amp;lt;style&amp;gt; Tags werden nicht interpretiert.&lt;/li&gt;
&lt;li&gt;Stylesheets müssen auf der gleichen Domain wie die Seite gehostet werden. Ebenso funktionieren keine lokalen Dateien.&lt;/li&gt;
&lt;li&gt;Die Emulation ist nicht dynamisch. Sobald der Stile angewendet werden, werden sie fix, Änderungen am DOM werden nicht erneut interpretiert.&lt;/li&gt;
&lt;li&gt;Webseiten mit Selectivizr IE müssen im Standards-Modus ausgeführt werden – stellen Sie sicher, dass eine DTD am Anfang Ihrer Seiten ist.&lt;/li&gt;
&lt;li&gt;Wenn JavaScript nicht verfügbar ist, können Sie eine Fallback-Stylesheet verwenden. Fügen Sie es einfach im &amp;lt;noscript&amp;gt; Bereich, wie im Beispiel-Code oben ein.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Tag 13: &lt;a href=&quot;https://maddesigns.de/img/2010/12/nth-child-beispiel1.html&quot;&gt;:nth-child() Pseudo-Selektor Demo im IE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tag 15: &lt;a href=&quot;https://maddesigns.de/img/2010/12/css3-table-beispiel1.html&quot;&gt;CSS3 Tabellen-Übersicht im IE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 20 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; mit „CSS3 Transitions“ weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Verlosung: 1 Jahr Webstandards Magazin Abonnement</title>
    <link href="https://maddesigns.de/archiv/verlosung-1-jahr-webstandards-magazin-abonnement-623.html" />
    <updated>2010-12-16T23:02:23Z</updated>
    <id>https://maddesigns.de/archiv/verlosung-1-jahr-webstandards-magazin-abonnement-623.html</id>
    <content type="html">&lt;p&gt;CSS3 Adventskalender Tag 17 und eine weitere Knüller-Verlosung!&lt;/p&gt;
&lt;p&gt;Heute kommt das neue „&lt;a href=&quot;https://www.webstandards-magazin.de/&quot; title=&quot;Das Magazin für professionelle Webentwicklung, Interfacedesign, Web-Applikationen, Usability und Accessibility&quot;&gt;Webstandards Magazin&lt;/a&gt;“ in den Handel und &lt;strong&gt;wir verlosen ein Jahres-Abo unter allen, die uns in den Kommentaren mitteilen, welches CSS3-Feature ihr liebstes ist&lt;/strong&gt;.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;a href=&quot;https://www.webstandards-magazin.de/&quot; title=&quot;Das Magazin für professionelle Webentwicklung, Interfacedesign, Web-Applikationen, Usability und Accessibility&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/2010/12/titel-0810-big1.jpg&quot; alt=&quot;titel-0810-big&quot; width=&quot;420&quot; height=&quot;589&quot; class=&quot;aligncenter size-full wp-image-624&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ganz besonders möchte ich auf meinen Artikel „&lt;strong&gt;CSS3 goes IE&lt;/strong&gt; – Wie Sie CSS3 kompatible Webseiten für den Internet Explorer erstellen, ohne zu verzweifeln.“ hinweisen! ;)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;weitere Themen im Heft:&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;ausgabe-082010-kunst-kommerz&quot;&gt;Ausgabe 08/2010: Kunst &amp;amp; Kommerz&lt;a class=&quot;header-anchor&quot; href=&quot;#ausgabe-082010-kunst-kommerz&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;feature&quot;&gt;Feature&lt;a class=&quot;header-anchor&quot; href=&quot;#feature&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Kunst &amp;amp; Kommerz&lt;/strong&gt;&lt;br&gt;
Unser Schwerpunkt beleuchtet Kunst- und Kommerzformen im Internet und nennt viele praktische Beispiele.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Museales Netzwerken&lt;/strong&gt;&lt;br&gt;
Interview über Kunst, Social Web und Internet mit dem Direktor des NRW-Forums Düsseldorf, Werner Lippert.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;e-business-trends&quot;&gt;E-Business + Trends&lt;a class=&quot;header-anchor&quot; href=&quot;#e-business-trends&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Künstlersozialkasse&lt;/strong&gt;&lt;br&gt;
Umfassender Blick auf Sinn und Unsinn der gesetzlichen sozialen Absicherung von selbständigen Künstlern und Publizisten.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firefox verliert Zielgruppe&lt;/strong&gt;&lt;br&gt;
Läuft der Mozilla-Browser in die Microsoft-Falle? Wir zeigen, warum Chrome, Safari und Co. aufholen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Webstandards als Qualitätsfaktor&lt;/strong&gt;&lt;br&gt;
Erfahren Sie, warum standardkonforme Anzeigen im Google-Ranking weiter vorne stehen und wie Sie davon profitieren.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Erfolgreiche Social-Mediakampagne&lt;/strong&gt;&lt;br&gt;
Es muss nicht immer Facebook sein: Blick über die Schulter der Golden Toast trnd-Kampagne.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flattr im Detail&lt;/strong&gt;&lt;br&gt;
Socialpayment honoriert Leistungen von Webworkern. Wir stellen den populären Micropayment-Service vor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Von Bloggern und Künstlern&lt;/strong&gt;&lt;br&gt;
Interview mit Simon Birkenfeld, dem Pressereferenten der STROKE.ARTFAIR über Kunst und Blogging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Online-PR als Marketinginstrument&lt;/strong&gt;&lt;br&gt;
Wie Sie die Möglichkeiten des Web 2.0 zur Selbstdarstellung nutzen und neue Kunden gewinnen.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;freelancer&quot;&gt;Freelancer&lt;a class=&quot;header-anchor&quot; href=&quot;#freelancer&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Freelancer im Fokus&lt;/strong&gt;&lt;br&gt;
Erhalten Sie einen Einblick in die Alltags- und Arbeitswelt von Popeia Herzog.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;webdesign&quot;&gt;Webdesign&lt;a class=&quot;header-anchor&quot; href=&quot;#webdesign&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Wettbewerbe / Demoszene&lt;/strong&gt;&lt;br&gt;
Komprimierte Kunstwerke sind die Stars der Demoszene. Wir stellen Wettbewerbe und Beispiele vor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make-or-Buy-Entscheidungen im Design&lt;/strong&gt;&lt;br&gt;
Lesen Sie, wann sich Outsourcing im Design lohnt und warum selbst machen nicht immer eine Lösung ist.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-Screen-Design leicht gemacht&lt;/strong&gt;&lt;br&gt;
Mit Dreamweaver CS5 mediengerecht gestalten. Wir stellen neue Funktionen und Features vor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web ist nicht Print&lt;/strong&gt;&lt;br&gt;
Was Gestalter für Web und Print beim Screendesign beachten sollten.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A Website named Desire&lt;/strong&gt;&lt;br&gt;
Schauen und staunen: Isometrische Darstellung über den Produktionsprozess einer Webseite.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;accessibility-usability&quot;&gt;Accessibility + Usability&lt;a class=&quot;header-anchor&quot; href=&quot;#accessibility-usability&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mach’s mobil – aber richtig&lt;/strong&gt;&lt;br&gt;
Tipps und Tricks zur Erstellung zugänglicher und performanter Webseiten für mobile Endgeräte.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internationalisierung und Lokalisierung&lt;/strong&gt;&lt;br&gt;
Webseiten für mehrere Sprachen vorbereiten: Vom Encoding zu kulturellen Unterschieden.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;YouTube &amp;amp; Flash mit Resize-Funktion&lt;/strong&gt;&lt;br&gt;
Lernen Sie, wie Sie Flash-Filme bei Vergrößerung mitwachsen lassen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rapid-Prototyping in der Praxis&lt;/strong&gt;&lt;br&gt;
Nutzertests mit Axure: Wir durften Pixelpark bei einem Projekt über die Schulter schauen.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;web-anwendungen&quot;&gt;Web-Anwendungen&lt;a class=&quot;header-anchor&quot; href=&quot;#web-anwendungen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Feature-Detection&lt;/strong&gt;&lt;br&gt;
Browserweichen waren gestern: Mit Modernizr und enhanceJS moderne Webseiten bauen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Online Screencasting-Tools&lt;/strong&gt;&lt;br&gt;
Vorgestellt: Verschiedene Werkzeuge zur Online-Erstellung von Videos direkt vom Bildschirm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GeoCoding mit MooGeo&lt;/strong&gt;&lt;br&gt;
Anleitung: Geodaten besser nutzen und darstellen mit der MooTools-Erweiterung MooGeo.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Widgets für WolframAlpha&lt;/strong&gt;&lt;br&gt;
Wissen ist Macht: In fünf Minuten zum eigenen Widget für die Wissensmaschine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drupal 7&lt;/strong&gt;&lt;br&gt;
Anfang 2011 erscheint die neue Drupal-Version – wir stellen Ihnen die Neuerungen vor.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;szene-aktuell-hotspots&quot;&gt;Szene // Aktuell // Hotspots&lt;a class=&quot;header-anchor&quot; href=&quot;#szene-aktuell-hotspots&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pfefferles OpenWeb&lt;/strong&gt;&lt;br&gt;
Matthias Pfefferles Blickwinkel auf die Welt der offenen Standards.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 Adventskalender Tag 16</title>
    <link href="https://maddesigns.de/archiv/css3-adventskalender-tag-16-618.html" />
    <updated>2010-12-16T07:00:27Z</updated>
    <id>https://maddesigns.de/archiv/css3-adventskalender-tag-16-618.html</id>
    <content type="html">&lt;p&gt;…im Webstandard Blog zum Thema “&lt;a href=&quot;https://webstandard.kulando.de/post/2010/12/16/css-2d-transform-scale-rotate-skrew-css3-adventskalender-tag-16&quot;&gt;CSS 2D Transform – Scale, Rotate, Skrew – CSS3 Adventskalender Tag 16&lt;/a&gt;”!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>CSS3 Tabellen-Übersicht – CSS3 Adventskalender Tag 15</title>
    <link href="https://maddesigns.de/archiv/css3-tabellen-ubersicht-css3-adventskalender-tag-15-594.html" />
    <updated>2010-12-15T07:00:32Z</updated>
    <id>https://maddesigns.de/archiv/css3-tabellen-ubersicht-css3-adventskalender-tag-15-594.html</id>
    <content type="html">&lt;p&gt;Heute am Tag 15 des CSS3 Adventskalender von &lt;a href=&quot;https://maddesigns.de/&quot;&gt;maddesigns&lt;/a&gt; und dem &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;CSS3 Adventskalender im Webstandard Blog&quot;&gt;Webstandard Blog&lt;/a&gt; geht es weniger um ein Tutorial, sondern eher um ein umfangreiches Beispiel der bisher vorgestellten Eigenschaften. Als HTML-Basis erstellen wir eine Tabelle mit einer Übersicht zum „CSS3 Browser Support“.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;strong&gt;HTML-Tabelle:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;
  &amp;lt;thead&amp;gt;
  &amp;lt;tr&amp;gt;
  	&amp;lt;td&amp;gt;Browser:&amp;lt;/td&amp;gt;
  	&amp;lt;td class=&amp;quot;chrome&amp;quot;&amp;gt;Chrome&amp;lt;/td&amp;gt;
  	&amp;lt;td class=&amp;quot;firefox&amp;quot;&amp;gt;Firefox&amp;lt;/td&amp;gt;
  	&amp;lt;td class=&amp;quot;opera&amp;quot;&amp;gt;Opera&amp;lt;/td&amp;gt;
  	&amp;lt;td class=&amp;quot;safari&amp;quot;&amp;gt;Safari&amp;lt;/td&amp;gt;
  	&amp;lt;td class=&amp;quot;ie&amp;quot;&amp;gt;Internet Explorer&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
&amp;lt;/thead&amp;gt;
&amp;lt;tfoot&amp;gt;
  &amp;lt;tr&amp;gt;
  	&amp;lt;td&amp;gt;Version:&amp;lt;/td&amp;gt;
  	&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt;
  	&amp;lt;td&amp;gt;3.6&amp;lt;/td&amp;gt;
  	&amp;lt;td&amp;gt;10.63&amp;lt;/td&amp;gt;
  	&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;
  	&amp;lt;td&amp;gt;9beta&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
&amp;lt;/tfoot&amp;gt;
&amp;lt;tbody&amp;gt;
  &amp;lt;tr&amp;gt;
    &amp;lt;th&amp;gt;&amp;lt;a href=&amp;quot;&amp;quot;&amp;gt;border-radius (runde Ecken)&amp;lt;/a&amp;gt;&amp;lt;/th&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;span&amp;gt;Ja&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;span&amp;gt;Ja&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;span&amp;gt;Ja&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;span&amp;gt;Ja&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;span&amp;gt;Ja&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
  ...
  &amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;table {
  border-collapse: separate;
  border-spacing: 0;
  font: normal 18px/1 &#39;Yanone Kaffeesatz&#39;, sans-serif;
}
th {
  padding: 10px;
  text-align: left;
}
td {
  padding: 10px;
  text-align: center;
}
td span {
  background: transparent url(tick.png) no-repeat center;
  display: block;
  text-indent: -9999px;
}
td.no-support span {
  background: transparent url(cross.png) no-repeat center;
}
.chrome, .firefox, .opera, .safari, .ie {
  background: transparent url(browser.jpg) no-repeat;
  padding: 105px 0 10px;
  vertical-align: top;
  width: 115px;
}
.chrome {background-position: 2px 0}
.firefox {background-position: -103px 0}
.opera {background-position: -205px 0}
.safari {background-position: -307px 0}
.ie {background-position: -410px 0}

thead td, tfoot td {font-weight: bold}
thead td:first-child {
  text-align: right;
  padding: 105px 10px 10px;
}
tfoot td:first-child {
  text-align: right;
  padding: 5px 10px;
}


tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th{
  background-color:#555;
  color:#f0f0f0;
  border-bottom:1px solid #666;
  background:-webkit-gradient(
      linear,
      left bottom,
      left top,
      color-stop(0.39, rgb(105,105,105)),
      color-stop(0.7, rgb(145,145,145))
      );
  background:-moz-linear-gradient(
      center bottom,
      rgb(105,105,105) 39%,
      rgb(145,145,145) 70%
      );
  text-shadow:1px 1px 1px #000;
}
tbody tr:nth-child(odd):hover td,
tbody tr:nth-child(odd):hover th {
  background-color:#555;
  color:#f0f0f0;
  border-bottom:1px solid #444;
  background:-webkit-gradient(
      linear,
      left bottom,
      left top,
      color-stop(0.39, rgb(105,105,105)),
      color-stop(0.7, rgb(155,155,155))
      );
  background:-moz-linear-gradient(
      center bottom,
      rgb(105,105,105) 39%,
      rgb(155,155,155) 70%
      );
  text-shadow:1px 1px 1px #000;
}
tbody tr:nth-child(odd) a,
tbody tr:nth-child(odd) a:hover {
  color:#f0f0f0;
  text-decoration: none;
}
tbody tr:nth-child(even) td,
tbody tr:nth-child(even) th {
  background-color:#444;
  color:#444;
  border-bottom:1px solid #777;
  background:-webkit-gradient(
      linear,
      left bottom,
      left top,
      color-stop(0.39, rgb(189,189,189)),
      color-stop(0.7, rgb(224,224,224))
      );
  background:-moz-linear-gradient(
      center bottom,
      rgb(189,189,189) 39%,
      rgb(224,224,224) 70%
      );
  text-shadow:1px 1px 1px #fff;
}
tbody tr:nth-child(even):hover td,
tbody tr:nth-child(even):hover th {
  background-color:#444;
  color:#444;
  border-bottom:1px solid #777;
  background:-webkit-gradient(
      linear,
      left bottom,
      left top,
      color-stop(0.39, rgb(199,199,199)),
      color-stop(0.7, rgb(244,244,244))
      );
  background:-moz-linear-gradient(
      center bottom,
      rgb(199,199,199) 39%,
      rgb(244,244,244) 70%
      );
  text-shadow:1px 1px 1px #fff;
}
tbody tr:nth-child(even) a,
tbody tr:nth-child(even) a:hover {
  color:#444;
  text-decoration: none;
}
tbody td {
  border-left: 1px dotted #666;
}

tbody tr:first-child th {
-moz-border-radius: 15px 0 0 0;
border-radius: 15px 0 0 0;
}
tbody tr:first-child td:last-child {
-moz-border-radius: 0 15px 0 0;
border-radius: 0 15px 0 0;
}
tbody tr:last-child th {
-moz-border-radius: 0 0 0 15px;
border-radius: 0 0 0 15px;
}
tbody tr:last-child td:last-child {
-moz-border-radius: 0 0 15px 0;
border-radius: 0 0 15px 0;
}
tbody tr:last-child td,
tbody tr:last-child th,
tbody tr:last-child:hover td,
tbody tr:last-child:hover th {
  border-bottom: none;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Screenshot:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/css3-table-beispiel1.html&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/2010/12/css3-table.jpg&quot; alt=&quot;CSS3-Tabelle&quot; width=&quot;521&quot; height=&quot;521&quot; class=&quot;aligncenter size-full wp-image-611&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/css3-table-beispiel1.html&quot; title=&quot;CSS3 table Übersichtstabelle demo&quot;&gt;Demo-Datei zu CSS3 Tabelle aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 16 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; mit „CSS3 2D Transforms“ weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>:nth-child() Pseudo-Selektor – CSS3 Adventskalender Tag 13</title>
    <link href="https://maddesigns.de/archiv/nth-child-pseudo-selektor-css3-adventskalender-tag-13-550.html" />
    <updated>2010-12-13T00:01:04Z</updated>
    <id>https://maddesigns.de/archiv/nth-child-pseudo-selektor-css3-adventskalender-tag-13-550.html</id>
    <content type="html">&lt;p&gt;Der Pseudo-Selektor &lt;code&gt;:nth-child()&lt;/code&gt; ist sehr hilfreich, wenn man mehrere gleiche Elemente unterschiedlich gestalten möchte. Die genaue Syntax lautet &lt;code&gt;E:nth-child(a&lt;/code&gt;&lt;em&gt;n&lt;/em&gt; &lt;code&gt;+ b) {}&lt;/code&gt;. Zudem kommen lang vermisste Keywords zum Einsatz, die für das Gestalten von Datentabellen häufig gebraucht werden: &lt;code&gt;odd&lt;/code&gt; &amp;amp; &lt;code&gt;even&lt;/code&gt;.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Ein einfaches Beispiel anhand einer Tabelle:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markup&quot;&gt;&amp;lt;table&amp;gt;
  &amp;lt;tr&amp;gt;
    &amp;lt;td&amp;gt;eins&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;zwei&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
  &amp;lt;tr&amp;gt;
    &amp;lt;td&amp;gt;drei&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;vier&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
  &amp;lt;tr&amp;gt;
    &amp;lt;td&amp;gt;fünf&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;sechs&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;tr:nth-child(odd) {background-color: #ccc}
tr:nth-child(even) {background-color: #ddd}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Screenshot&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/mg0bSayUZE-518.avif&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/mg0bSayUZE-518.webp&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/mg0bSayUZE-518.png&quot; alt=&quot;nth-child-odd-table&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;518&quot; height=&quot;151&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;In diesem typischen Beispiel musste man bisher jede 2. Tabellen-Zeilen (dynamisch generiert) mit einer Klasse versehen um diese Zeilen dann anders zu stylen. Durch den Pseudo-Selektor :nth-child(even) wird das bald nicht mehr nötig. Es wird also jede 2. Zeile mit der Hintergrundfarbe #ddd eingefärbt.&lt;/p&gt;
&lt;p&gt;Das gleiche Ergebnis erreicht man mit &lt;code&gt;tr:nth-child(2n) {background-color: #ddd}&lt;/code&gt; – hier mal rot gefärbt (&lt;code&gt;tr:nth-child(2n) {background-color: red}&lt;/code&gt;):&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/U-PayUtl7b-518.avif&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/U-PayUtl7b-518.webp&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/U-PayUtl7b-518.png&quot; alt=&quot;nth-child-odd-table2&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;518&quot; height=&quot;151&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;jede-3-zeile-beginnend-ab-der-4-zeile-mit-der-hintergrundfarbe-rot&quot;&gt;Jede 3. Zeile beginnend ab der 4. Zeile mit der Hintergrundfarbe rot&lt;a class=&quot;header-anchor&quot; href=&quot;#jede-3-zeile-beginnend-ab-der-4-zeile-mit-der-hintergrundfarbe-rot&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;tr:nth-child(3n+4) {background-color: red}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/zh6lb5qzDK-518.avif&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/zh6lb5qzDK-518.webp&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/zh6lb5qzDK-518.png&quot; alt=&quot;nth-child-odd-table3&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;518&quot; height=&quot;271&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;layout-einer-news-seite-mit-4-spalten-und-2-top-news&quot;&gt;Layout einer News-Seite mit 4 Spalten und 2 Top-News:&lt;a class=&quot;header-anchor&quot; href=&quot;#layout-einer-news-seite-mit-4-spalten-und-2-top-news&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/sbcbvObFPh-440.avif&quot; sizes=&quot;(min-width: 48em) 440px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/sbcbvObFPh-440.webp&quot; sizes=&quot;(min-width: 48em) 440px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/sbcbvObFPh-440.png&quot; alt=&quot;nth-child-sample&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;440&quot; height=&quot;453&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* News als Listeneinträge */
ul {
  list-style: none;
}
li {
  border: 2px solid black;
  float:left;
  height: 300px;
  padding:0;
  margin: 10px;
  width: 200px;
}
li:nth-child(1), li:nth-child(2) {height: 250px; width: 424px}
li:nth-child(4n+3) {clear: left}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alle Listen-Elemente werden grundsätzlich erstmal gleich gestaltet. Dann wird die Breite und Höhe des erste und zweite Element verändert – den Top-News wird mehr Platz eingeräumt. Zusätzlich wird jedes vierte Element beginnend ab Element 3 gecleart.&lt;/p&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/nth-child-beispiel1.html&quot;&gt;Demo-Datei zum Pseudo-Selektor :nth-child() aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Safari 3.1+, Chrome 2+, Firefox 3.5+, Opera 9.5+ und IE9beta.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/kU8S59Ru2--521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 14 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>:last-child / :first-child Selektoren – CSS3 Adventskalender Tag 11</title>
    <link href="https://maddesigns.de/archiv/last-child-first-child-selektoren-css3-adventskalender-tag-11-514.html" />
    <updated>2010-12-11T00:28:43Z</updated>
    <id>https://maddesigns.de/archiv/last-child-first-child-selektoren-css3-adventskalender-tag-11-514.html</id>
    <content type="html">&lt;p&gt;Im Tag 11 des CSS3 Adventskalender betrachten wir die Struktur-Pseudoklasse &lt;code&gt;:first-child&lt;/code&gt; und &lt;code&gt;:last-child&lt;/code&gt; näher.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Als Beispiel erstellen wir eine einfache ungeordneten Liste mit drei Listenpunkten:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;ul&amp;gt;
  &amp;lt;li&amp;gt;eins&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;zwei&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;drei&amp;lt;/li&amp;gt;
&amp;lt;ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;li {
  color: red;
  font-weight: bold
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/t8Rn_yyv9_-129.avif&quot; sizes=&quot;129px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/t8Rn_yyv9_-129.webp&quot; sizes=&quot;129px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/t8Rn_yyv9_-129.png&quot; alt=&quot;list1&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;129&quot; height=&quot;78&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Selektion des ersten Kindelements der Liste&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;li:first-child {
  color: black
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/hs6nY2kuNn-129.avif&quot; sizes=&quot;129px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/hs6nY2kuNn-129.webp&quot; sizes=&quot;129px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/hs6nY2kuNn-129.png&quot; alt=&quot;list2&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;129&quot; height=&quot;78&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Selektion des letzten Kindelements der Liste&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;li:last-child {
  color: #ffdc00
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/COIhpYP90B-129.avif&quot; sizes=&quot;129px&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/COIhpYP90B-129.webp&quot; sizes=&quot;129px&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/COIhpYP90B-129.png&quot; alt=&quot;list3&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;129&quot; height=&quot;78&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;definition&quot;&gt;Definition&lt;a class=&quot;header-anchor&quot; href=&quot;#definition&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;li:first-child&lt;/code&gt; – bedeutet das erstes Kind seines Elternelements ul wird selektiert&lt;/li&gt;
&lt;li&gt;&lt;code&gt;li:last-child&lt;/code&gt; – bedeutet das letzte Kind seines Elternelements ul wird selektiert&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Alle modernen Browser (inkl. IE9 beta) unterstützen die CSS3 Pseudo-Klasse :last-child.&lt;/p&gt;
&lt;p&gt;Die Auswahl des ersten Kindelements mit &lt;code&gt;:first-child&lt;/code&gt; wird bereits mit CSS2.1 &lt;strong&gt;ab IE7&lt;/strong&gt; unterstützt!&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/kU8S59Ru2--521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/kU8S59Ru2--521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Dadurch, dass der Pseudoselektor &lt;code&gt;:first-child&lt;/code&gt; bereits seit der Version 7 des Internet Explorer verwendet werden kann, würde ich browserübergreifen aktuell nur diese Möglichkeit wählen. Als Beispiel habe ich eine News-Liste erstellt, bei der die Listenpunkte durch Striche in der Grafikvorlage getrennt wurden. Man könnte meinen, dass jeder Listenpunkt ein Strich folgt (&lt;code&gt;border-bottom&lt;/code&gt;), nur nicht nach dem letzten News-Punkt. Da könnte man auf die Idee kommen den CSS3 Pseudo-Selektor &lt;code&gt;:last-child&lt;/code&gt; zu verwenden. Das das erst im IE9 funktioniert, sollte man die Logik einfach umkehren um Browser ab IE7 zu unterstützen. Bedeutet also, dass jeder News-Listenpunkt einen &lt;code&gt;border-top&lt;/code&gt; erhält, und nur der erste eben nicht.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/first-child-last-child-beispiel11.html&quot;&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/gxSfpQkb0M-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/gxSfpQkb0M-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/gxSfpQkb0M-521.png&quot; alt=&quot;first-child-last-child-beispiel&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;292&quot;&gt;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/first-child-last-child-beispiel11.html&quot; title=&quot;first-child und last-child CSS3 Selektoren&quot;&gt;Demo-Datei zu :first-child &amp;amp; :last-child aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 12 geht es um &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; um &lt;a href=&quot;https://webstandard.kulando.de/post/2010/12/12/media-queries-css-beispiel-css3-adventskalender-tag-12&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Media-Queries&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Teaserboxen komplett ohne Bilder – CSS3 Adventskalender Tag 9</title>
    <link href="https://maddesigns.de/archiv/teaserboxen-komplett-ohne-bilder-css3-adventskalender-tag-9-489.html" />
    <updated>2010-12-09T07:59:15Z</updated>
    <id>https://maddesigns.de/archiv/teaserboxen-komplett-ohne-bilder-css3-adventskalender-tag-9-489.html</id>
    <content type="html">&lt;p&gt;Heute im CSS3 Adventskalender mal ein Tutorial „revised“. Bereits im Mai 2010 habe ich zu linear-gradient den Artikel &lt;a href=&quot;https://blog.marit.ag/2010/05/04/teaserboxen-mit-verlauf-ohne-bilder-css3-linear-gradient/&quot;&gt;„Teaserboxen mit Verlauf ohne Bilder (CSS3 linear-gradient)“&lt;/a&gt; geschrieben und gezeigt, welche Möglichkeiten uns CSS3 heute schon bietet. Dabei habe ich versucht eine Designvorgabe komplett mit CSS3 umzusetzen und bin zu einem akzeptablen Ergebnis gekommen. So konnte ich den Einsatz von 2 Grafiken / 2 http-Requests mit insgesamt 2kb auf 1 Grafik / 1 Request mit 0,2kb reduzieren und habe gleichzeitig auch das Ergebnis gänzlich ohne Bilder gezeigt. Leider musste ich dabei auf eine grafische Feinheit verzichten (das kleine Pfeilsymbol/Dreieck)&lt;/p&gt;
&lt;p&gt;Das zum Anlass genommen, habe ich das Tutorial jetzt erweitert und die Vorlage aus Photoshop 1:1 in CSS3 erstellt.&lt;/p&gt;
&lt;!--more--&gt;
&lt;h3 id=&quot;der-vergleich-photoshop-vs-css3&quot;&gt;Der Vergleich: Photoshop vs. CSS3&lt;a class=&quot;header-anchor&quot; href=&quot;#der-vergleich-photoshop-vs-css3&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/hJAqy3dL2w-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/hJAqy3dL2w-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/hJAqy3dL2w-521.png&quot; alt=&quot;teaserboxen-vergleich-css3&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;300&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Das Ergebnis kann sich durchaus sehen lassen.&lt;/p&gt;
&lt;p&gt;Mitte des Jahres hatte ich für das Pfeilsymbol noch keine Lösung, mittlerweile habe ich allerdings ein Tutorial gefunden, dass die Problematik beschreibt und löst.&lt;/p&gt;
&lt;p&gt;Der Trick wird über die Pseudo-Klassen &lt;code&gt;:before&lt;/code&gt; und &lt;code&gt;:after&lt;/code&gt; erzeugt. Die Pseudo-Klasse :after sollte dem Webworker schon etwas sagen, da sie beim bekannten „&lt;strong&gt;Clearfix&lt;/strong&gt;“ zum automatischen clearen ohne zusätzliches HTML verwendet wird. Beim Clearfix-Trick wird am Ende per CSS ein Content generiert, der in dem Fall nicht sichtbar ist.&lt;/p&gt;
&lt;p&gt;Das machen wir uns zu nutze und generieren ebenfalls Inhalt über die Eigenschaft &lt;code&gt;content&lt;/code&gt;, der zwar keine Höhe und Breite hat (also &lt;code&gt;width:0; height:0;&lt;/code&gt;) aber einen Rahmen über &lt;code&gt;border&lt;/code&gt;. Dadurch entsteht ein dreieckiger Border!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.css-block h4:before, .css-block h4:after {
        content: &amp;quot;&#92;0020&amp;quot;; display: block;
        border-color: #2b4c6b transparent transparent;
        border-style:solid;
        border-width:7px;
        width:0;
        height:0;
        position: absolute;
        bottom: -15px;
        left: 30px;
        z-index: 6;
}
.css-block h4:before {
        border-color: #ffffff transparent transparent;
        border-style:solid;
        border-width:9px;
        bottom: -19px;
        left: 28px;
        z-index: 5
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jetzt werden die generierten Inhalte noch positioniert und fertig ist der CSS-Pfeil.&lt;/p&gt;
&lt;p&gt;Abschließend habe ich den Schatten (der im Marit Blog CSS3 Tutorial noch ein richtiger Box-Shadow war) über den gleichen „Trick“ erzeugt, also ohne zusätzliches Markup. Allerdings ist es wie in der Photoshop-Vorlage eher ein Verlauf, deshalb kommt auch hier wieder &lt;code&gt;linear-gradient&lt;/code&gt; zum Einsatz.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.css-block:after {
  content: &amp;quot;&#92;0020&amp;quot;;
  display: block;
  position: absolute;
  bottom: -24px;
  left: 0;
  width: 218px;
  height: 30px;
  z-index: -2;
  background: -moz-linear-gradient(top,
              #ffffff 0%,
              #efefef 25%,
              #e0e0e0 30%,
              #f3f3f3 40%,
              #fff 100%);
  background: -webkit-gradient(linear,
              left top, left bottom,
              color-stop(0, #fff),
              color-stop(0.25, #efefef),
              color-stop(0.3, #e0e0e0),
              color-stop(0.4, #f3f3f3),
              color-stop(1, #fff));
  background: linear-gradient(top,
              #ffffff 0%,
              #efefef 25%,
              #e0e0e0 30%,
              #f3f3f3 40%,
              #fff 100%);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/teaserboxen-beispiel1.html&quot; title=&quot;CSS3 Teaserboxen ohne Bilder&quot;&gt;Demo-Datei zu CSS3 Teaserboxen aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Der Einsatz von verschiedenen CSS3-Eigenschaften wird unterschiedlich gut unterstützt. Wie schon im linear-gradient Tutorial beschrieben unterstützen Opera und IE9 die Generierung eines Verlaufs über SVG, IE6-8 leider nur einen einfachen Verlauf von Farbe A nach Farbe B. Runde Ecken werden Im Internet Explorer ebenfalls nicht unterstützt. Die CSS-Pseudoklasse :before und :after werden seit IE8 unterstützt, bringt uns aber zum Gesamtergebnis nicht weiter… deshalb unterstützen bislang nur Safari 4+, Chrome 2+, Firefox 3.6+ die Technik vollständig.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/A7QJETurQ7-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/A7QJETurQ7-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/A7QJETurQ7-521.png&quot; alt=&quot;browserChoice-no-ie-opera&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;link-tipp&quot;&gt;Link-Tipp:&lt;a class=&quot;header-anchor&quot; href=&quot;#link-tipp&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.dinnermint.org/css/creating-triangles-in-css/&quot;&gt;Creating Triangles in CSS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 10 geht es um &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; um &lt;a href=&quot;https://webstandard.kulando.de/post/2010/12/10/multi-column-mehrspaltiges-layout-css3-adventskalender-tag-10&quot;&gt;Multi-Column Layout&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>text-shadow – Text-Effekte – CSS3 Adventskalender Tag 7</title>
    <link href="https://maddesigns.de/archiv/text-shadow-text-effekte-css3-adventskalender-tag-7-450.html" />
    <updated>2010-12-06T23:13:40Z</updated>
    <id>https://maddesigns.de/archiv/text-shadow-text-effekte-css3-adventskalender-tag-7-450.html</id>
    <content type="html">&lt;p&gt;Wie schon im &lt;a href=&quot;https://maddesigns.de/archiv/box-shadow-schatten-css3-adventskalender-tag-5-413.html&quot;&gt;CSS3 Adventskalender Tag 5 über box-shadow (Schatten)&lt;/a&gt; beschrieben, ist die Syntax zwischen &lt;code&gt;text-shadow&lt;/code&gt; und &lt;code&gt;box-shadow&lt;/code&gt; gleich.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.text-shadow {
	text-shadow: 2px 2px 5px #999;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;!--more--&gt;
&lt;p&gt;Ein paar Live-Demos:&lt;/p&gt;
&lt;p style=&quot;font-size: 3em; font-weight: bold; text-align: center; text-shadow: 2px 2px 3px #999&quot;&gt;
  text-shadow
&lt;/p&gt;
&lt;p style=&quot;color: #fff; font-size: 3em; font-weight: bold; text-align: center; text-shadow: 0px 0px 5px #900&quot;&gt;
  text-shadow
&lt;/p&gt;
&lt;p style=&quot;background-color: #666; color: #fff; font-size: 13px; padding: 1em; text-align: center; text-shadow: 1px 1px 1px #000&quot;&gt;
  bei kleiner Schrift
&lt;/p&gt;
&lt;p&gt;Das Positive an der Eigenschaft: alle Browser unterstützen sie, sogar ohne Vendor-Prefix. Das Negative: der Internet-Explorer gar nicht (auch der IE9 beta nicht) &lt;strong&gt;update:&lt;/strong&gt; mit der filter-Eigenschaft „DropShadow“ kann man einige Text-Effekte wie in der Demo unten gezeigt auch im IE6-8 umsetzen.&lt;/p&gt;
&lt;h2 id=&quot;x-3d-text-mit-text-schadow&quot;&gt;3D-Text mit Text-Schadow&lt;a class=&quot;header-anchor&quot; href=&quot;#x-3d-text-mit-text-schadow&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Einen CSS 3D-Text kann man mit mehreren kommagetrennten Schatten erreichen, hier ein Screenshot:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/kjrvw3G9Lw-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/kjrvw3G9Lw-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/kjrvw3G9Lw-521.png&quot; alt=&quot;3d-tex-shadow&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;121&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;background&amp;quot;&amp;gt;
  &amp;lt;p class=&amp;quot;text-shadow3d&amp;quot;&amp;gt;Beispiel 3&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.background {
  background-color: #000;
  color: #fff;
  font-size: 7em;
  text-transform: uppercase;
}
.text-shadow3d {
  text-shadow:
1px 1px #fe4902,
2px 2px #fe4902,
3px 3px #fe4902,
4px 4px #fe4902,
5px 5px #fe4902,
6px 6px #fe4902,
7px 7px #fe4902,
8px 8px #fe4902;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;weitere-text-effekt-demos&quot;&gt;weitere Text-Effekt Demos&lt;a class=&quot;header-anchor&quot; href=&quot;#weitere-text-effekt-demos&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/text-shadow-beispiel1.html&quot; title=&quot;CSS3 text-shadow Effekte&quot;&gt;Demo-Datei zu CSS3 text-shadow (Drop-Schatten) aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update: &lt;a href=&quot;https://maddesigns.de/img/2010/12/text-shadow-beispiel2.html&quot;&gt;text-shadow für Internet Explorer&lt;/a&gt; mit filter: DropShadow&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;wird ohne Prefix unterstützt seit Safari 1.1+, Chrome 2+, Firefox 3.1+, and Opera 9.5+.&lt;/p&gt;
&lt;p&gt;&lt;del datetime=&quot;2010-12-07T21:40:00+00:00&quot;&gt;allerdings in keinem Internet Explorer… (die Filter Shadow, DropShadow, oder Glow sind meiner Meinung hier keine Alternative)&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/5G2mI-fq-5-521.png&quot; alt=&quot;browserChoice-no-IE&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 8 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; um @font-face – Custom Fonts weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>box-shadow (Schatten) – CSS3 Adventskalender Tag 5</title>
    <link href="https://maddesigns.de/archiv/box-shadow-schatten-css3-adventskalender-tag-5-413.html" />
    <updated>2010-12-05T02:38:39Z</updated>
    <id>https://maddesigns.de/archiv/box-shadow-schatten-css3-adventskalender-tag-5-413.html</id>
    <content type="html">&lt;p&gt;Einen Schatten hinter Elemente zu generieren unterstützen heutzutage alle moderneren Browser, selbst für den Internet Explorer 6-8 kann man einen Schatten zaubern. Wie schon im &lt;a href=&quot;https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html&quot;&gt;CSS3 Adventskalender Tag 3 – linear-gradient (Hintergrundverlauf)&lt;/a&gt; beschrieben, kommt auch hier wieder eine proprietäre CSS-Eigenschaft &lt;code&gt;filter&lt;/code&gt; des IE zum Einsatz.&lt;/p&gt;
&lt;p&gt;Die CSS3-Eigenschaft orientiert sich am Syntax des &lt;code&gt;text-shadow&lt;/code&gt;. Angegeben wird der Versatz auf x- und y-Achse, der Blur-Faktor sowie die Farbe. Auch hier kann man mit Transparenzen, also einem Alphawert arbeiten. Der Versatz kann auch negative Werte annehmen, der Schatten wird dann in die andere Richtung generiert.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/d8finy8iap-470.avif&quot; sizes=&quot;(min-width: 48em) 470px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/d8finy8iap-470.webp&quot; sizes=&quot;(min-width: 48em) 470px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/d8finy8iap-470.png&quot; alt=&quot;css3-box-shadow-syntax&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;470&quot; height=&quot;353&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.box_shadow {
  -moz-box-shadow: 5px 5px 5px #e2e2e2; /* FF3.5+ */
  -webkit-box-shadow: 5px 5px 5px #e2e2e2;/*Saf3+, Chr*/
  box-shadow: 5px 5px 5px #e2e2e2; /*Op10.5, IE 9, FF4*/
  filter:progid:DXImageTransform.Microsoft.Shadow  ⏎
  (color=#e2e2e2, Direction=135, Strength=5); /* IE6-7 */
  -ms-filter:&amp;quot;progid:DXImageTransform.Microsoft.Shadow  ⏎
  (color=#e2e2e2, Direction=135, Strength=5)&amp;quot;; /* IE8 */
  zoom:1; /* trigger hasLayout */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Zudem ist es möglich kommagetrennt mehrere Schatten anzugeben:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-moz-box-shadow : 0 1px 3px rgba(0, 0, 0, .8),   ⏎
0 3px 9px rgba(0, 0, 0, .2);
-webkit-box-shadow : 0 1px 3px rgba(0, 0, 0, .8),   ⏎
0 3px 9px rgba(0, 0, 0, .2);
box-shadow : 0 1px 3px rgba(0, 0, 0, .8),   ⏎
0 3px 9px rgba(0, 0, 0, .2);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;praktisches-beispiel&quot;&gt;praktisches Beispiel:&lt;a class=&quot;header-anchor&quot; href=&quot;#praktisches-beispiel&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Suchformular Screenshot:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/8Hma96Mg5Z-233.avif&quot; sizes=&quot;(min-width: 48em) 233px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/8Hma96Mg5Z-233.webp&quot; sizes=&quot;(min-width: 48em) 233px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/8Hma96Mg5Z-233.png&quot; alt=&quot;box-shadow-sample&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;233&quot; height=&quot;42&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;IE-Ansicht (6-8):&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/ZMzZjkY_1K-233.avif&quot; sizes=&quot;(min-width: 48em) 233px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/ZMzZjkY_1K-233.webp&quot; sizes=&quot;(min-width: 48em) 233px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/ZMzZjkY_1K-233.png&quot; alt=&quot;box-shadow-sample-ie&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;233&quot; height=&quot;42&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.searchForm {
/* Beispiel-Code von Tag 1 */
...

background: -webkit-gradient(linear, left top, left bottom,   ⏎
from(#E0EDF3), to(#ffffff));
background: -moz-linear-gradient(top, #E0EDF3, #ffffff);
filter: progid:DXImageTransform.Microsoft.gradient  ⏎
(startColorstr=#E0EDF3, endColorstr=#ffffff)
progid:DXImageTransform.Microsoft.Shadow  ⏎
(color=#30393D, Direction=135, Strength=5);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient  ⏎
(startColorstr=#E0EDF3, endColorstr=#ffffff)
progid:DXImageTransform.Microsoft.Shadow
(color=#30393D, Direction=135, Strength=5)&amp;quot;;

-moz-box-shadow: 3px 3px 5px #30393D;
-webkit-box-shadow: 3px 3px 5px #30393D;
box-shadow: 3px 3px 5px #30393D;
}
.searchField {
/* Beispiel-Code von Tag 1 */
...

-moz-box-shadow: inset 2px 2px 3px #30393D;
-webkit-box-shadow: inset 2px 2px 3px #30393D;
box-shadow: inset 2px 2px 3px #30393D;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In dem praktischen Beispiel ist der Schatten im input-Feld „searchfield“ nicht hinter dem Feld, also unten rechts, sondern innerhalb, oben links. Diese Ausrichtung wird durch das Wort &lt;code&gt;inset&lt;/code&gt; festgelegt. Mehrer Filter-Eigenschaften für die IE6-8 werden einfach hintereinander geschrieben.&lt;/p&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/box-shadow-beispiel1.html&quot; title=&quot;CSS3 box-shadow demo&quot;&gt;Demo-Datei zu CSS3 box-shadow (Schatten) aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Supported in Safari 3+, Chrome 3+, Firefox 3.5+, Opera 10.5+, IE 6-8 (filter), IE9 Beta.&lt;/p&gt;
&lt;p&gt;Opera, IE9 und Firefox ab der Version 4 brauchen keinen Prefix mehr.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 6 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; mit „Text-Overflow, das Auslassungszeichen …“ weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>linear-gradient (Verlauf) – CSS3 Adventskalender Tag 3</title>
    <link href="https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html" />
    <updated>2010-12-02T23:00:18Z</updated>
    <id>https://maddesigns.de/archiv/linear-gradient-verlauf-css3-adventskalender-tag-3-363.html</id>
    <content type="html">&lt;p&gt;Einen einfachen Farbverlauf für Hintergünde in CSS3 zu erstellen bedarf schon etwas Schreibarbeit… Als Webkit 2008 begann die Eigenschaft umzusetzen, orientierten sie sich an der Spezifikation für &lt;code&gt;Canvas&lt;/code&gt;. Mozilla entwarf daraufhin einen einfacheren Syntax und dieser Syntax ist derzeit auch der empfohlene des W3C. Bisher ist der Syntax nicht angeglichen.&lt;/p&gt;
&lt;p&gt;Als Farbwerte können definierte Farbnamen, Hexadezimalwerte, RGB und HSL, oder RGBa und HSLa verwendet werden (aber was das alles bedeutet, zeigen wir in einem anderen Adventskalender Türchen). Jetzt erstmal ein Code-Beispiel:&lt;/p&gt;
&lt;!--more--&gt;
&lt;pre&gt;&lt;code&gt;linear-gradient(yellow, blue);
linear-gradient(top, yellow, blue);
linear-gradient(bottom, blue, yellow);
linear-gradient(-90deg, yellow, blue);
linear-gradient(270deg, yellow, blue);
linear-gradient(top, yellow 0%, blue 100%);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Grundsätzlich sind 3 Werte wichtig:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Wert: Beginnpunkt des Verlaufs / Gradzahl (also Richtung)&lt;/li&gt;
&lt;li&gt;erste Farbe (ab Start)&lt;/li&gt;
&lt;li&gt;zweite Farbe (bis Ende)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Für die verschiedenen Browser übersetzt, bedeutet das dann folgendes.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.linear-top {
/* Für WebKit (Safari, Chrome, etc.) */
background: -webkit-gradient(linear, left top, left bottom, ⏎
from(#c8482c), to(#fff));
/* Für Mozilla/Gecko (Firefox etc) */
background: -moz-linear-gradient(top, #c8482c, #fff);
/* aktueller W3C working draft */
background: linear-gradient(top, #c8482c, #fff);

/* Für Internet Explorer 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=0, startColorstr=#c8482c, endColorstr=#ffffff);
zoom: 1;
/* Für Internet Explorer 8 */
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=0, startColorstr=#c8482c, endColorstr=#ffffff)&amp;quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ja, auch der Internet Explorer kann einfache Farbverläufe. Über die Filter-Eigenschaft kann ein Farbverlauf auch im IE6-IE8 sichtbar gemacht werden. Verlauf mit 4 verschiedenen Richtungen:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/ANepEmGY9F-500.avif&quot; sizes=&quot;(min-width: 48em) 500px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/ANepEmGY9F-500.webp&quot; sizes=&quot;(min-width: 48em) 500px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/ANepEmGY9F-500.png&quot; alt=&quot;linear-gradients&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;500&quot; height=&quot;121&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Und der Quellcode der verschiedenen Richtungen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.linear-right {
background: -webkit-gradient(linear, right top, left top, ⏎
from(#c8482c), to(#fff));
background: -moz-linear-gradient(right, #c8482c, #fff);
background: linear-gradient(right, #c8482c, #fff);

filter: progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=1, startColorstr=#ffffff, endColorstr=#c8482c);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=1, startColorstr=#ffffff, endColorstr=#c8482c)&amp;quot;;
zoom: 1;
}

.linear-bottom {
background: -webkit-gradient(linear, left bottom, left top, ⏎
from(#c8482c), to(#fff));
background: -moz-linear-gradient(bottom, #c8482c, #fff);
background: linear-gradient(bottom, #c8482c, #fff);

filter: progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=0, startColorstr=#ffffff, endColorstr=#c8482c);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=0, startColorstr=#ffffff, endColorstr=#c8482c)&amp;quot;;
zoom: 1;
}

.linear-left {
background: -webkit-gradient(linear, left top, right top, ⏎
from(#c8482c), to(#fff));
background: -moz-linear-gradient(left, #c8482c, #fff);
background: linear-gradient(left, #c8482c, #fff);

filter: progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=1, startColorstr=#c8482c, endColorstr=#ffffff);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient⏎
(GradientType=1, startColorstr=#c8482c, endColorstr=#ffffff)&amp;quot;;
zoom: 1;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;praktisches-beispiel&quot;&gt;praktisches Beispiel:&lt;a class=&quot;header-anchor&quot; href=&quot;#praktisches-beispiel&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Suchformular Screenshot:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/RdftFNPyiR-223.avif&quot; sizes=&quot;(min-width: 48em) 223px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/RdftFNPyiR-223.webp&quot; sizes=&quot;(min-width: 48em) 223px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/RdftFNPyiR-223.png&quot; alt=&quot;linear-gradient-sample&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;223&quot; height=&quot;32&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;IE-Ansicht (6-8):&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/ND-FhY5kGg-223.avif&quot; sizes=&quot;(min-width: 48em) 223px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/ND-FhY5kGg-223.webp&quot; sizes=&quot;(min-width: 48em) 223px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/ND-FhY5kGg-223.png&quot; alt=&quot;linear-gradient-sample-ie&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;223&quot; height=&quot;32&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.searchForm {
/* Beispiel-Code von Tag 1 */
...

background: -webkit-gradient(linear, left top, left bottom,  ⏎
from(#E0EDF3), to(#ffffff));
background: -moz-linear-gradient(top, #E0EDF3, #ffffff);
background: linear-gradient(top, #E0EDF3, #ffffff);
filter: progid:DXImageTransform.Microsoft.gradient ⏎
(startColorstr=#E0EDF3, endColorstr=#ffffff);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient ⏎
(startColorstr=#E0EDF3, endColorstr=#ffffff)&amp;quot;;
}
.searchButton {
background-color: #30393D;
border: none;
color: #FFF;
padding: 1px 4px;
margin-left: -5px;
height: 23px;
width: 68px;
vertical-align: middle;

-moz-border-radius: 0 20px 20px 0;
-webkit-border-radius: 0 20px 20px 0;
border-radius: 0 20px 20px 0;

background: -webkit-gradient(linear, left top, left bottom,  ⏎
from(#56666d), to(#30393D));
background: -moz-linear-gradient(top, #56666d, #30393D);
background: linear-gradient(top, #56666d, #30393D);
filter: progid:DXImageTransform.Microsoft.gradient ⏎
(GradientType=0, startColorstr=#56666d, endColorstr=#30393D);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient ⏎
(GradientType=0, startColorstr=#56666d, endColorstr=#30393D)&amp;quot;;
}
/* IE7 Fix */
*+html .searchButton {
vertical-align: top;
margin-top: 1px;
zoom: 1;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;a href=&quot;https://maddesigns.de/archiv/webkit-andert-css3-gradient-support-und-orientiert-sich-am-mozilla-syntax-739.html&quot;&gt;Webkit&lt;/a&gt;, &lt;a href=&quot;https://maddesigns.de/archiv/css3-gradient-jetzt-auch-in-opera-799.html&quot;&gt;Opera&lt;/a&gt; und &lt;a href=&quot;https://maddesigns.de/archiv/ie9-mit-css3-border-radius-und-linear-gradient-problemen-813.html&quot;&gt;IE9&lt;/a&gt; haben den Syntax geändert/erneuert&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2011/03/linear-gradient-beispiel-ie9.html&quot; title=&quot;CSS3 linear-gradient demo&quot;&gt;Demo-Datei zu CSS3 linear-gradient (Verlauf) mit IE9-Support aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Safari 4+, Chrome 2+, Firefox 3.6+, IE 6-8, Opera 11.10beta&lt;/p&gt;
&lt;p&gt;IE9 unterstützen die Methode mit SVG-Hintergrundbildern&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 4 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; mit „Detailierter Verlauf – CSS3 Adventskalender“ weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>border-radius (runde Ecken) – CSS3 Adventskalender Tag 1</title>
    <link href="https://maddesigns.de/archiv/border-radius-runde-ecken-css3-adventskalender-tag-1-288.html" />
    <updated>2010-11-30T23:01:36Z</updated>
    <id>https://maddesigns.de/archiv/border-radius-runde-ecken-css3-adventskalender-tag-1-288.html</id>
    <content type="html">&lt;p&gt;Runde Ecken (&lt;strong&gt;border-radius&lt;/strong&gt;) sind das langersehnte Feature, das CSS lange Zeit gefehlt hat. Zumeist musste man auf Grafiken und abstruse HTML-Konstrukte zurückgreifen um zum gewünschten Ergebnis zu kommen. Um einen kleinen Wermutstropfen vorweg zu nehmen, wer runde Ecken sauber im Internet Explorer 6-8 darstellen will, muss weiterhin auf Grafiken etc. zurückgreifen, erst der IE9 setzt die Eigenschaft border-radius um. Firefox und Webkit-Browser bieten durch den Einsatz von Vendor-Prefixen schon seit längerem die Möglichkeit border-radius einzusetzen.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Die Shorthand-Schreibweise ist ähnlich der padding- und margin-Shorthand-Schreibweise (z.B. border-radius: 20px).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-moz-border-radius: 20px;
&amp;lt;del&amp;gt;-webkit-border-radius: 20px;&amp;lt;/del&amp;gt;
/* aktuelle Webkitbrowser brauchen keinen Prefix mehr */
border-radius: 20px;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/PdXPpHOcXE-518.avif&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/PdXPpHOcXE-518.webp&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/PdXPpHOcXE-518.png&quot; alt=&quot;border-radius-sample1&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;518&quot; height=&quot;87&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Für individuelle Ecken sind die Schreibweisen zwischen -moz und -webkit Browser unterschiedlich:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-right-radius: 15px;
-webkit-border-bottom-left-radius: 20px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 10px;
-moz-border-radius-bottomright: 15px;
-moz-border-radius-bottomleft: 20px;
border-top-left-radius : 5px;
border-top-right-radius: 10px;
border-bottom-right-radius: 15px;
border-bottom-left-radius: 20px;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wie bei padding und margin werden auch bei border-radius die verschiedenen Werte für den Radius im Uhrzeigersinn angegeben, also für die Ecken übersetzt: oben-links oben-rechts unten-rechts unten-links&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-moz-border-radius: 5px 10px 15px 20px;
-webkit-border-radius: 5px 10px 15px 20px;
border-radius: 5px 10px 15px 20px;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/D2NBG5cr1r-518.avif&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/D2NBG5cr1r-518.webp&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/D2NBG5cr1r-518.png&quot; alt=&quot;border-radius-sample2&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;518&quot; height=&quot;87&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Tabs mit abgerundeten Ecken oben erhält man mit der Angabe:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-moz-border-radius: 15px 15px 0 0;
-webkit-border-radius: 15px 15px 0 0;
border-radius: 15px 15px 0 0;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/tlm6JVDklG-518.avif&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/tlm6JVDklG-518.webp&quot; sizes=&quot;(min-width: 48em) 518px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/tlm6JVDklG-518.png&quot; alt=&quot;border-radius-sample3&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;518&quot; height=&quot;87&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h3 id=&quot;praktisches-beispiel&quot;&gt;praktisches Beispiel:&lt;a class=&quot;header-anchor&quot; href=&quot;#praktisches-beispiel&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Suchformular Screenshot:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/NRZ6-SYxQq-241.avif&quot; sizes=&quot;(min-width: 48em) 241px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/NRZ6-SYxQq-241.webp&quot; sizes=&quot;(min-width: 48em) 241px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/NRZ6-SYxQq-241.png&quot; alt=&quot;border-radius-sample6&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;241&quot; height=&quot;40&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;IE-Ansicht (6-8):&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/B4N-XccNZX-241.avif&quot; sizes=&quot;(min-width: 48em) 241px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/B4N-XccNZX-241.webp&quot; sizes=&quot;(min-width: 48em) 241px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/B4N-XccNZX-241.png&quot; alt=&quot;border-radius-sample6-ie&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;241&quot; height=&quot;40&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;HTML:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;form class=&amp;quot;searchForm&amp;quot; action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;
  &amp;lt;input class=&amp;quot;searchField&amp;quot; type=&amp;quot;text&amp;quot;
  value=&amp;quot;Suchwort eingeben...&amp;quot;
  onfocus=&amp;quot;if (this.value == &#39;Suchwort eingeben...&#39;)
  {this.value = &#39;&#39;;}&amp;quot; onblur=&amp;quot;if (this.value == &#39;&#39;)
  {this.value = &#39;Suchwort eingeben...&#39;;}&amp;quot; /&amp;gt;
  &amp;lt;input class=&amp;quot;searchButton&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;Suchen&amp;quot; /&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.searchForm {
    background-color: #F5FBFE;
    border: 1px solid #E0EDF3;
    color: #30393D;
    padding: 3px 4px;
    width: 213px;

    -moz-border-radius: 20px;
    -webkit-border-radius: 20px;
    border-radius: 20px;
  }

  .searchField {
    background-color: #FFF;
    border: 1px solid #E0EDF3;
    color: #30393D;
    padding: 3px 4px;
    height: 16px;
    width: 135px;

    -moz-border-radius: 20px 0 0 20px;
    -webkit-border-radius: 20px 0 0 20px;
    border-radius: 20px 0 0 20px;
  }

  .searchButton {
    background-color: #30393D;
    border: 1px solid #30393D;
    color: #FFF;
    padding: 1px 4px;
    margin-left: -5px;
    height: 24px;
    width: 68px;
    vertical-align: top;

    -moz-border-radius: 0 20px 20px 0;
    -webkit-border-radius: 0 20px 20px 0;
    border-radius: 0 20px 20px 0;
  }
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;header-anchor&quot; href=&quot;#demo&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://maddesigns.de/img/2010/12/border-radius-beispiel1.html&quot; title=&quot;CSS3 border-radius demo&quot;&gt;Demo-Datei zu CSS3 border-radius aufrufen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;browser-support&quot;&gt;Browser-Support:&lt;a class=&quot;header-anchor&quot; href=&quot;#browser-support&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Safari 3+, Chrome 3+, Firefox 1+, Opera 10.5+, and IE9 Beta&lt;/p&gt;
&lt;p&gt;Ab der Version 4 braucht der Firefox auch keinen Prefix mehr.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.avif&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.webp&quot; sizes=&quot;(min-width: 48em) 521px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/sRrQ_tb9jq-521.png&quot; alt=&quot;browserChoice-maddesigns&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;521&quot; height=&quot;115&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Weiterführende Infos gibt es auf: &lt;a href=&quot;https://developer.mozilla.org/de/CSS/border-radius&quot; title=&quot;externer Link zur Mozilla border-radius Übersicht&quot;&gt;https://developer.mozilla.org/de/CSS/border-radius&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Am Tag 2 geht es im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog CSS3 Adventskalender&quot;&gt;Webstandard-Blog&lt;/a&gt; mit &lt;a href=&quot;https://webstandard.kulando.de/post/2010/12/02/border-radius-ungleiche-ecken-css3-adventskalender-tag-2&quot;&gt;„Border-Radius – Ungleiche Ecken – CSS3 Adventskalender“&lt;/a&gt; weiter.&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>re:publica 2011</title>
    <link href="https://maddesigns.de/archiv/republica-2011-279.html" />
    <updated>2010-11-18T12:16:20Z</updated>
    <id>https://maddesigns.de/archiv/republica-2011-279.html</id>
    <content type="html">&lt;p&gt;Die 5. Auflage der Social-Media-Konferenz „re:publica“ findet wie gewohnt im Berliner Friedrichstadtpalast und der direkt dahinterliegenden Kalkscheune zwischen 13. – 15. April 2011 statt. Ein Ereigniss, das man sich nicht entgehen lassen sollte. Die Anmeldung hat bereits begonnen: &lt;a href=&quot;http://www.re-publica.de/11/&quot;&gt;http://www.re-publica.de/11/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/U0zt7Kpu8I-375.avif&quot; sizes=&quot;(min-width: 48em) 375px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/U0zt7Kpu8I-375.webp&quot; sizes=&quot;(min-width: 48em) 375px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/U0zt7Kpu8I-375.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;375&quot; height=&quot;236&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>optionale Silbentrennung für den TYPO3 Redakteur</title>
    <link href="https://maddesigns.de/archiv/optionale-silbentrennung-fur-den-typo3-redakteur-244.html" />
    <updated>2010-09-27T13:37:07Z</updated>
    <id>https://maddesigns.de/archiv/optionale-silbentrennung-fur-den-typo3-redakteur-244.html</id>
    <content type="html">&lt;p&gt;Oft steht man vor den gleichen Problemen: ein Wort ist zu lang und könnte doch sinnvoll per Bindestrich auf die neue Zeile getrennt werden, wenn es nötig ist. Als Bespiel hatte ich das Wort „Sehenswürdigkeit“, dass in der Hauptnavigation zu lang gewesen wäre, aber bequem in die Footer-Navigation passt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update am Ende des Textes:&lt;/strong&gt; &lt;a href=&quot;https://maddesigns.de/archiv/optionale-silbentrennung-fur-den-typo3-redakteur-244.html#rte-update&quot;&gt;Shy im RTE von TYPO3 4.4.5 verfügbar&lt;/a&gt;&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Wenn man jetzt in das Wort einen festen Bindestrich „-“ einfügen würde (ich will gar nicht in die typografischen Feinheiten einsteigen…), würde das Wort, wenn der Platz zu gering wäre umgebrochen, andernfalls nicht und würde somit mit Bindestrich auf einer Zeile stehen: „Sehens-würdigkeit“ – unschön.&lt;/p&gt;
&lt;h3 id=&quot;silbentrennung-in-typo3-das-lasst-sich-leicht-einfugen-nur-nicht-so-schuchtern&quot;&gt;Silbentrennung in TYPO3? Das lässt sich leicht einfügen – nur nicht so schüchtern…&lt;a class=&quot;header-anchor&quot; href=&quot;#silbentrennung-in-typo3-das-lasst-sich-leicht-einfugen-nur-nicht-so-schuchtern&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Man nehme das &lt;a href=&quot;https://de.wikipedia.org/wiki/Zeichen-Entit%C3%A4t-Referenz&quot;&gt;HTML Entity&lt;/a&gt; „&lt;strong&gt;­&lt;/strong&gt;“ (&lt;strong&gt;s&lt;/strong&gt;oft &lt;strong&gt;hy&lt;/strong&gt;phen) und füge es an die passende Stelle ein.&lt;/p&gt;
&lt;p&gt;Im TYPO3-Backend kann man die betreffende Seite über die Seiteneigenschaften bearbeiten. Im Beispiel verwende ich das Feld „Navigationstitel“ (nav_title) für die Menütexte. Es funktioniert natürlich auch im title-Feld ist dan aber (bei Standard-Konfiguration) im &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; zu sehen. Es empfielt sich ohnehin unterschiedliche Einträge für den Seitentitel und dem Navigationstitel zu verwenden (SEO).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://maddesigns.de/archiv/img/2010/09/typo3-shy-trennung.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Im Typoscript gibt man die Verwendung der Navigationstexte im TMENU wie folgt an:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;lib.mainNavigation {
 10 = HMENU
 10 {
  entryLevel = 0
  1 = TMENU
  1 {
   wrap = &amp;lt;ol class=&amp;quot;nav clearfix&amp;quot; id=&amp;quot;mainnav&amp;quot;&amp;gt;|&amp;lt;/ol&amp;gt;
   noBlur = 1
   NO = 1
   NO {
    wrapItemAndSub = &amp;lt;li&amp;gt;|&amp;lt;/li&amp;gt;
    ATagTitle.field = description // nav_title // title
    stdWrap.field = nav_title // title
    # darf nicht gesetzt sein, sonst wird Text ausgegeben
    stdWrap.htmlSpecialChars = 0
     ...
   }
   ...
  }
  ...
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Der entscheidene Teil: nehme den Menütext wahlweise aus dem Feld nav_title oder title&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;lib.mainNavigation.10.1.NO.stdWrap.field = nav_title // title
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hier noch ein Screenshot für die Silbentrennung im TYPO3:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://maddesigns.de/archiv/img/2010/09/typo3-shy-trennung1.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Links die automatische Trennung im Hauptmenü, rechts wird nicht getrennt, da hier mehr Platz zur Verfügung steht.&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;rte-update&quot;&gt;Kennt jemand eine Möglichkeit für die Silbentrennung im TYPO3 RTE?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 26.10.10:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Für den RTE gab es bisher keine Möglichkeit dieser Silbentrennung, das Entity ­ wurde beim Speichern des Textes in die Datenbank entfernt. Diesen Bug hatte Peter beim verantwortlichen Entwickler des TYPO3 RTE eingereicht (&lt;a href=&quot;https://bugs.typo3.org/view.php?id=16087&quot;&gt;https://bugs.typo3.org/view.php?id=16087&lt;/a&gt;). Da ich dieses Feature unterstützenswert fand, habe ich die Entwicklung zusammen mit Peter auch finanziell unterstützt. Das Feature wurde umgehend vom RTE-Maintainer Stanislas Rolland umgesetzt und floss in den aktuellen TYPO3-Core ein. In der Version TYPO3 4.4.5 wird es dann möglich sein das Entity ­ im RTE zu verwenden. Danke an Stanislas für die schnelle Umsetzung (thank you!) und danke an Peter, der den Bug eingereicht hat.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>„CSS &amp; Performance“ Vortrag auf dem TYPO3camp München</title>
    <link href="https://maddesigns.de/archiv/css-performance-vortrag-auf-dem-typo3camp-munchen-203.html" />
    <updated>2010-09-12T08:51:22Z</updated>
    <id>https://maddesigns.de/archiv/css-performance-vortrag-auf-dem-typo3camp-munchen-203.html</id>
    <content type="html">&lt;p&gt;Mein Vortrag beim TYPO3camp 2010 in München handelte von CSS und was man beim Stylesheet-Schreiben beachten kann um Dateigröße und Ladezeiten von CSS zu verringern. Nachfolgend die &lt;a href=&quot;https://prezi.com/j37um3mez5mk/performance-matters/&quot; title=&quot;Web Frontend Performance&quot;&gt;Präsentation: CSS &amp;amp; Performance&lt;/a&gt; auf &lt;a href=&quot;https://prezi.com&quot;&gt;Prezi&lt;/a&gt;-Basis.&lt;/p&gt;
&lt;!--more--&gt;
&lt;div class=&quot;prezi-player&quot;&gt;
  &lt;p&gt;
    &lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;h2&gt;
Teil 1: CSS
&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Das Optimierungspotenzial beim Komprimieren einer CSS-Datei liegt zwischen 30%-70%, je nachdem wie gut man im Vorfeld schon gearbeitet hat. Was kann also man im Vorfeld beachten?
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Schnelle Selektoren
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Die unterschiedlichen Selektoren in CSS sind sicherlich bekannt, man kann HTML-Elemente direkt oder durch deren Attribute „class“ und „id“ ansprechen. Dabei sind die schnellsten Selektoren die Typ-Selektoren, Klassen- und ID-Selektoren sind ebenfalls schnell. Langsam hingegen sind die Kombinatoren, am häufigsten Verwendung finden sicherlich die Nachfahrenkombinatoren (descent combinators), der der langsamste aller Selektoren ist. Etwas schneller ist da der Kindkombinator (child combinators).
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Beispiel:&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
  schnellste  -&amp;gt;  a
auch schnell  -&amp;gt;  .link
     langsam  -&amp;gt;  div &amp;gt; div &amp;gt; div &amp;gt; p &amp;gt; a.link
sehr langsam  -&amp;gt;  div div div p a.link
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Warum ist das langsam?
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;img src=&quot;https://maddesigns.de/img/2010/09/browser-read-css.png&quot; alt=&quot;Der Browser liest CSS&quot; width=&quot;488&quot; height=&quot;172&quot; class=&quot;alignnone size-full wp-image-231&quot;&gt;&lt;br&gt; &lt;strong&gt;Der Browser liest CSS von RECHTS nach LINKS.&lt;/strong&gt;&lt;br&gt; Er sucht erst alle „a“-Tags, schaut dann welche von denen ein „li“ als Elternelement haben, sortiert diese aus und schaut danach welche „ul“ als Elternelement haben und weist dann die Farbe #f00 zu. Das ist durchaus anders als man erwarten könnte und z.B. in Javascript gehandhabt wird.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Extrem langsam ist der Universal-Selektor, der sogenannte „star“-Selektor. Einen Vergleich verschiedener Selektoren hat Steve Sounders auf &lt;a href=&quot;https://stevesouders.com/efws/css-selectors/universal.php&quot;&gt;https://stevesouders.com/efws/css-selectors/universal.php&lt;/a&gt; veröffentlicht.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Wie werden die Selektoren gewichtet?
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;* {}             /* a=0 b=0 c=0 d=0 -&amp;gt; specificity = 0,0,0,0 */
li {}            /* a=0 b=0 c=0 d=1 -&amp;gt; specificity = 0,0,0,1 */
li:first-line {} /* a=0 b=0 c=0 d=2 -&amp;gt; specificity = 0,0,0,2 */
ul li {}         /* a=0 b=0 c=0 d=2 -&amp;gt; specificity = 0,0,0,2 */
ul ol+li {}      /* a=0 b=0 c=0 d=3 -&amp;gt; specificity = 0,0,0,3 */
h1 + *[rel=up] {}/* a=0 b=0 c=1 d=1 -&amp;gt; specificity = 0,0,1,1 */
ul ol li.red {}  /* a=0 b=0 c=1 d=3 -&amp;gt; specificity = 0,0,1,3 */
li.red.level {}  /* a=0 b=0 c=2 d=1 -&amp;gt; specificity = 0,0,2,1 */
#x34y {}         /* a=0 b=1 c=0 d=0 -&amp;gt; specificity = 0,1,0,0 */
style=&amp;quot;&amp;quot;         /* a=1 b=0 c=0 d=0 -&amp;gt; specificity = 1,0,0,0 */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Typ-Selektoren und Pseudo-Klassen werden quasi als Einerstellen gewichtet. Attribut-Selektoren und Klassen als Zehner-Stellen, ID-Selektoren als Hunderter-Stellen. Und das style-Attribut in HTML ist sozusagen die Tausender-Stelle. Das einmal verinnerlicht, hilft, wenn mal wieder eine Eigenschaft überschrieben werden muss.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
CSS-Reset
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Bei einem CSS-Reset werden Browservorgaben zurückgesetzt, man fängt bei Null an zu gestalten. Ein einfacher Reset ist
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;* {
    margin: 0;
    padding: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Dabei werden bei allen Elementen über den Universal-Selektor alle Innen- und Außenabstände genullt. Gerade aber bei Formularen ist es dann schwierig dies browserweit neu zu implementieren. Deshalb hat Eric Meyer einen etwas „besseren Reset“ entwickelt.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* https://meyerweb.com/eric/tools/css/reset/ */
/* v1.0 | 20080212 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: &#39;&#39;;
	content: none;
}

/* remember to define focus styles! */
:focus {
	outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
	text-decoration: none;
}
del {
	text-decoration: line-through;
}

/* tables still need &#39;cellspacing=&amp;quot;0&amp;quot;&#39; in the markup */
table {
	border-collapse: collapse;
	border-spacing: 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
CSS Shorthands
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Shorthand sind Kurzschreibweisen in CSS. Man kann einige Eigenschaften zusammen-fassen. Beispielsweise kann man &lt;code&gt;margin-top: 10px&lt;/code&gt; schreiben oder &lt;code&gt;margin: 10px 0 0&lt;/code&gt;. Gleichzeitig hat man damit die Eigenschaften &lt;code&gt;margin-right, margin-left&lt;/code&gt; und &lt;code&gt;margin-bottom&lt;/code&gt; abgedeckt, und zwar mit dem Wert 0.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Beispiel:
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;margin-top: 10px;
margin-right: 20px;
margin-bottom: 30px;
margin-left: 40px;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
wird zu:
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;margin: 10px 20px 30px 40px
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Gibt es für Margin 4 verschiedene Werte, werden diese in Uhrzeigerrichtung angegeben, also &lt;code&gt;top, right, bottom&lt;/code&gt; und &lt;code&gt;left&lt;/code&gt;.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Sind &lt;code&gt;left&lt;/code&gt; und &lt;code&gt;right&lt;/code&gt; gleich, wird der Wert an der 2. Stelle für beide Seiten verwendet.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;margin: 10px 20px 30px
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Sind jeweils &lt;code&gt;top&lt;/code&gt; und &lt;code&gt;bottom&lt;/code&gt; sowie &lt;code&gt;left&lt;/code&gt; und &lt;code&gt;right&lt;/code&gt; gleich, verwendet man folgende Schreibweise:
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;margin: 10px 20px
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Letztlich werden alle 4 Seiten so zusammen gefasst:
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;margin: 10px
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Man sollte immer und ausschließlich mit Shorthands arbeiten, da ein späteres Überschreiben von „Langanweisungen“ mit einer Shorthand-Anweisung nicht möglich ist. Wir haben z.B.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;margin-top: 10px;
margin: 5px 0 0;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Der neue Wert für margin-top wird in dem Fall ignoriert.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h3&gt;
Weitere Kurzschreibweisen
&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;padding: 10px 20px 30px 40px;
border: 1px solid red;
background: #000 url(pic.png) no-repeat right bottom;
font: bold 16px/1.2 Arial, Helvetica, sans-serif;
list-style: square inside url(images/bullet.png);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
und natürlich Kurzschreibweise für Farbwerte:
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#ffffff -&amp;gt; #fff
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
 
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h2&gt;
Best practice
&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Zuweisungen zusammenfassen&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Mehrere Selektoren mit der gleichen Zuweisung können zusammengefasst werden
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;h1, h2, h3 {margin: 10px 0}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;multiple Klassen im HTML zuweisen&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
anstatt immer neue spezifische Klassen zu erfinden, weitestgehende generische Klassen verwenden und dann im HTML mehrere Klassen zuweisen
&lt;/li&gt;
&lt;li&gt;
&amp;lt;div class=“box right“&amp;gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Das letzte Semikolon kann weg gelassen werden&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Eine Einsparmaßnahme, die beim Komprimieren meist automatisch passiert
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Null-Werte ohne Einheit =&amp;gt; h3 {margin: 0}&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Es ist nicht notwendig 0px zu schreiben, die Einheit kann weggelassen werden
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;font-weight: 700 =&amp;gt; bold, font-weight: 400 =&amp;gt; normal&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Kurzschreibweise für bold = 700, für normal = 400 (minimales Einsparpotential)
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;CSS-Hacks vermeiden =&amp;gt; Conditional Comments&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Keine Hacks für IE innerhalb des Hauptstylesheet, Conditional Comments verwenden
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://standards.webmasterpro.de/index-article-cc.html&quot; title=&quot;Conditional Comments verwenden&quot;&gt;https://standards.webmasterpro.de/index-article-cc.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;CSS komprimieren&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Für den Live-Gang eine komprimierte Version erstellen und nur diese in der „Live-Version“ einbinden
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://www.blogrammierer.de/css-online-css-komprimierungstools-im-uberblick/&quot; title=&quot;CSS Kompremierungstools&quot;&gt;https://www.blogrammierer.de/css-online-css-komprimierungstools-im-uberblick/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Kommentare &lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
Verwenden von Kommentaren ist nicht nur in der Teamarbeit dringend zu empfehlen
&lt;/li&gt;
&lt;li&gt;
Kommentare können auch ausführlicher sein oder im „Javadoc“-Stil, sodass automatische Dokumentationen daraus erstellt werden können
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://phpugffm.de/index.php/adaption-des-javadoc-standards-in-css,2007-05,193.html&quot; title=&quot;CSS Javadoc&quot;&gt;https://phpugffm.de/index.php/adaption-des-javadoc-standards-in-css,2007-05,193.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Print-Styles in das default-Stylesheet übernehmen&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;body {
  color:#333;
  background-color:#ccc
}
@media screen, projection {
  body {background-image:url(background.png)}
}
@media print {
  body {background-color: #fff; color:#000}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
In Teil 2 geht es um die Performance-Optimierung im Browser. Im nächsten &lt;a title=&quot;TYPO3 Online-Magazin&quot; href=&quot;https://ty-ma.de/&quot;&gt;TY-MA&lt;/a&gt; zeige ich, was man bei der Einbindung von CSS und Javascript in HTML optimieren werden kann.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;
Welche Tipps habt ihr noch?
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>[How to] Twitter’s offiziellen Tweet-Button in WordPress Blogs einbinden</title>
    <link href="https://maddesigns.de/archiv/how-to-twitters-offiziellen-tweet-button-in-wordpress-blogs-einbinden-161.html" />
    <updated>2010-08-13T08:34:21Z</updated>
    <id>https://maddesigns.de/archiv/how-to-twitters-offiziellen-tweet-button-in-wordpress-blogs-einbinden-161.html</id>
    <content type="html">&lt;p&gt;Twitter hat den offiziellen ReTweet Button veröffentlich und schreibt in der &lt;a href=&quot;http://blog.twitter.com/2010/08/pushing-our-tweet-button.html&quot;&gt;Blog-Meldung&lt;/a&gt; dass sie dabei mit den eigentlichen Erfindern des Tweet-Button &lt;a href=&quot;http://tweetmeme.com/&quot;&gt;TweetMeme&lt;/a&gt; zusammenarbeiten.&lt;/p&gt;
&lt;h3 id=&quot;retweet-button-in-wordpress-einbinden&quot;&gt;ReTweet Button in WordPress einbinden&lt;a class=&quot;header-anchor&quot; href=&quot;#retweet-button-in-wordpress-einbinden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Das Einbinden des Twitter ReTweet Button ist recht einfach. Twitter stellt auf der Tweet-Button Website einen &lt;a href=&quot;http://twitter.com/goodies/tweetbutton&quot;&gt;Konfigurator&lt;/a&gt; zur Verfügung.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/ICLCe6VBlM-532.avif&quot; sizes=&quot;(min-width: 48em) 532px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/ICLCe6VBlM-532.webp&quot; sizes=&quot;(min-width: 48em) 532px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/ICLCe6VBlM-532.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;532&quot; height=&quot;294&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Wenn man sich mit seinem Twitter-Account eingeloggt hat, werden schon die wichtigsten Felder vorkonfiguriert (Username). Dann kann man die Style des Button auswählen, also vertikal mit Retweet-Anzahl oberhalb, horizontal mit der Anzahl der Tweets rechts vom Button oder ohne Zählung als kleiner Button. So kann man je nach Website-Design den richtigen Button-Style auswählen.&lt;/p&gt;
&lt;p&gt;Neben dem Button-Style kann man auch die URL und den Tweet-Text anpassen. Voreinstellung ist jeweils die URL und der Titel der Seite, die getwittert wird. Als vierte Reiter-Option kann man die Sprache des Tweets angeben, z.B. „German“ für deutsch.&lt;/p&gt;
&lt;h3 id=&quot;quellcode-vorschau&quot;&gt;Quellcode-Vorschau&lt;a class=&quot;header-anchor&quot; href=&quot;#quellcode-vorschau&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Im Schritt 2 wird der eigene Twitter-Username angegeben und zusätzlich kann ein weiterer (Partner-)Username und Beschreibung angegeben werden.&lt;/p&gt;
&lt;p&gt;In der Vorschau wird die Auswahl direkt angezeigt (Button-Style) und ein Code-Fenster mit dem generiertem HTML-Quellcode.&lt;/p&gt;
&lt;p&gt;Folgender Code wird in den Standardeinstellungen mit deutscher Textanzeige erzeugt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;a href=&amp;quot;http://twitter.com/share&amp;quot; class=&amp;quot;twitter-share-button&amp;quot;
data-count=&amp;quot;vertical&amp;quot; data-lang=&amp;quot;de&amp;quot;
data-via=&amp;quot;TWITTER USERNAME&amp;quot;&amp;gt;Tweet&amp;lt;/a&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;
src=&amp;quot;http://platform.twitter.com/widgets.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;tweet-button-code-in-wordpress-einbinden&quot;&gt;Tweet-Button Code in WordPress einbinden&lt;a class=&quot;header-anchor&quot; href=&quot;#tweet-button-code-in-wordpress-einbinden&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Um den Button in WordPress einzufügen, muss das Theme bearbeitet werden. Dazu geht man in seiner WordPress-Admin Oberfläche über Design -&amp;gt; Editor und wählt dann rechts aus der Dateiliste die „single.php“.&lt;/p&gt;
&lt;p&gt;In der neuen Standard-Theme „Twenty Ten“ von WordPress 3.0 wird der generierte HTML-Code vom Twitter-Button direkt vor dem DIV-Container &lt;/p&gt;&lt;div class=&quot;“entry-content“&quot;&gt; eingefügt.&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://maddesigns.de/img/vGdFsp4_8P-532.avif&quot; sizes=&quot;(min-width: 48em) 532px, 100vw&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://maddesigns.de/img/vGdFsp4_8P-532.webp&quot; sizes=&quot;(min-width: 48em) 532px, 100vw&quot;&gt;&lt;img src=&quot;https://maddesigns.de/img/vGdFsp4_8P-532.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; width=&quot;532&quot; height=&quot;294&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;In älteren Themes, die den DIV-Container nicht haben fügt man den Code vor dem PHP-Snippet  ein.&lt;/p&gt;
&lt;h3 id=&quot;anpassung-per-css&quot;&gt;Anpassung per CSS&lt;a class=&quot;header-anchor&quot; href=&quot;#anpassung-per-css&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Zusätzlich kann man den Twitter-Code noch in einem DIV-Block packen und rechts im Text floaten.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;div style=&amp;quot;float: right; margin-left: 10px;&amp;quot;&amp;gt;
... Twitter Code
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Optimalerweise vergibt man eine CSS-Klasse und lagert die CSS-Anweisung in die style.css aus. Abschließend kann man aus Performance-Gründen noch die Script-Anweisung in den Header (oder in den Footer) schieben.&lt;/p&gt;
&lt;p&gt;Wer hat den twitter-Button schon erfogreich eingebunden? Schreibt mir ein Kommentar oder ein Tweet an &lt;a href=&quot;http://twitter.com/maddesigns&quot;&gt;@maddesigns&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;plugin-fur-wordpress&quot;&gt;Plugin für WordPress&lt;a class=&quot;header-anchor&quot; href=&quot;#plugin-fur-wordpress&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;[Update] Für den neuen Twitter-Button gibt es jetzt auch ein erstes &lt;a href=&quot;http://blog.ppfeufer.de/wordpress-plugin-wp-twitter-button/&quot;&gt;Plugin&lt;/a&gt;. Jasmina von Onlinelupe hat auch ein schönes &lt;a href=&quot;http://www.onlinelupe.de/2010/08/der-neue-twitter-tweet-button-optik-funktion-einbau/&quot;&gt;Tutorial&lt;/a&gt; geschrieben. Thomas von &lt;a href=&quot;http://www.hombertho.de/2010/08/13/der-neue-offizielle-twitter-button-ist-da-und-jetzt-auch-auf-hombertho-de/&quot;&gt;hombertho.de&lt;/a&gt; nutzt bei sich den kleinen Twitter-Button.&lt;/p&gt;
&lt;/div&gt;</content>
  </entry>
  <entry>
    <title>Gastartikel im Webstandards-Blog „Formular Design mit CSS3“</title>
    <link href="https://maddesigns.de/archiv/gastartikel-formular-design-mit-css3-150.html" />
    <updated>2010-07-14T13:49:34Z</updated>
    <id>https://maddesigns.de/archiv/gastartikel-formular-design-mit-css3-150.html</id>
    <content type="html">&lt;p&gt;Mein neuer Artikel über die Verwendung von CSS3 in Formularen wurde diese Woche im &lt;a href=&quot;https://webstandard.kulando.de/&quot; title=&quot;Webstandard Blog über CSS und Browserneuigkeiten&quot;&gt;Webstandard-Blog&lt;/a&gt; veröffentlicht. m Tutorial kommen moderne CSS3-Eigenschaften wie border-radius, box-shadow, text-shadow sowie die neuen Möglichkeiten der Hintergrundgestaltung mit background: linear-gradient (ein Umfangreiches Tutorial zu „&lt;a href=&quot;https://blog.marit.ag/2010/05/04/teaserboxen-mit-verlauf-ohne-bilder-css3-linear-gradient/&quot; title=&quot;CSS3 background linear gradient&quot;&gt;Verlauf ohne Bilder (CSS3 linear-gradient)&lt;/a&gt;“ habe ich im Marit AG TYPO3 Blog veröffentlicht) zum Einsatz.&lt;/p&gt;
&lt;p&gt;CSS-Tutorial „&lt;a href=&quot;https://webstandard.kulando.de/post/2010/07/12/formular-design-mit-css3-visuelle-gestaltung-und-der-verzicht-auf-grafiken&quot; title=&quot;CSS3 Tutorial&quot;&gt;Formular Design mit CSS3 – Visuelle Gestaltung und der Verzicht auf Grafiken&lt;/a&gt;“&lt;/p&gt;
&lt;p&gt;CSS Tutorial Teil 2: „&lt;a href=&quot;https://webstandard.kulando.de/post/2010/07/14/css3-tutuorial-webdesign-ohne-grafiken-dank-css-transform&quot; title=&quot;CSS3 Tutorial Design ohne Bilder&quot;&gt;CSS3 Tutorial – Webdesign ohne Grafiken dank CSS Transform&lt;/a&gt;“&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Rahmen für Inhaltselemente in TYPO3 4.4/4.7 – section_frame</title>
    <link href="https://maddesigns.de/archiv/rahmen-fuer-inhaltselemente-in-typo3-44-112.html" />
    <updated>2010-07-05T07:30:40Z</updated>
    <id>https://maddesigns.de/archiv/rahmen-fuer-inhaltselemente-in-typo3-44-112.html</id>
    <content type="html">&lt;h3 id=&quot;update-2012-fur-typo3-47&quot;&gt;Update 2012 – für TYPO3 4.7&lt;a class=&quot;header-anchor&quot; href=&quot;#update-2012-fur-typo3-47&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mit erscheinen der Version 4.7 wurde die Anordnung der CSC-Default Anweisung im css_styled_content verändert. Eine zusätzliche Klasse zu csc-default fügt man nun wie folgt hinzu:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tt_content.stdWrap {
 innerWrap.cObject {
  default.20.10.value = csc-default neue-klasse
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Weitere Rahmen/Layouts (section_frames) werden in TYPO3 4.7 wie folgt hinzugefügt.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tt_content.stdWrap {
 innerWrap.cObject = CASE
 innerWrap.cObject {
  31 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  31.20.10.value = block
  31.30.cObject.default.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner blue&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
  32 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  32.20.10.value = block
  32.30.cObject.default.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner green&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
  33 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  33.20.10.value = block
  33.30.cObject.default.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner teaser blue&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
  34 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  34.20.10.value = block
  34.30.cObject.default.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner teaser green&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;bisheriger-artikel-fur-typo3-44-46&quot;&gt;Bisheriger Artikel – für TYPO3 4.4-4.6&lt;a class=&quot;header-anchor&quot; href=&quot;#bisheriger-artikel-fur-typo3-44-46&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Das eine oder andere Design gibt es vor, dass Inhaltselemente wie Text mit Bild oder eine Erweiterung ein anderes Aussehen als der übliche Inhalt erhalten sollen. Dazu kann man die in jedem Inhaltsobjekt enthaltene Auswahlbox Rahmen verwenden. Wer diese Funktion bereits mit TYPO3 4.2 oder vorher verwendet hat, die Inhaltselemente in DIV-Containern mit der CSS-Klasse „csc-default“ gewrappt sind.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;In Version 4.2 konnte man bisher mit&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tt_content.stdWrap {
 innerWrap.cObject {
  # Rahmen 20 überschreiben (csc-frame csc-frame-frame1)
  20.value = &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;box-inner&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ein Element mit einer DIV-Klasse umrahmen und per CSS stylen.&lt;/p&gt;
&lt;p&gt;Durch die Einführung der Standard-Klasse „&lt;em&gt;csc-default&lt;/em&gt;“ in TYPO3 4.3 wird nun jedes Element automatisch gewrappt. Diese Klasse kann man mit folgendermaßen erweitern, um ein anderes Aussehen zuzuweisen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tt_content.stdWrap {
 innerWrap.cObject {
  default.15.value = csc-default neue-klasse
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Möchte man neue Rahmen anlegen, die nicht die Standardklasse verwenden, empfehle ich folgende Lösung. Hier wird die CSS-Klasse „&lt;em&gt;csc-default&lt;/em&gt;“ durch „&lt;em&gt;block&lt;/em&gt;“ ersetzt und zusätzlich ein DIV-Block mit der Klasse „&lt;em&gt;block-inner&lt;/em&gt;“ und eine Farb-Klasse eingefügt.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tt_content.stdWrap {
 innerWrap.cObject = CASE
 innerWrap.cObject {
  31 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  31.15.value = block
  31.30.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner blue&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
  32 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  32.15.value = block
  32.30.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner green&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
  33 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  33.15.value = block
  33.30.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner teaser blue&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
  34 =&amp;lt; tt_content.stdWrap.innerWrap.cObject.default
  34.15.value = block
  34.30.value = &amp;gt;&amp;lt;div class=&amp;quot;block-inner teaser green&amp;quot;&amp;gt;|&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;neue-rahmen-hinzufugen-in-typo3-bekannt-machen&quot;&gt;Neue Rahmen hinzufügen (in TYPO3 bekannt machen)&lt;a class=&quot;header-anchor&quot; href=&quot;#neue-rahmen-hinzufugen-in-typo3-bekannt-machen&quot; title=&quot;Permalink to this heading&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Sprungmarke&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;🔗&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wenn nicht ein bestehender Rahmen in TYPO3 verwendet werden soll, empfehle ich, die Deaktivierung aller vorhandenen. Folgendes ins Page-TSConfig der Rootseite schreiben:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;TCEFORM.tt_content {
 section_frame.removeItems = 1,5,6,10,11,12,20,21
 section_frame.altLabels.0 = Bitte wählen Sie Ihr Layout
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jetzt fügen Sie die neuen Rahmen hinzu:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;TCEFORM.tt_content {
 section_frame.removeItems = 1,5,6,10,11,12,20,21
 section_frame.altLabels.0 = Bitte wählen Sie Ihr Layout
 section_frame.addItems.31 = Box Blau
 section_frame.addItems.32 = Box Grün
 section_frame.addItems.33 = Box Teaser Blau
 section_frame.addItems.34 = Box Teaser Grün
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Im TYPO3-Backend sieht das die Auswahlbox für die section_frame dann so aus:&lt;/p&gt;
&lt;img src=&quot;https://maddesigns.de/img/2010/07/typo3-rahmen-section_frame.png&quot; alt=&quot;typo3-ahmen-section_frame&quot; width=&quot;532&quot; height=&quot;138&quot; class=&quot;alignnone size-full wp-image-132&quot;&gt;
</content>
  </entry>
  <entry>
    <title>Gastartikel im Webstandards-Blog: „CSS Sprite“</title>
    <link href="https://maddesigns.de/archiv/gastartikel-im-webstandards-blog-css-sprite-93.html" />
    <updated>2010-05-26T10:00:41Z</updated>
    <id>https://maddesigns.de/archiv/gastartikel-im-webstandards-blog-css-sprite-93.html</id>
    <content type="html">&lt;p&gt;Als Gastautor beschreibe ich im &lt;a title=&quot;Webdesign Blog&quot; href=&quot;https://webstandard.kulando.de/&quot; target=&quot;_blank&quot;&gt;Webstandards-Blog&lt;/a&gt; die Vorteile von CSS Sprites. Durch das zu zusammenlegen von mehreren Einzelgrafiken zu einer großen lassen sich Ladezeit der Website und HTTP-Requests verringern. Am Beispiel einer Länderauswahl mit Flaggen-Icon erkläre ich die Vorteile in diesem Artikel.&lt;/p&gt;
&lt;p&gt;Link zu „&lt;a title=&quot;CSS Sprite - Performance Optimierung&quot; href=&quot;https://webstandard.kulando.de/post/2010/05/26/css-sprite-ladegeschwindigkeit-optimieren-http-requests-verringern&quot; target=&quot;_blank&quot;&gt;CSS Sprite – Ladegeschwindigkeit optimieren und HTTP-Requests verringern&lt;/a&gt;„&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Blog-Artikel „CSS3 linear-gradient“ Hintergrundverläufe mit CSS</title>
    <link href="https://maddesigns.de/archiv/blog-artikel-css3-linear-gradient-hintergrundverlaufe-mit-css-88.html" />
    <updated>2010-05-04T13:29:40Z</updated>
    <id>https://maddesigns.de/archiv/blog-artikel-css3-linear-gradient-hintergrundverlaufe-mit-css-88.html</id>
    <content type="html">&lt;p&gt;Im Marit AG TYPO3 Blog habe ich einen Artikel zum Thema „Teaserboxen mit Verlauf ohne Bilder (CSS3 linear-gradient)“ geschrieben. Dabei geht es um die Gestaltung von Teaserboxen ohne Bilder, also ausschließlich mit CSS.&lt;/p&gt;
&lt;p&gt;Hier der Link: &lt;a href=&quot;https://blog.marit.ag/2010/05/04/teaserboxen-mit-verlauf-ohne-bilder-css3-linear-gradient/&quot; title=&quot;Linkification: https://blog.marit.ag/2010/05/04/teaserboxen-mit-verlauf-ohne-bilder-css3-linear-gradient/&quot;&gt;https://blog.marit.ag/2010/05/04/teaserboxen-mit-verlauf-ohne-bilder-css3-linear-gradient/&lt;/a&gt;{.linkification-ext}&lt;/p&gt;
</content>
  </entry>
</feed>