Skip to content

Fully deprecate old variables#257

Draft
AyIong wants to merge 2 commits intotgstation:mainfrom
AyIong:cleanup
Draft

Fully deprecate old variables#257
AyIong wants to merge 2 commits intotgstation:mainfrom
AyIong:cleanup

Conversation

@AyIong
Copy link
Copy Markdown
Collaborator

@AyIong AyIong commented Apr 14, 2026

About the PR

I think it's time to fully eliminate old sass variables, which must not be used anymore ...

All functions that base and colors files contains, moved to functions file, for the consistency
Contents of vars-colors.scss and vars-values.scss moved to colors.scss and base.scss respectively

Important

You must manually migrate the functions uses
@use '../base.scss'; -> @use '~tgui-core/styles/functions.scss' as fn;
Or stay on local files

em() & rem() functions now uses css font-size variable instead sass placeholder, which was 12px

Note

Using those functions in css variables, requires wrap it inside #{}
For example: --some-size: #{fn.em(26px)};

Why's this needed?

Less trash code and unused files

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.

1 participant