View Single Post
Old 03-15-2025, 04:26 PM   #1
1ily
Connoisseur
1ily doesn't litter1ily doesn't litter
 
Posts: 63
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
CSS Styling based on class/existing styling

Hello!

I have a colour eink device, and it feels like the colour feature is going to a waste when most of my books are black and white.

I had the idea of adding colour to any div/p/span/header classes with a certain class or ID, but it misses the occasional text portion.

Is there any way to apply styling based on an existing class with the bold/italic styling?

Code:
h1, h2, h3, h4, h5, h6, i, em,div[class*="italic"],p[class*="italic"],span[class*="italic"], b, strong {
color: #8D4CF6;
}

span[class*="title"],p[id*="chapter"],div[id*="chapter"],span[id*="chapter"],p[id*="epilogue"],div[id*="epilogue"] ,span[id*="chapter"],span[id*="epilogue"],p[value*="Table of Contents"],p[value*="ToC"] ,div[value*="Table of Contents"],div[value*="ToC"],p[value*="prologue"] ,div[value*="prologue"],div[value*="prologue"] ,span[value*="prologue"] {
color: #8D4CF6;
}
1ily is offline   Reply With Quote