snippets:html
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
snippets:html [2025-06-25 23:57] – Snippets für robots.txt, sitemap.xml und humans.txt hinzugefügt malte70 | snippets:html [2025-10-05 15:11] (current) – Abschnitt „Styling“ hinzugefügt malte70 | ||
---|---|---|---|
Line 209: | Line 209: | ||
* '' | * '' | ||
+ | ===== Styling ===== | ||
+ | ==== CSS-Variablen ==== | ||
+ | |||
+ | Werte wie Farben werden oft mehrfach in einem Stylesheet benutzt, und können durch Variablen bzw. Custom Properties an einer zentralen Stelle definiert werden. Dadurch sind Anpassungen am Design auch ohne Präprozessor wie SCSS schnell gemacht. | ||
+ | |||
+ | Variablen werden meist in der Pseudo-Klasse '': | ||
+ | |||
+ | <code css> | ||
+ | :root { | ||
+ | --color-text: | ||
+ | --color-highlight: | ||
+ | --color-background: | ||
+ | } | ||
+ | |||
+ | body { | ||
+ | color: var(--color-text); | ||
+ | background: | ||
+ | } | ||
+ | |||
+ | a:link, a:visited { | ||
+ | color: var(--color-highlight); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== < | ||
+ | |||
+ | Das '' | ||
+ | |||
+ | <code html> | ||
+ | < | ||
+ | GUI-Dateimanager, | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <code css> | ||
+ | blockquote { | ||
+ | margin: 1em 0; | ||
+ | } | ||
+ | |||
+ | blockquote:: | ||
+ | display: block; | ||
+ | content: " (Quelle: " attr(cite) ") "; | ||
+ | color: GrayText; | ||
+ | } | ||
+ | </ | ||
snippets/html.txt · Last modified: by malte70