CSS-Tricks (@csstricks@mastodon.social) [archived]

Blackle Mori shows a few of the hacks from Cohost.org before the community shut down for good. Use these if you dare, lest you too get labelled a CSS criminal.

https://css-tricks.com/the-lost-css-tricks-of-cohost-org/

shuppy (shuppy.org)

my one contribution to the css criminology was the password protected eggbug. i wish cohost stuck around long enough to see the full potential of <details name> crimes. to my knowledge, the only such crime was this one by ruby, but i’m happy to be corrected!

cohost will be missed, but eggbug lives on in all of us. thanks for keeping it alive @suricrasia@lethargic.talkative.fish and @csstricks@mastodon.social!

“password protected eggbug”, a css crime with an interactable qwerty keyboard and a box above that reads “enter password”

ruby’s crime spanning two chosts. the first chost has a minecraft lever that reads “click the lever!”, and a minecraft piston pushing the words “Now you're thinking with portals!” into an orange portal. the second chost has the letters “als!” poking out of a blue portal.

ruby (@srxl) [archived]

click the lever!
oops, it's stuck...
Now you're thinking with
Now you're thinking with portals!
shuppy (@delan) [archived]

ruby (@srxl) [archived]

als!
ith portals!
shuppy (@delan) [archived]

the wire (2002), season 4 episode 9 “know your place”, frame showing pryzbylewski’s students entering class. on either side of the door, there are signs with red text on a yellow-red gradient background, much like a “tasty hot delicious” chips box you would get from a kebab shop in australia. one reads “Math Rules!” and the other “Choices Have Consequences”.
Tasty HOT Delicious
Tasty HOT Delicious
Tasty HOT Delicious
Tasty HOT Delicious


note: may be broken with “dark theme” setting on chrome for android
fancy version but currently firefox only
Tasty HOT Delicious
Tasty HOT Delicious
Tasty HOT Delicious
Tasty HOT Delicious
shuppy (@delan) [archived]

world’s shittest acid1 result

i’ve been reading the excellent Web Browser Engineering and following along in rust. you can too! the whole book is free online!

so far i’ve done a rudimentary html parser, dom tree, layout tree, and paint, with only ~2000 lines of code. now i’m working on a toy css engine.

https://github.com/delan/wbe.rs

shuppy (@delan) [archived]

“Implementing just enough of the standard to pass a test is disingenuous, and has nothing to do with standards compliance.”

world’s shittest acid1 result

i’ve been reading the excellent Web Browser Engineering and following along in rust. you can too! the whole book is free online!

so far i’ve done a rudimentary html parser, dom tree, layout tree, and paint, with only ~2000 lines of code. now i’m working on a toy css engine.

https://github.com/delan/wbe.rs

Bad Apple!! in CSS custom highlights

this counts as css crimes right? ^.^;;

https://www.youtube.com/watch?v=qWTHxQWUreo

live demo (chromium-based browsers only for now)

password protected eggbug

