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

Consistent CSS (move all sizing to rem) #337

Open
Kimeiga opened this issue Nov 20, 2019 · 3 comments
Open

Consistent CSS (move all sizing to rem) #337

Kimeiga opened this issue Nov 20, 2019 · 3 comments
Labels

Comments

@Kimeiga
Copy link
Contributor

Kimeiga commented Nov 20, 2019

this is a big Maybe. But consistent css especially on the desktop calendar view yes

@Kimeiga Kimeiga added bug maybe For features that we are not sure if we should add them for sure or not labels Nov 20, 2019
@r-holland r-holland changed the title consistent css (move all sizing to rem) Consistent CSS (move all sizing to rem) Dec 4, 2019
@r-holland r-holland removed the maybe For features that we are not sure if we should add them for sure or not label Dec 4, 2019
@wfehrnstrom
Copy link
Contributor

wfehrnstrom commented Dec 12, 2019

Useful precommit hook script to ensure that all references to px are known and eventually phased out:

#!/bin/bash

WORK_DIR=$1
SRCH_PATH=$WORK_DIR/src
CMD=$(grep --include=\*.{sc,c}ss --line-buffered -Ern -e 'px' $SRCH_PATH)
if [[ $CMD != '' ]]; then
	echo "-- WARNING: non-relative px units found in the following css files. we are trying to make all css rem based. --" 
	echo "$CMD"
	read -r -p "Are you sure you still want to commit this code? (y/n): " response
	case "$response" in
		[yY][eE][sS]|[yY])
			exit 0
			;;
		*)
			exit 1
			;;
	esac 	
fi 
exit 1

@Kimeiga
Copy link
Contributor Author

Kimeiga commented Dec 15, 2019

This is awesome! How do we integrate it into the build process?

@wfehrnstrom
Copy link
Contributor

It's a git-hook so normally it has to be run within the hooks folder of .git. We should decide whether we want to keep this normal structure or whether we want to version our hooks so we track their changes. This can be done by changing git config to point its hook directory variable at another location that is versioned, somewhere outside the .git folder. I've added a commit to the consistent css branch that does exactly this, because I think versioning the hooks themselves is a good idea but it definitely has drawbacks too: more state to keep track of. In order to switch to the new git-hooks location once you've pulled in my changes, run "make init" and that will change your hooks config variable. If everyone does this when they pull in my changes than the new git hook will automatically run for everyone pre-commit stage

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

No branches or pull requests

3 participants