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 variables.css from nextcloud server #3112

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

vinicius73
Copy link
Contributor

Related to: #3095

Just update styleguide/assets/variables.css using the script below in preparation to automate this process.

NEXTCLOUD=http://nextcloud.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 vinicius73 added 3. to review Waiting for reviews design Design, UX, interface and interaction design configuration Pull requests that update a config file labels Aug 29, 2022
Copy link
Contributor

@raimund-schluessler raimund-schluessler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies random dark styles from the server I guess. Most buttons have a dark background, hover effects are weird, action menus are black. There is more stuff, that is easily visible if one looks at the result in the docs once.

See the button component as example:
Screenshot 2022-08-30 at 10-50-31 Nextcloud Vue Style Guide

Edit: I realized this happens because my system/browser is set to dark mode. But if the styleguide reacts to this setting it should work properly (or be ignored completely, as it is now).

Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
@raimund-schluessler raimund-schluessler merged commit c73eb58 into master Aug 30, 2022
@raimund-schluessler raimund-schluessler deleted the 3095-update-css-vars-with-server-ones branch August 30, 2022 19:11
@skjnldsv
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews configuration Pull requests that update a config file design Design, UX, interface and interaction design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants