minima icon indicating copy to clipboard operation
minima copied to clipboard

lighten is deprecated

Open mathieujobin opened this issue 10 months ago • 7 comments

Hi,

I am not sure why they deprecate such a simple and useful function. I'm kind of tempted to just silence it by doing a local redefinition, but I am not a scss expert.

I am getting this deprecation warning...

Deprecation Warning [color-functions]: lighten() is deprecated. Suggestions:

color.scale($color, $lightness: 66.5217391304%)
color.adjust($color, $lightness: 6%)

I believe its from the auto.scss file ? anybody has a strong opinion on which direction we should take?

mathieujobin avatar Jan 30 '25 04:01 mathieujobin

Have you tried the following in order to silence deprecations?:

# in _config.yml

sass:
  quiet_deps: true

ashmaroli avatar Jan 30 '25 06:01 ashmaroli

That should quiet the warnings. But do you expect the released version of 3.0.0 to eliminate those depreciations?

bobrocke avatar Feb 06 '25 19:02 bobrocke

No. v3.0 won't remove the deprecated usage for the benefit of users consuming this theme via github-pages with jekyll-remote-theme. (GHP flow is locked to use the legacy Ruby Sass syntax(es)).

ashmaroli avatar Feb 07 '25 06:02 ashmaroli

I am happy to hear, this won't be removed in the next release... But I am still uncomfortable disabling warnings at large...

mathieujobin avatar Feb 25 '25 09:02 mathieujobin

@ashmaroli Are we sure the alternatives suggested ($color.adjust) aren't available? According to this page, GHP's sass is new enough to support the changes. I didn't test anything.

edit: Embarrassing, I didn't understand the compatibility table. It is supported in dart but not libsass, as patiently explained by ashmaroli below and clearly indicated by the sass doc I linked.

trysten avatar Mar 20 '25 18:03 trysten

Hello @trysten, the sass gem used by GitHub Pages is the legacy Ruby Sass lib that has been marked EOL since 2019. The $color.adjust documentation you have linked to requires the modern implementation, Dart Sass (atleast v1.23) and is not available with either Ruby Sass nor with its successor LibSass (as explicitly indicated in the linked doc page).

ashmaroli avatar Mar 21 '25 02:03 ashmaroli

Also, it could be possible to use CSS functions / variables for this functionality - and maybe let go SCSS/SASS , as the variables and color functions are now available in CSS3 and became widely available, which changed since dozen years ago when minima was created. I managed to do this in https://github.com/vadimkantorov/minimacss: https://github.com/vadimkantorov/minimacss/blob/master/auto.scss -> builds out CSS files which uses CSS variables / CSS color functions. So for theme modification, rerunning SASS is not necessary. In my ideal world, upstream minima would just move on to use pure CSS (with variables and color functions) - for even more simplicity

vadimkantorov avatar Apr 27 '25 14:04 vadimkantorov