Giter VIP home page Giter VIP logo

Comments (2)

zeel01 avatar zeel01 commented on September 24, 2024 2

Most of these are things I would probably recommend a dedicated module for, rather than relying on hiding through stylesheet alone. But they would likely all be possible. The big issue would be that CSS can't actually have "permissions" in the way that other things can. There would be nothing stopping a user from overriding the styles locally, and it's very easy for them to do so. Now, I'm not generally one to worry about players cheating, but it's pretty low hanging fruit.

The issue with grouping by anything more than world/user is a matter of complexity. You will note that the GM can't modify the user-styles for the user, only for themselves, for instance. This is done with minimal complexity because Foundry offers different kinds of settings - "world" scope is used for one, and "client" scope for the other. This brings with it most of the functionality needed for users to have their own CSS along with what the GM adds for the world.

Adding more "slots" for styles would add a lot more complexity, and I'm not sure that it would be worth while for the results.

That being said, I do have an idea that I might pursue. Rather than styles that are configured per-permission or otherwise, it would be relatively easy for the module to insert additional classes into the body of the page, which could then be used to control styles. For instance, if all GM users would have the class .custom-css_isGM on the body of the page, then any style like:

.custom-css_isGM [...selectors...] {
   ...rules...
 }

Would only apply then. It's still absurdly easy to cheat, but also it's not that complicated to add.

I would need to do some experimenting though. I'm not sure if the class list on body remains static, or if anything might clear/reset it which would break the whole thing.

from foundryvtt-custom-css.

bland-html avatar bland-html commented on September 24, 2024 1

Would love to see it though. There are certain hacks I would love to apply (like hiding Scene/Playlist names) or small little spoiler edits that would be super easy through CSS.

I don't love relying on Modules, especially when they do 10 other things that I don't necessarily need them to do, or are too niche for the developer to keep up to date.

I wouldn't even mind the cheating, since it would be extremely hard for them to even know about anyways. Unless all my players play with the Console open, scouring through the code lol, I can't imagine they would ever even find out.

from foundryvtt-custom-css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.