Skip to content

css refactor: Convert color scss variables to css variables#5223

Merged
veganstraightedge merged 1 commit intocrimethinc:mainfrom
Bargraph6:css-refactor-color-variables
Apr 2, 2026
Merged

css refactor: Convert color scss variables to css variables#5223
veganstraightedge merged 1 commit intocrimethinc:mainfrom
Bargraph6:css-refactor-color-variables

Conversation

@Bargraph6
Copy link
Copy Markdown
Contributor

@Bargraph6 Bargraph6 commented Mar 26, 2026

What are the relevant GitHub issues?

related to this PR: #5212

What does this pull request do?

Almost all of this is find/replace. The one additional change is in the _colors.scss file I removed an unused variable ($header-color-list)

How should this be manually tested?

  • Just being able to load the site without a sass error is a good sign
  • clicking around and seeing the colors look correct
  • I provided screenshots for the the two spots where I replaced a sass lighten/darken function with css relative color syntax:
before after
before-tools after-tools
before-support after-support

Is there any background context you want to provide for reviewers?

This is one PR in what will be an extended series of commits to eventually drop the css and js pre-processor gem dependencies as discussed in #5212

This is very similar to the border size variables PR that was merged in #5216

Questions for the pull request author (delete any that don't apply):

  • Are any needed README/wiki/documentation updates needed for this pull request?
  • Does the code you updated have tests? If not, could you add some please?
  • Does this pull request require any new server dependencies which need to be added to the build process? If so, please explain what.

Acceptance Criteria

These should be checked by the reviewers

  • This pull request does not cause the database export script to become out of sync with the db schema

@Bargraph6 Bargraph6 force-pushed the css-refactor-color-variables branch from 1b2cb80 to ced5813 Compare March 26, 2026 11:52
@Bargraph6 Bargraph6 marked this pull request as ready for review March 26, 2026 12:29
@Bargraph6
Copy link
Copy Markdown
Contributor Author

@veganstraightedge @just1602 here are the color variables.

after this, I'll do the comment syntax. The comments should be the last big multi-file change before moving on to converting the individual component files

@veganstraightedge veganstraightedge merged commit eae7461 into crimethinc:main Apr 2, 2026
1 check passed
@Bargraph6 Bargraph6 deleted the css-refactor-color-variables branch April 14, 2026 08:37
just1602 pushed a commit that referenced this pull request Apr 14, 2026
# What are the relevant GitHub issues?

related to this PR: #5212

# What does this pull request do?

All of this is find/replace of SCSS comment syntax (`// comment`) with
CSS comment syntax (`/* comment */`)

# How should this be manually tested?

- Just being able to load the site without a sass error is a good sign

# Is there any background context you want to provide for reviewers?

This is one PR in what will be an extended series of commits to
eventually drop the css and js pre-processor gem dependencies as
discussed in #5212

As referenced in the color variable PR
([#5223](#5223 (comment))),
this should be the last PR in this series that touches many files at
once. The next step is to convert each SCSS file to CSS files either
file by file or in small groups where it make sense.

# Questions for the pull request author (delete any that don't apply):
- [ ] Are any needed README/wiki/documentation updates needed for this
pull request?
- [ ] Does the code you updated have tests? If not, could you add some
please?
- [ ] Does this pull request require any new server dependencies which
need to be added to the build process? If so, please explain what.

# Acceptance Criteria
## These should be checked by the reviewers

- [x] This pull request does not cause the database export script to
become out of sync with the db schema
@Bargraph6 Bargraph6 mentioned this pull request Apr 14, 2026
4 tasks
Bargraph6 added a commit to Bargraph6/website that referenced this pull request Apr 20, 2026
What does this commit do
===========================

Since the [conversion of the social icons from SCSS to CSS][0] has
reached production and is working, we can move forward with renaming
several `.scss` files to `.css`.

**This is only a rename**.  No changes are needed for these files as
they already contains only CSS markup.

There are other files that contain only CSS that need to be
renamed. However, since they are larger files I will rename them in
individual commits in case there is some SCSS syntax I missed.

Changelog
===========================

* 2017/articles_custom_css.css: This file is rather small, so it easy
to see that it only contains CSS. I also tested this locally and it
still works as a CSS file.
* 2017/base/variables/_borders.scss: previously converted to css in
[ba7c239][1].  Doing rename now as the social icons test worked in
production.
* 2017/base/variables/_colors.scss: previously converted to css in
[eae7461][2].  Doing rename now as the social icons test worked in
production.
* 2017/components/_buttons.scss: With the previous commits to replace
border and color SCSS variables with CSS variables done, this file now
only contains CSS and can be renamed.
* 2017/components/_colors.scss: This file is rather small, so it is
easy to see that it only contains CSS.
* 2017/components/_localization.scss: This file is very small (3
lines), so it is easy to see that it only contains CSS.
* 2017/lib/_reset.scss: As referenced in the header comment, this file
is a copy/paste of a CSS file.
* 2017/lib/_utilities.scss: This file is very small (3 lines), so it
is easy to see that it only contains CSS.

---

related to: crimethinc#5212
related to: crimethinc#5259
related to: crimethinc#5223
related to: crimethinc#5216

[0]:crimethinc#5259
[1]:crimethinc@ba7c239
[2]:crimethinc@eae7461
just1602 pushed a commit to Bargraph6/website that referenced this pull request Apr 20, 2026
What does this commit do
===========================

Since the [conversion of the social icons from SCSS to CSS][0] has
reached production and is working, we can move forward with renaming
several `.scss` files to `.css`.

**This is only a rename**.  No changes are needed for these files as
they already contains only CSS markup.

There are other files that contain only CSS that need to be
renamed. However, since they are larger files I will rename them in
individual commits in case there is some SCSS syntax I missed.

Changelog
===========================

* 2017/articles_custom_css.css: This file is rather small, so it easy
to see that it only contains CSS. I also tested this locally and it
still works as a CSS file.
* 2017/base/variables/_borders.scss: previously converted to css in
[ba7c239][1].  Doing rename now as the social icons test worked in
production.
* 2017/base/variables/_colors.scss: previously converted to css in
[eae7461][2].  Doing rename now as the social icons test worked in
production.
* 2017/components/_buttons.scss: With the previous commits to replace
border and color SCSS variables with CSS variables done, this file now
only contains CSS and can be renamed.
* 2017/components/_colors.scss: This file is rather small, so it is
easy to see that it only contains CSS.
* 2017/components/_localization.scss: This file is very small (3
lines), so it is easy to see that it only contains CSS.
* 2017/lib/_reset.scss: As referenced in the header comment, this file
is a copy/paste of a CSS file.
* 2017/lib/_utilities.scss: This file is very small (3 lines), so it
is easy to see that it only contains CSS.

---

related to: crimethinc#5212
related to: crimethinc#5259
related to: crimethinc#5223
related to: crimethinc#5216

[0]:crimethinc#5259
[1]:crimethinc@ba7c239
[2]:crimethinc@eae7461
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