Skip to content

Commit

Permalink
Merge pull request #98 from CityOfDetroit/Fix.Sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
jedgar1mx authored Sep 26, 2023
2 parents 745af42 + 03f0407 commit f818fa3
Show file tree
Hide file tree
Showing 4 changed files with 1,088 additions and 1,028 deletions.
45 changes: 45 additions & 0 deletions scripts/compile_bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

DEFAULT_PROJECT_ROOT=./
PROJECT_ROOT=${1:-$DEFAULT_PROJECT_ROOT}

if [[ ! -d $PROJECT_ROOT ]];
then
echo ${PROJECT_ROOT}" is not a directory..."
exit 1
fi

compile_sass () {
echo "Compiling bootstrap SASS..."
yarn sass ${PROJECT_ROOT}src/scss/themed-bootstrap.scss ${PROJECT_ROOT}src/shared/themed-bootstrap.css
if [ $? -ne 0 ];
then
echo "Failed to compile bootstrap... Aborting."
exit 1
fi
}

replace_rem_w_em () {
echo "Replacing REMs with EMs..."
sed -i -r "s|([0-9])rem|\1em|g" ${PROJECT_ROOT}src/shared/themed-bootstrap.css
if [ $? -ne 0 ];
then
echo "Failed to replace content... Aborting."
exit 1
fi
}

format_bootstrap () {
echo "Formatting output..."
yarn prettier -w ${PROJECT_ROOT}src/shared/themed-bootstrap.css
if [ $? -ne 0 ];
then
echo "Formatting output failed... Aborting."
exit 1
fi
}

compile_sass
replace_rem_w_em
format_bootstrap
exit $?
10 changes: 10 additions & 0 deletions src/scss/themed-bootstrap.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// This SASS file customizes base bootstrap to meet the needs of the UXDS. The compiled output
// should be stored in src/shared/themed-bootstrap.css.

// The next comment line will be included in the compiled output and is only intended for readers
// of the compiled output. Please ignore in this file.
/**
* GENERATED CSS. DO NOT MODIFY.
* This file is generated from source SASS in src/scss/themed-bootstrap.scss. If you'd like to make
* changes please change the source file or the code generation script at scripts/compile_bootstrap.sh.
*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;700&display=swap');
$primary: #004445 !default;
$secondary: #e6e6e6 !default;
Expand Down
Loading

0 comments on commit f818fa3

Please sign in to comment.