samjohnsson: It's just another mask (Default)
Sam Johnsson ([personal profile] samjohnsson) wrote in [community profile] ao3_skins2011-10-11 05:16 pm
Entry tags:

Work Skin: scripts

Cesy poked me to share this over here, so here it is!

One of the formats of writing that's seeing more publication on the Archive is that of script writing. Unfortunately, if you're not that code-savvy, formatting it will rely on a lot of nbsp; entries (which make kittens cry salty tears of misery) and manual line breaks (puppies wail in anguish). Fear not! For I have heard your suffering, and lo have I written some code for you to use as a Work Skin.

Most measurements are in percentages to scale properly, for screen width and for font size (it will break at much larger font sizes). I have used the font-variant: small-caps; property to mimic the upcase format style calls for (CSS3 does not yet have a font-variant: all-caps;.)

These are all designed to be used with the <p> tag and would look like:
<p class="dialogue">words</p>

The charnameinline style is designed to be used with <span> tags (<span class="charnameinline">name</span>) and is designed for character first reference.

On to the code!


This code will work with any site that allows for CSS. If you want to use it on your personal site, strip out every instance of #workskin (and drop me a line to ask how to attach it to your site code). If you're using it on Tumblr or FF.N...well, I have no idea. I will play with making it work on DW, though don't hold your breath, since DW does weird things to HTML.
cesy: "Cesy" - An old-fashioned quill and ink (Default)

[personal profile] cesy 2011-10-12 06:01 am (UTC)(link)
Yes, sure :)
fuck_yeah: Cartoon octopus pushing buttons and pulling levels on panel (Default)

[personal profile] fuck_yeah 2015-06-16 08:56 pm (UTC)(link)
So this is really, really late and probably not an important thing to point out any more, but instead of font-variant: small-caps; couldn't you use text-transform: uppercase;?
sunfox: A superhero taking a wide stance. Their supersuit is mostly purple, with yellow and purple boots, reddish-orange sleeves that fade into yellow, and yellow goggles. On their back is a fishing net. Their hat resembles a jellyfish. (Default)

[personal profile] sunfox 2022-01-19 04:29 am (UTC)(link)
Just an update for anyone who wants to use this skin in the future: It still works! Mostly. As another commenter mentions, I'd replace "font-variant: all-caps;" with "text-transform: uppercase;", but that's just a minor thing and technically either will work. The main thing is that you absolutely cannot use "#workskin .action {", it will make your thing look really weird. Switch out action for any other word and it will work, but the "action" function on AO3 turns the action bits into a button-looking thing. (I know next to nothing about HTML or CSS so if I'm not using the most technical terms, excuse me.) But everything else is good, and it looks really nice!