Category Styling Update | World Anvil

Remove these ads. Join the Worldbuilders Guild

Category Styling Update

Feature Upgrade · World management · Created by Sodose
accepted
Like many other CSS users, I use article-specific themes. These themes rely on CSS classes. These classes can only be applied to articles one-by-one, meaning that for me, a person with 7 themes, needs to go through each of my 160 articles and apply the classes individually. I would like to be able to apply a CSS class to my categories and have those classes carry over to all the articles in that category.   I don't know if this is possible, but what would make us even more excited is if the CSS classes and cover image of a category carried over to articles in a sub-category under that main category.

The Team's Response

Accepted / partially - read below.   As spartango said:
Articles in a category already receive the class .category-CATEGORY-IDon the same element as .user-css, so this is already possible. However, this doesn't seem to also apply to articles that have parent articles instead of categories, so I would support that being addressed.   Resolution: I will be implementing the same for aritcle parent if one exists.   Also, I am sorry but there is a much better implementation for this by using TAGS on your aritcles based on the theme you'd like to apply.
Current score

30/300 Votes · +2820 points

Votes Cast

  • +100

    by Loferl315
    on 2021-05-07 18:15
  • +100

    by A Lambent Eye
    on 2021-05-06 09:51
  • +300

    by michaelthominks
    on 2021-05-05 17:01
  • +300

    by Criisper
    on 2021-05-05 00:44
  • +20

    by origin of KROOI
    on 2021-05-03 03:36
  • +10

    by SiobhantheWriter
    on 2021-05-01 19:17
  • +10

    by Arcturiuss
    on 2021-05-01 13:18
  • +10

    by RiverFang
    on 2021-04-26 18:06
  • +100

    by SuperPheemy
    on 2021-04-26 15:47
  • +100

    by Redcollarwolf
    on 2021-04-26 07:27
  • +10

    by Timepool
    on 2021-04-26 02:53
  • +10

    by GMSeth
    on 2021-04-26 00:05
  • +10

    by Rynn19
    on 2021-04-25 05:51
  • +300

    by TheSolitaryGamer
    on 2021-04-24 19:42
    This would make my life easier with my world, which relies heavily on CSS classes for backgrounds and headers and the like.
  • +300

    by A Uncontrollable Devil
    on 2021-04-23 14:52
  • +100

    by SolarCat02
    on 2021-04-23 02:39
  • +10

    by Michael Chandra
    on 2021-04-23 00:18
  • +10

    by StardustScrapper
    on 2021-04-22 23:58
  • +100

    by Jaskovivich
    on 2021-04-22 19:44
  • +50

    by Buzzard
    on 2021-04-22 14:48
    I like this idea. Perhaps adding CSS classes to articles that reflect their category or parent article would make this work. Something like 'category-CATEGORYSLUG' or 'parent-ARTICLESLUG'.
  • +10

    by melior64
    on 2021-04-22 09:56
  • +10

    by spartango
    on 2021-04-22 01:12
    Articles in a category already receive the class .category-CATEGORY-IDon the same element as .user-css, so this is already possible. However, this doesn't seem to also apply to articles that have parent articles instead of categories, so I would support that being addressed.
  • +10

    by Lyraine Alei
    on 2021-04-22 01:00
  • +50

    by JohanWq
    on 2021-04-21 21:49
  • +20

    by redbeardcreator
    on 2021-04-21 21:04
  • +10

    by Adcheryl
    on 2021-04-21 19:00
  • +10

    by oldie
    on 2021-04-21 17:21
  • +50

    by mastergentleman
    on 2021-04-21 16:52
  • +300

    by beartoad
    on 2021-04-21 16:27
  • +100

    by KahunaTheElder
    on 2021-04-21 15:32
  • +300

    by Sodose
    on 2021-04-21 14:58