whostyle
A whostyle is a type of stylesheet that can be used to style syndicated hypertext and quotes outside of your website. It is a working draft, started by Kicks Condor in November 2018.
Possible uses of a whostyle could be to style:
- Posts in a feed reader.
- Quotes from another site.
- Comments from other sites.
- Embedded posts throughout the Web.
Whostyles only apply to the container for the syndicated hypertext. This usually means that the hypertext is placed in an iframe
along with sanitize.css.
Rationale
Whostyles help preserve one's intended appearance for the text. This may seem purely aesthetic - but this also enables one to preserve complex layouts and tables in syndicated hypertext.
Details
TODO: There is more to write here about creating 'whostyles' one it firms up - see the first link in this document for the current details.
Challenges
safely loading foreign stylesheets
It may be difficult to prevent untrusted stylesheets from loading arbitrary content. This could impact page load time, or perhaps introduce security concerns. Whostyles might need to use a subset of the CSS spec, or otherwise rely on moderation to prevent abuse.
content licensing
Whostyles might include copyright-able assets such as image borders and fonts. Many fonts licenses restrict the number of websites that may host that font, and others prohibit web use. These assets might require manual moderation before they are served on one's site. This issue likely applies to all webmentioned content though, and isn't necessarily unique to whostyles.
responsive <iframe> sizing
While <iframes> are convenient for sandboxing an element from the rest of a page, they introduce styling challenges. It is difficult if not impossible to responsively resize an <iframe> based on its contents without the use of javascript.
Brainstorming
JSON vs. CSS
Kicks has suggested using JSON to store and share whostyles rather than raw CSS. This could make parsing easier, but would require a conversion to CSS before display.
everything is a whostyle
When I first started using whostyles on my site, I decided to go all-in and render all posts, including my own, using their respective authors' whostyle. Replies that didn't come with their own whostyles get to use mine as the default! Doing this helped me work out the kinks in my own whostyle. Jacob Hall
updating whostyles
In the same vein as updating profile pictures, I think people should be able to update their whostyles using webmentions. Old posts could be updated to use new whostyles, or posts could keep the whostyle from the time they were posted. Jacob Hall
inheriting host page CSS
I'd like to make the case against <iframe>s. While they might be a necessary evil to make whostyles safe to use for everyone, I like the idea of whostyles inheriting and getting to work with the styles already present on the site they are on. Wouldn't it be cool to, for example, use the blockquote style that is given to you by the host site? To start from scratch, all: revert; can be used to revert all rules back to the client defaults. If we must use <iframe>s, I will consider injecting my own styles into them so that whostylers can use them if they like. Jacob Hall
CSS selector naming convention
It might be helpful to use author-specific CSS selectors for each In a comment on Hacker News, Chris Morgan suggested using custom HTML attributes to define whostyles. This would allow for whostyle selectors to match the original poster's h-card, e.g. [whostyle="jacobhall.net"] If whostyles are exclusively embedded inside of <iframe>s, however, it might be simpler to just use a .whostyle class.
Where to place post metadata
The author, date, and other metadata associated with a post are usually displayed directly above or below the post content. I think it looks nicer to place that metadata inside of the whostyled element, to help make the post feel like a cohesive item. We may need to work out a standard way of marking up metadata within a whostyled post so that the author of the whostyle can anticipate how their stylesheet will impact the metadata. Jacob Hall
See Also
- CSS
- reply
- responses
- identity
- https://www.robinsloan.com/notes/whomst-styles/
- https://jacobhall.net/2021/08/horton-hears-a-whostyle/
- Example of a chat-style page with whostyles: https://multiverse.plus/about
- Whomst styles the whostyles?