From 41df53a7ae9ea2a0d80666052dbcc86a228877d4 Mon Sep 17 00:00:00 2001 From: Nathaniel Sabanski Date: Sat, 23 Sep 2023 01:37:30 -0700 Subject: [PATCH] Update example.html --- example.html | 54 ++++++++++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/example.html b/example.html index 4fbb13b..686ff55 100644 --- a/example.html +++ b/example.html @@ -13,9 +13,7 @@ background: #222; color: #ccc; } - body { - font-size: 2rem; /* 2rem = 20px in our setup. */ - } + body { font-size: 2rem } /* 2rem = 20px in our setup. */ html button { font-size: 2rem; cursor: pointer; @@ -28,13 +26,8 @@ border-bottom: 0.5rem solid hsl(345 100% 28%); border-radius: 12px; transition: all 0.3s; - &:hover { - background: hsl(345 100% 60%); - transform: translateY(-0.2rem); - } - &:active { - transform: translateY(0.2rem); - } + &:hover { background: hsl(345 100% 60%); transform: translateY(-0.2rem) } + &:active { transform: translateY(0.2rem) } } @@ -60,10 +53,8 @@ padding: 10px 20px; color: #fff; margin: 20px; - & ul, ol { /* CSS Nesting works! */ - padding: 5px 0; - } - & span { /* CSS Nesting works! */ + /* CSS Nesting works! */ + & span { background: hsl(264 90% 90%); color: hsl(264 30% 40%); padding: 16px 20px; @@ -72,25 +63,21 @@ &::before { content:'🔮'; padding: 0 1ch 0 0; } } } - .me li{ - list-style: disc; - padding: 4px; - border-radius: 12px; - margin: 4px 20px; - } - .this ol li[n1] { /* ✨ .this is an alias! */ - background: hsl(264 50% 50%); - } - .self ol li[n2] { /* ✨ .self is an alias! */ - background: hsl(264 80% 50%); - } + /* Flat style can be more readable! 1 selector per line. */ + .me ol { padding: 5px 0; } + .me ol li{ list-style: disc; padding: 4px; border-radius: 12px; margin: 4px 20px } + /* ✨ .this and .self alias .me ! */ + .this ol li[n1] { background: hsl(264 50% 50%) } + .self ol li[n2] { background: hsl(264 80% 50%) } + /* Animations */ + .me { animation: \.me 2s ease-in-out infinite } @keyframes \.me { /* ♻️ Looped animation @keyframes can be scoped using \ */ 0% { transform: translateY(0px); } 50% { transform: translateY(20px); } 100% { transform: translateY(0px); } } - .me { animation: \.me 2s ease-in-out infinite; } - h1, h2, h3 { font-size: 3rem; margin: 20px 0; } /* Plain CSS works untouched! */ + /* Plain CSS works untouched! */ + h1, h2, h3 { font-size: 3rem; margin: 20px 0; }

🛸 Scoped style using .me

    @@ -100,17 +87,17 @@

    🛸 Scoped style using .me

  1. ⚡ Use live editing in the browser inspector to speed up your workflow, again!
- - +

Responsive Design 🔛 Resize the window!

+ 🟢 = No breakpoint. Default.
Desktop First (below breakpoint)
  • 🏁 xs-
  • sm-
  • md-
  • lg-
  • xl-
  • 🟢 None
-
🟢 = No breakpoint. Default starting point.

@@ -156,5 +142,7 @@

HTMX Test

🧛
+ +