Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Individual ID on a <body> element for each web page #10003

Open
Phroneris opened this issue Feb 10, 2019 · 2 comments
Open
Labels
suggestion Feature suggestion

Comments

@Phroneris
Copy link

Pitch

Append individual ID on a <body> element for each web page. (I have no idea if the expression "each" is appropriate though...)
For example,

/terms:

<!--
Current:
        <body class='with-modals theme-default no-reduce-motion'>
My suggestion:
-->     <body class='with-modals theme-default no-reduce-motion' id='terms'>

/explore:

<!--
Current:
        <body class='theme-default no-reduce-motion'>
My suggestion:
-->     <body class='theme-default no-reduce-motion' id='directory'>

/about/more:

<!--
Current:
        <body class='with-modals theme-default no-reduce-motion'>
My suggestion:
-->     <body class='with-modals theme-default no-reduce-motion' id='about-more'>

... and so on.

Motivation

In order to improve customizability of page design by inserting a single CSS statement on "Administration" > "Site settings" page.
For example:

body#terms {
	background-color: red;
}
body#directory {
	background-color: blue;
}
body#about-more {
	background-color: yellow;
}

This can set individual (psychedelic) background color for each page.

Circumstance

I tried to tweak grid balance of the directory view and found there is no way to specify a desired page easily on the admin CSS editor.

@Phroneris Phroneris changed the title Individual ID on a <body> element for each web page [Feature Request] Individual ID on a <body> element for each web page Feb 11, 2019
@Gargron Gargron added the suggestion Feature suggestion label Feb 15, 2019
@3dn0
Copy link

3dn0 commented Nov 23, 2022

I was about to suggest something similar and I've seen this post.
It would be really neat to have an id selector on body or html tags of corresponding sections like profile pages, post pages, etc. basically every sub-pages of mastodon, to allow styling/theming of the instance.
I'd do it myself if I knew where and how to add this, but I don't ( is it only a matter of adding the ids in corresponding page constructors ? )
Thanks !

@barredo
Copy link

barredo commented Feb 26, 2023

Hi again. Came here explicitly to ask for something like this. I could write some code to make it and submit as a Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests

4 participants