From 933c4ab67f33f4d4ec95d573414a14ff076863fc Mon Sep 17 00:00:00 2001 From: deepskyblue Date: Sun, 22 Sep 2024 13:01:21 -0500 Subject: [PATCH] #3 purple media --- README.md | 2 ++ hair.css | 48 +++++++++++++++++++++++++++++++++++++++++++ index.html | 35 +++++++++++++++++++++++-------- purple.css | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+), 9 deletions(-) create mode 100644 hair.css create mode 100644 purple.css diff --git a/README.md b/README.md index 8b13789..4e35ff6 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ +## [purple](https://s9a.page/purple) +[`purple`](purple.css) [media query](https://s9a.page/media) [experiment](https://s9a.page/purple) diff --git a/hair.css b/hair.css new file mode 100644 index 0000000..63aacc1 --- /dev/null +++ b/hair.css @@ -0,0 +1,48 @@ +:focus { + outline: thick dotted; +} + +:any-link:hover { + text-decoration-style: double; +} + +* { box-sizing: border-box } +a { touch-action: manipulation } + +html { + font-family: sans-serif; + font-size: max(20px, 2vw + 1vh + 1pt); + line-height: 1.618; +} + +body { + margin: 0; + overflow-wrap: anywhere; + padding: 1.618em; +} + +h1 { + font-size: 1.618em; + margin: 0; +} + +h2 { + font-size: 1.382em; + margin: 0; +} + +article { + contain: layout; + display: flow-root; +} + +em, +b { + font: unset; + font-size: 1.236em; +} + +p { + contain: layout; + margin-block: 1em; +} diff --git a/index.html b/index.html index 484146b..92d0ae6 100644 --- a/index.html +++ b/index.html @@ -8,13 +8,30 @@ - - - - + + + + + +
+

purple

+

+ sith purple page + respects your color media + preferences while staying true + to their purple identity + purple is challenging to do because + media queries wear wet pajamas +

+

+ #800080 is the purple hex code +

+

+ butt how purple is it to you? +

+

+ when you've LOST your bae +

+
+ diff --git a/purple.css b/purple.css new file mode 100644 index 0000000..e428530 --- /dev/null +++ b/purple.css @@ -0,0 +1,60 @@ +html { + --pacify: #cbd; + --pajama: #bae; + --pastel: #edc; + --people: #bee; + --pineal: #ace; + --poison: #1ed; + --potion: #bed; + --poncho: #fd7; + --potent: seashell; + --public: #de7; + --purple: #800080; +} + +:any-link { + background-color: transparent; + color: inherit; +} + +html { + color: #edc; + background-color: purple; +} + +::selection { + color: purple; + background: #edc; +} + +@media (prefers-contrast: more) { + html { color: #eee } + ::selection { background: #eee } +} + +@media (prefers-color-scheme: light) { + html { + background-color: #edc; + color: purple; + } + + ::selection { + color: #bee; + background: purple; + } +} + +@media (prefers-color-scheme: dark) { + :any-link { + color: #bee; + } +} + +@media (inverted-colors: inverted) + and (prefers-color-scheme: dark) { + html { + filter: invert(100%); + } +} + +/* hi */