Centralize Sass variables into single file#1693
Merged
Merged
Conversation
Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.2. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](rack/rack@2.2.4...v2.2.6.2) --- updated-dependencies: - dependency-name: rack dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
This reverts commit 17f25cf.
damianhxy
approved these changes
Jan 22, 2023
damianhxy
left a comment
Member
There was a problem hiding this comment.
Tested with precompile method, LGTM
damianhxy
reviewed
Jan 22, 2023
damianhxy
approved these changes
Jan 22, 2023
damianhxy
left a comment
Member
There was a problem hiding this comment.
Other than the one missing style, LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move Sass variables into
_variables.scssin order to centralize variables into a file that can be imported into other scss / css files, without having duplicating css in production from importing. Duplicating css code was introduced after #1649 and subsequently #1657. Other features also duplicated the variables in separate CSS files.Solution derived from the following post.
Note: The recommended option suggested to import variables in Sass is to use the
@use '<file>'syntax, butsass-railswhich is now deprecated doesn't support this functionality. We should probably move to dart-sass which is still actively being supported.Description
_variables.scssto hold application-wide sass (don't useapplication.scssas it imports a ton of CSS from materialize and bootstrap)import style.css.scssfromusersTable.css.scssHow Has This Been Tested?
RAILS_ENV=development bundle exec rake assets:precompileon local development server and check the aboveTypes of changes
Checklist:
overcommit --install && overcommit --signto use pre-commit hook for linting