nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.22k stars 4.05k forks source link

iFrame force light/dark mode (prefers-color-scheme) #29699

Open jonathanmmm opened 2 years ago

jonathanmmm commented 2 years ago

Hi,

I try to implement nextclouds calendar via iframe into a website, the website is completely held in white, but as my windows settings are set to dark, the iframed calendar is black, which doesn't match the theme.

I tried with like changing all css for iframes, but it takes much time and discolors other.

I propose an enhancement when making iframe like ?force_color_scheme=light

Think it has to to with this pull nextcloud/server#21366

Is this something that could be impelemented?

https://github.com/nextcloud/calendar/issues/3416#issuecomment-968159071 Here you can see how it looks and why it would be a good feature.

Thanks

I could try work on this myself, if I get a little help how to start.

jonathanmmm commented 2 years ago

Created a pull request: https://github.com/nextcloud/server/pull/29940

jonathanmmm commented 2 years ago

Pull request is a draft right now, could need help, got stuck.

jonathanmmm commented 2 years ago

@moqmar you seemed interested in this feature, maybe we can try to figure it out together (original issue https://github.com/nextcloud/server/issues/28487)

drmenguin commented 1 year ago

Has anyone found a solution to this? I used to override this by editing nextcloud/apps/accessibility/lib/AppInfo/Application.php and overriding prefers-colour-scheme, but since the last upgrade things seem to have been restructured and that file doesn't exist anymore.