scss: migrate @import -> @use, lighten/darken -> color.adjust (dart-sass)
Silences the dart-sass deprecation warnings that flooded every build: - All @import of local partials (colors, mixins, and the CSS-emitting partials) -> @use '...' as * (partials are pure defs, so 'as *' keeps the global names and the ~25 call sites unchanged). Added explicit @use './colors' to bootstrap-overrides.scss and cookies-eu.scss, which used -palette* transitively (broke under @use's scoping). - lighten(c, x%) -> color.adjust(c, $lightness: x%) and darken -> negative, with @use 'sass:color' in the 6 affected files. Compiles clean (byte-for-byte CSS behavior preserved).
This commit is contained in:
parent
62ac2fbd9c
commit
c6c22643c1
26 changed files with 60 additions and 52 deletions
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.AccountPageFooter {
|
||||
margin: 25px 0 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
.Content {
|
||||
max-width: 700px;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
.dist-slider {
|
||||
width: 400px;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* From: https://github.com/spektom/bootstrap-feedback-form */
|
||||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
#feedback {
|
||||
position: fixed;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.InputHint {
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@use 'sass:color';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.OAuthLoginButton {
|
||||
/* display: block;
|
||||
|
|
@ -19,21 +20,21 @@
|
|||
background: $facebook;
|
||||
color: #fff;
|
||||
|
||||
&:hover { background: darken($facebook, 5%); }
|
||||
&:hover { background: color.adjust($facebook, $lightness: -5%); }
|
||||
}
|
||||
|
||||
&.OAuthLoginButton-google {
|
||||
background: $google;
|
||||
color: #fff;
|
||||
|
||||
&:hover { background: darken($google, 5%); }
|
||||
&:hover { background: color.adjust($google, $lightness: -5%); }
|
||||
}
|
||||
|
||||
&.OAuthLoginButton-github {
|
||||
background: $github;
|
||||
color: #fff;
|
||||
|
||||
&:hover { background: darken($github, 5%); }
|
||||
&:hover { background: color.adjust($github, $lightness: -5%); }
|
||||
}
|
||||
|
||||
&:active {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@use 'sass:color';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.OAuthLoginButtons {
|
||||
margin-bottom: 25px;
|
||||
|
|
@ -11,7 +12,7 @@
|
|||
.EmailMessage {
|
||||
display: inline-block;
|
||||
background: #fff; /* default */
|
||||
background: lighten($todos-palette5, 70%);
|
||||
background: color.adjust($todos-palette5, $lightness: 70%);
|
||||
padding: 0 10px;
|
||||
position: absolute;
|
||||
bottom: -27px;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.PageHeader {
|
||||
border-bottom: 1px solid $gray-lighter;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
.selectionmap-leaflet-container {
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.App > .container {
|
||||
margin-bottom: 20px;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
.fire-leaflet-container {
|
||||
min-height: 40vh;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
/* https://github.com/PaulLeCam/react-leaflet/issues/108 */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.full-width {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use 'sass:color';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.Index {
|
||||
padding: 20px;
|
||||
background: lighten($todos-back1, 75%);
|
||||
background: color.adjust($todos-back1, $lightness: 75%);
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
color: $todos-font1;
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
|
||||
p {
|
||||
font-size: 18px;
|
||||
color: lighten($cb-blue, 25%);
|
||||
color: color.adjust($cb-blue, $lightness: 25%);
|
||||
}
|
||||
|
||||
> div {
|
||||
|
|
@ -41,18 +42,18 @@
|
|||
|
||||
footer {
|
||||
margin: 20px -20px -20px;
|
||||
border-top: 1px solid darken($cb-blue, 10%);
|
||||
border-top: 1px solid color.adjust($cb-blue, $lightness: -10%);
|
||||
padding: 20px;
|
||||
|
||||
p {
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: lighten($cb-blue, 35%);
|
||||
color: color.adjust($cb-blue, $lightness: 35%);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p a {
|
||||
color: lighten($cb-blue, 35%);
|
||||
color: color.adjust($cb-blue, $lightness: 35%);
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use 'sass:color';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.Logout {
|
||||
margin: 20px;
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
|
||||
p {
|
||||
font-size: 18px;
|
||||
color: lighten($todos-palette3, 25%);
|
||||
color: color.adjust($todos-palette3, $lightness: 25%);
|
||||
}
|
||||
|
||||
ul {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
|
||||
.Page {
|
||||
margin-bottom: 0px;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.OAuthProfile {
|
||||
.LoggedInWith {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../stylesheets/mixins';
|
||||
@import '../../stylesheets/colors';
|
||||
@use '../../stylesheets/mixins' as *;
|
||||
@use '../../stylesheets/colors' as *;
|
||||
|
||||
.subscriptionsmap-leaflet-container {
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@import './colors';
|
||||
@import './forms';
|
||||
@import './bootstrap-overrides';
|
||||
@import './custom';
|
||||
@import './cookies-eu';
|
||||
@import './new-age';
|
||||
@use './colors' as *;
|
||||
@use './forms' as *;
|
||||
@use './bootstrap-overrides' as *;
|
||||
@use './custom' as *;
|
||||
@use './cookies-eu' as *;
|
||||
@use './new-age' as *;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
@import './mixins';
|
||||
@use 'sass:color';
|
||||
@use './mixins' as *;
|
||||
@use './colors' as *;
|
||||
|
||||
body {
|
||||
background-color: lighten($todos-palette5, 70%);
|
||||
background-color: color.adjust($todos-palette5, $lightness: 70%);
|
||||
/* for fixed header */
|
||||
/* padding-top: 50px; */
|
||||
overflow-x: hidden;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
@use 'sass:color';
|
||||
@use './colors' as *;
|
||||
#js-cookie-policy-default {
|
||||
background-color: lighten($todos-palette3, 10%);
|
||||
background-color: color.adjust($todos-palette3, $lightness: 10%);
|
||||
}
|
||||
|
||||
.cookie-policy {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import './mixins';
|
||||
@import './colors';
|
||||
@use './mixins' as *;
|
||||
@use './colors' as *;
|
||||
|
||||
a, a:hover {
|
||||
color: $todos-palette1a;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@import './mixins';
|
||||
@import './colors';
|
||||
@use './mixins' as *;
|
||||
@use './colors' as *;
|
||||
|
||||
form {
|
||||
label,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import './mixins';
|
||||
@use './mixins' as *;
|
||||
|
||||
/*!
|
||||
* Start Bootstrap - New Age v4.0.0-beta.2 (https://startbootstrap.com/template-overviews/new-age)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue