Hacker News new | ask | show | jobs
by _lce0 4301 days ago
interesting approach! any real web/app using this technique?
3 comments

Right now, the AM site, Glen's site and am-grid. This is the first time we've shared what we've been working on.
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.

We're using it for a basic responsive grid on some Envato Market pages: https://themeforest.net/make_money/become_an_author