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

Fatima/cookiecutter sass #313

Merged
merged 9 commits into from
Apr 21, 2023
Merged

Fatima/cookiecutter sass #313

merged 9 commits into from
Apr 21, 2023

Conversation

fgomez828
Copy link
Contributor

@fgomez828 fgomez828 commented Jan 26, 2023

Overview

This PR adds Bootstrap and Sass as dependencies in package.json, adds the develop script to package.json, and adds a static/scss/custom.scss file with the boostrap style import to facilitate overriding Bootstrap styles with Sass on apps we set up with the Django and Wagtail cookiecutter boilerplates. It also adds a bit of documentation and helpful links in the docker/templates README.

Handles #308
Handles #319

Notes

Testing Instructions

  • Create an example Django app using the cookiecutter and run it using docker-compose up --build
  • Check a default bootstrap style for your Django app, e.g., navbar color
  • Use the Sass file to update the bootstrap style you took note of. Run the develop script on your running container using docker-compose exec app npm run-script develop
  • Check your browser again and make sure the new style is applied
  • make some changes to JavaScript and try to commit them; make sure linting works as expected
  • Repeat the above steps for a Wagtail app

@hancush
Copy link
Member

hancush commented Jan 26, 2023

@fgomez828
Copy link
Contributor Author

fgomez828 commented Jan 27, 2023

Gotcha! I've gone ahead and moved the boilerplate code to have that import at the top of the scss files in both affected cookiecutters. I'll go ahead and test this way before requesting someone else's review.

I am curious about CDI though, as this was the model I was using and it has this import at the bottom of the file?

@fgomez828
Copy link
Contributor Author

fgomez828 commented Jan 27, 2023

on another note, looks like Dart Sass has phased out @import and uses @use instead. It'll be worth keeping an eye out, especially as we find a way to update our dependencies per #312

I need to take some time to figure out which version of Sass we use, but here's the Dart Sass Github repo

Update:
we are using dart-sass as an npm package.

@fgomez828 fgomez828 changed the title [WIP] Fatima/cookiecutter sass Fatima/cookiecutter sass Apr 21, 2023
@fgomez828 fgomez828 merged commit a6a022f into main Apr 21, 2023
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

Successfully merging this pull request may close these issues.

3 participants