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

Update css vars with server ones #3095

Closed
1 task
juliushaertl opened this issue Aug 24, 2022 · 1 comment
Closed
1 task

Update css vars with server ones #3095

juliushaertl opened this issue Aug 24, 2022 · 1 comment

Comments

@juliushaertl
Copy link
Contributor

We should update css vars from server regularly

  • FIgure out dark/light mode options

Quick dirty script that i used for testing:

#!/bin/bash

NEXTCLOUD=http://nextcloud.dev.local
TARGET=/tmp/vars-temp
TARGET_OUTPUT=styleguide/assets/variables.css

printf "\n\n/* Plain */\n" > $TARGET
curl $NEXTCLOUD/index.php/apps/theming/theme/default.css?plain=1 >> $TARGET

printf "\n\n/* Light */\n" >> $TARGET
printf "@media (prefers-color-scheme: light) {" >> $TARGET
curl $NEXTCLOUD/index.php/apps/theming/theme/light.css?plain=1 >> $TARGET
printf "}" >> $TARGET

printf "\n\n/* Dark */\n" >> $TARGET
printf "@media (prefers-color-scheme: dark) {" >> $TARGET
curl $NEXTCLOUD/index.php/apps/theming/theme/dark.css?plain=1 >> $TARGET
printf "}" >> $TARGET

cat $TARGET | sed -E "s/\-\-[^:]*:\s*url[(]'[^;]+'\);//g" > $TARGET_OUTPUT
vinicius73 pushed a commit that referenced this issue Aug 29, 2022
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
vinicius73 pushed a commit that referenced this issue Aug 30, 2022
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
@raimund-schluessler
Copy link
Contributor

There is a GH action now doing this.

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

No branches or pull requests

2 participants