NativeScript / theme

@nativescript/theme
https://v7.docs.nativescript.org/ui/theme
Apache License 2.0
127 stars 44 forks source link

fixes #293 #294

Closed shiv19 closed 2 years ago

shiv19 commented 3 years ago

PR Checklist

What is the current behavior?

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(blue($color) * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
75 │     $color-brightness: round((red($color) * 299) + (green($color) * 587) + (blue($color) * 114) / 1000);
   │                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 75:76  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(blue($color) * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
75 │     $color-brightness: round((red($color) * 299) + (green($color) * 587) + (blue($color) * 114) / 1000);
   │                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 75:76  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            @import
    app/app.ios.scss 2:9                                                root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(blue($color) * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
75 │     $color-brightness: round((red($color) * 299) + (green($color) * 587) + (blue($color) * 114) / 1000);
   │                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 75:76  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            @import
    app/app.android.scss 2:9                                            root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(blue(#ffffff) * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
76 │     $light-color: round((red(#ffffff) * 299) + (green(#ffffff) * 587) + (blue(#ffffff) * 114) / 1000);
   │                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 76:73  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(blue(#ffffff) * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
76 │     $light-color: round((red(#ffffff) * 299) + (green(#ffffff) * 587) + (blue(#ffffff) * 114) / 1000);
   │                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 76:73  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            @import
    app/app.ios.scss 2:9                                                root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(blue(#ffffff) * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
76 │     $light-color: round((red(#ffffff) * 299) + (green(#ffffff) * 587) + (blue(#ffffff) * 114) / 1000);
   │                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 76:73  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            @import
    app/app.android.scss 2:9                                            root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($light-color, 1.7)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
78 │     @return abs($color-brightness) < ($light-color / 1.7);
   │                                       ^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 78:39  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($light-color, 1.7)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
78 │     @return abs($color-brightness) < ($light-color / 1.7);
   │                                       ^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 78:39  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            @import
    app/app.ios.scss 2:9                                                root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($light-color, 1.7)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
78 │     @return abs($color-brightness) < ($light-color / 1.7);
   │                                       ^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 78:39  check-contrast()
    node_modules/@nativescript/theme/scss/mixins/_utilities.scss 84:49  alternate()
    node_modules/@nativescript/theme/scss/variables/_index.scss 56:11   @import
    node_modules/@nativescript/theme/scss/core/_index.scss 2:9          @import
    node_modules/@nativescript/theme/core.scss 8:9                      @import
    app/_app-common.scss 1:9                                            @import
    app/app.android.scss 2:9                                            root stylesheet

What is the new behavior?

This will remove the warnings

Fixes/Implements/Closes #[Issue Number].

293

sebj54 commented 2 years ago

Hi @NathanWalker and @rigor789, do you have time to review this PR so we can get rid of these (quite annoying) Sass warnings? Thanks in advance :)

I can't change the PR's title to make it follow semantic guidelines but I would update it like this:

refactor: replace Sass divisions by math.div