Comments (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.
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)
- Hovering over and dragging scrollbars shows text edit cursor
- [feature request] Rule sets
- Indication of changes on save button
- World level styles should be editable by any user with the appropriate permissions, not just the GM HOT 3
- Macro to Open Custom CSS Rules? HOT 2
- Fondary V10 Compatibility HOT 3
- Code Mirror Error HOT 5
- Enhancement: Render Global Styles on Join page HOT 2
- v11 Compatibility Check HOT 1
- Module Appears to Work without Issue in v11 HOT 2
- Module won't load after 11.306 update HOT 2
- Toggle Global and User CSS Pane HOT 5
- GM User Styles affects players
- Typing direction fixed in the left of the line HOT 1
- Import/Export style sheets
- SCSS Support HOT 1
- When try update Module Error url module.json HOT 2
- Make the edit dialog resizable and add scroll bars HOT 2
- Scrollbars in CSS edit window don't show up until you alter the contents
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundryvtt-custom-css.