enter password
1
[EXTREMELY LOUD INCORRECT BUZZER]
2
[EXTREMELY LOUD INCORRECT BUZZER]
3
[EXTREMELY LOUD INCORRECT BUZZER]
4
[EXTREMELY LOUD INCORRECT BUZZER]
5
[EXTREMELY LOUD INCORRECT BUZZER]
6
[EXTREMELY LOUD INCORRECT BUZZER]
7
[EXTREMELY LOUD INCORRECT BUZZER]
8
[EXTREMELY LOUD INCORRECT BUZZER]
9
[EXTREMELY LOUD INCORRECT BUZZER]
0
[EXTREMELY LOUD INCORRECT BUZZER]
q
[EXTREMELY LOUD INCORRECT BUZZER]
w
[EXTREMELY LOUD INCORRECT BUZZER]
e
[EXTREMELY LOUD INCORRECT BUZZER]
r
[EXTREMELY LOUD INCORRECT BUZZER]
t
[EXTREMELY LOUD INCORRECT BUZZER]
y
[EXTREMELY LOUD INCORRECT BUZZER]
u
[EXTREMELY LOUD INCORRECT BUZZER]
i
[EXTREMELY LOUD INCORRECT BUZZER]
o
[EXTREMELY LOUD INCORRECT BUZZER]
p
[EXTREMELY LOUD INCORRECT BUZZER]
a
[EXTREMELY LOUD INCORRECT BUZZER]
s
[EXTREMELY LOUD INCORRECT BUZZER]
d
[EXTREMELY LOUD INCORRECT BUZZER]
f
[EXTREMELY LOUD INCORRECT BUZZER]
g
[EXTREMELY LOUD INCORRECT BUZZER]
h
[EXTREMELY LOUD INCORRECT BUZZER]
j
[EXTREMELY LOUD INCORRECT BUZZER]
k
[EXTREMELY LOUD INCORRECT BUZZER]
l
[EXTREMELY LOUD INCORRECT BUZZER]
z
[EXTREMELY LOUD INCORRECT BUZZER]
x
[EXTREMELY LOUD INCORRECT BUZZER]
c
[EXTREMELY LOUD INCORRECT BUZZER]
v
[EXTREMELY LOUD INCORRECT BUZZER]
b
[EXTREMELY LOUD INCORRECT BUZZER]
n
[EXTREMELY LOUD INCORRECT BUZZER]
m
[EXTREMELY LOUD INCORRECT BUZZER]
[EXTREMELY LOUD INCORRECT BUZZER]
[EXTREMELY LOUD INCORRECT BUZZER]
●●
[EXTREMELY LOUD INCORRECT BUZZER]
●●●
[EXTREMELY LOUD INCORRECT BUZZER]
●●●●
[EXTREMELY LOUD INCORRECT BUZZER]
●●●●●
[EXTREMELY LOUD INCORRECT BUZZER]
●●●●●●
[EXTREMELY LOUD INCORRECT BUZZER]
[EXTREMELY LOUD ACCESS GRANTED]

[view source]

cohost css reuse via inheritance

cohost only supports inline styles, hence the need for tooling like prechoster, but code reuse is still possible thanks to the ‘all’ and ‘display’ properties. this can make hand-writing chosts easier, and it could potentially even help reduce the size of generated chosts? here’s how:

  1. wrap related elements in <div style="/* common */; display: contents;">
  2. move their common styles to /* common */ in that wrapper element
  3. prepend all: inherit; display: /* something */; to each of their styles

these wrappers can be nested, though for inner wrappers you can use <div style="all: inherit; /* common */"> to save a few characters. for example:

e
g
g
b
u
g
<div style="position: relative; height: 8em;">
    <div style="width: 2em; height: 2em; position: absolute; justify-content: center; color: #fff9f2; background: #83254f; display: contents;">
        <div style="all: inherit; display: flex; inset: 1em 0 0 1em;">e</div>
        <div style="all: inherit; display: flex; inset: 3em 0 0 3em;">g</div>
        <div style="all: inherit; display: flex; inset: 5em 0 0 5em;">g</div>
        <div style="all: inherit; background: #e56b6f;">
            <div style="all: inherit; display: flex; inset: 1em 0 0 4em;">b</div>
            <div style="all: inherit; display: flex; inset: 3em 0 0 6em;">u</div>
            <div style="all: inherit; display: flex; inset: 5em 0 0 8em;">g</div>
        </div>
    </div>
</div>

eggbug
OK

cohost markup testing [WIP]

(see also: github testing that i did for my profile readme)

  • content is contained to post area with overflow:hidden
overflow-wrap: break-word → normal
BUNGALOOO!!!aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
data: URL images work if they are base64 encoded
  • this works: data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI5OSIgaGVpZ2h0PSI5OSIgdmlld0JveD0iMCAwIDEgMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJncmVlbiIvPjwvc3ZnPgo=
  • this doesn’t: data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg width="99" height="99" viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="1" height="1" fill="green"/></svg>

supported

  • div, span, a
  • big, small, sup, sub
  • table, tr, td
  • input (forced type=checkbox disabled)
  • details, summary
  • @id (forced prepend “user-content-”)
  • @style
  • ‘background-image’ with ‘url()’
  • ‘all’ (e.g. all: inherit;)
  • ‘var(--custom)’

stripped (into its textContent if any)

  • <!-- comment -->
  • a@href starting with “javascript:”
  • img@src
  • font
  • fieldset, legend
  • label, button, textarea, meter, progress
  • style
  • @class
  • ‘font-smooth’
  • ‘--custom’