Skip to content

Commit

Permalink
Workflows: improve node-sass error message when Sass vars are found
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond committed Apr 12, 2023
1 parent 137bfba commit 72a5d8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/node-sass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ jobs:
- name: Check built CSS files
shell: bash
run: |
if [[ $(find dist-sass/css/ -name "*.css" | xargs grep -F "\$" | wc -l | bc) -eq 0 ]]; then
SASS_VARS_FOUND=`find dist-sass/css/ -name "*.css" | xargs grep -F "\$"`
if [ -z "$SASS_VARS_FOUND" ]; then
echo "All good, no Sass variables found"
exit 0
else
echo "Found Sass variables!"
echo "Found $(echo "$SASS_VARS_FOUND" | wc -l | bc) Sass variables:"
echo "$SASS_VARS_FOUND"
exit 1
fi
4 changes: 2 additions & 2 deletions scss/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// Prevent double borders when buttons are next to each other
> :not(.btn-check:first-child) + .btn,
> .btn-group:not(:first-child) {
margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
margin-left: calc($btn-border-width * -1); // stylelint-disable-line function-disallowed-list
}

// Reset rounded corners
Expand Down Expand Up @@ -126,7 +126,7 @@

> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
margin-top: calc($btn-border-width * -1); // stylelint-disable-line function-disallowed-list
}

// Reset rounded corners
Expand Down

0 comments on commit 72a5d8c

Please sign in to comment.