News for hackers. Stuff that matters.
Re:AM – Attribute Modules for CSS by CatsoCatsoCatso on Friday September 05, 2014 @11:27AM (#8274391)
I hacked together a markdown editor with previews. To allow the user to change how an image was displayed they could put space separated options in the alt text values of the syntax.

eg. ![Cute-Cat aside max500px](/path/to/img.jpg)

Aside & max500px were then picked up the CSS using the images alt attribute as the selectors.

It was a terrible hack but it worked.

There are no comments on this comment yet.