[personal profile] haptalaon posting in [community profile] style_system

I made a little open-and-shut book for journal cuts - the book opens on hover, stays open when the cut is open, then closes on hover and if you click it and the cut is closed it's shut. The cut text and icon are both centered. Like this!

a screenshot of the finished effect just described

Based on code by[personal profile] tropicsbear  here, updated from the original here by[personal profile] rise

You can download my book icons here - they're based on the open source twitter emoji [Closed Book / Open Book]. Please don't hotlink - download then re-upload to your own image hosting. What other before-and-after emoki could you use?

They are not pictures - they are in .svg format, a set of code instructions for displaying images. You can edit them in a dedicated svg editor, or in any program which edits text files (!). Use a .svg editor if you want to add symbols or change the design - or make your own pixel art - but if you just want to change the colour of the book, it's easy. Open the .svg source code in a text editor, then use find&replace to swap the color hex codes for the colours you want. Currently, the dark brown is #C1694F and the light brown is #D99E82.

Code under the cut!

/* CUSTOM CUT EXPANDER */ .cuttag+b { display:block; width:fit-content; margin-left:auto; margin-right:auto; } img[src*="collapse.svg"],img[src*="collapse.svg"]:hover,img[src*="expand.svg"], img[src*="collapse-end.svg"] { width: 0; height: 0; display:block; margin-left:auto; margin-right:auto; padding:1em 0.3em 0 0 !important; } img[src*="collapse.svg"] { background: transparent url(https://anemptyblissbeyondthisworld.neocities.org/homepage/1f4d4.svg) no-repeat scroll 0 0; } img[src*="collapse.svg"]:hover { background: transparent url(https://anemptyblissbeyondthisworld.neocities.org/homepage/1f4d6.svg) no-repeat scroll 0 0; } img[src*="expand.svg"], img[src*="collapse-end.svg"] { background: transparent url(https://anemptyblissbeyondthisworld.neocities.org/homepage/1f4d6.svg) no-repeat scroll 0 0; } img[src*="expand.svg"]:hover, img[src*="collapse-end.svg"]:hover { background: transparent url(https://anemptyblissbeyondthisworld.neocities.org/homepage/1f4d4.svg) no-repeat scroll 0 0; }

Date: 2022-11-09 03:42 pm (UTC)
goodbyebird: SCC: Cameron is dancing ballet. (SCC Cameron ghost in the machine)
From: [personal profile] goodbyebird
Oh that's really neat!

Date: 2022-11-09 09:43 pm (UTC)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
From: [staff profile] denise
This is an AWESOME CSS trick!

Date: 2022-11-10 06:03 am (UTC)
azurelunatic: Vivid pink Alaskan wild rose. (Default)
From: [personal profile] azurelunatic
Oh, that is so cool!!!

Profile

Dreamwidth style system discussion

July 2025

S M T W T F S
  123 45
6789101112
13141516171819
20212223242526
2728293031  

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 29th, 2025 03:42 pm
Powered by Dreamwidth Studios