Add an interface to apply ui styles to the page body?

Created on 5 November 2024, 18 days ago

Problem/Motivation

in the sub-module ui styles page, one can apply styles to regions.

What do you think of being able to do the same, but directly on the "pages", i mean the body html tag.
that would be super cool to be able to set a background, a typo ...etc for the pages.

based on this idea, we can imagine after other interesting things (like applying some styles, only for some routes..etc).
Why not creating like "Page styles"? one can make a global page style, that applied for all pages.
whereas one could create a custom "page style", only for some routes (/user pages.. , some content types... etc).

what do you think?

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France just_like_good_vibes PARIS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @just_like_good_vibes
  • πŸ‡«πŸ‡·France G4MBINI BΓ¨gles

    +1

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Thanks for opening the issue.

    As discussed this would definitively takes its place in ui_styles_page. I was not aware of the possibility to make distinction by routes, I first imagine a global setting like with ui_styles_entity_status to keep stuff simple.

    Also putting classes on the body tag makes me think of the theme feature of ui_skins. Maybe this overlap?

    But a mechanism that will allow to have different values based on the context I think it is something to be done for ui_styles and ui_skins then.

    And I think such mechanism is a "source" plugin system so you could have your source plugin in which you put (configurable or not, as desired) the logic of, for this route I want those styles, for this one I want those styles, etc. Maybe with some kind of weight and a isApplicable method? And in this case it makes me think more about service tag and service collector.

Production build 0.71.5 2024