Skip to content

Commit a7fc98c

Browse files
authored
Merge pull request #5673 from HSLdevcom/sass-deps-v3
update sass deps to v3
2 parents a4ee69d + 7f40336 commit a7fc98c

File tree

9 files changed

+2312
-2383
lines changed

9 files changed

+2312
-2383
lines changed

app/component/navigation.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
@use 'sass:math';
2+
13
@function navbar-icon-color($color) {
24
@if $nav-content-color {
35
// if defined in theme, return nav-content-color
46
@return $nav-content-color;
57
}
68

79
$background-color-brightness: (red($color) * 299) + (green($color) * 587) +
8-
(blue($color) * 114) / 1000;
10+
math.div(blue($color) * 114, 1000);
911
$light-color-lightness: round(
10-
(red(#fff) * 299) + (green(#fff) * 587) + (blue(#fff) * 114) / 1000
12+
(red(#fff) * 299) + (green(#fff) * 587) + math.div(blue(#fff) * 114, 1000)
1113
);
1214

13-
@if abs($background-color-brightness) < ($light-color-lightness / 3) {
15+
@if abs($background-color-brightness) < math.div($light-color-lightness, 3) {
1416
@return #ffffff;
1517
} @else {
1618
@return #333333;

app/component/routepage/route.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,8 @@ $margin-left-right: 21.3px;
707707

708708
.route-schedule-header {
709709
padding: 9.6px 0 2px 0;
710+
margin-left: 0;
711+
margin-right: 0;
710712

711713
@media print {
712714
margin-left: 0;
@@ -812,8 +814,8 @@ $margin-left-right: 21.3px;
812814

813815
.route-schedule-dropdowns {
814816
display: flex;
815-
flex-wrap: wrap;
816817
justify-content: space-between;
818+
flex-direction: row;
817819

818820
@media print {
819821
display: none;

config/rollup.config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,19 @@ export default async () => {
119119
extract: false,
120120
plugins: [autoprefixer()],
121121
modules: true,
122-
use: ['sass'],
122+
use: [
123+
[
124+
'sass',
125+
{
126+
quietDeps: true,
127+
silenceDeprecations: [
128+
'import',
129+
'global-builtin',
130+
'color-functions',
131+
],
132+
},
133+
],
134+
],
123135
config: false,
124136
}),
125137
json(),

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
"connect-redis": "5.0.0",
151151
"cookie-parser": "1.4.7",
152152
"debug": "4.3.4",
153-
"downshift": "^9.0.10",
153+
"downshift": "9.0.10",
154154
"express": "4.21.2",
155155
"express-http-proxy": "1.6.3",
156156
"express-session": "1.18.1",
@@ -161,7 +161,7 @@
161161
"fluxible-addons-react": "0.2.17",
162162
"found": "0.5.9",
163163
"found-relay": "1.0.2",
164-
"foundation-apps": "1.2.0",
164+
"foundation-sites": "6.9.0",
165165
"helmet": "4.1.0",
166166
"hoist-non-react-statics": "2.5.5",
167167
"i18next": "22.5.1",
@@ -202,8 +202,7 @@
202202
"suncalc": "1.8.0",
203203
"supercluster": "^7.1.5",
204204
"universal-cookie": "7.2.2",
205-
"uuid": "8.3.2",
206-
"zurb-foundation-5": "5.4.7"
205+
"uuid": "8.3.2"
207206
},
208207
"peerDependencies": {
209208
"@octokit/core": ">=3",
@@ -277,7 +276,7 @@
277276
"mocha": "11.2.2",
278277
"mock-local-storage": "1.1.24",
279278
"mockdate": "3.0.5",
280-
"node-sass": "^9.0.0",
279+
"node-gyp": "12.1.0",
281280
"nodemon": "1.18.10",
282281
"optimize-css-assets-webpack-plugin": "5.0.8",
283282
"playwright": "1.16.2",
@@ -292,6 +291,7 @@
292291
"rollup-plugin-peer-deps-external": "2.2.4",
293292
"rollup-plugin-postcss": "4.0.2",
294293
"rollup-plugin-terser": "7.0.2",
294+
"sass": "^1.97.2",
295295
"sass-loader": "^10.5.2",
296296
"selenium-webdriver": "4.0.0-alpha.1",
297297
"sinon": "19.0.5",
@@ -309,6 +309,7 @@
309309
},
310310
"resolutions": {
311311
"html-webpack-plugin": "4.5.2",
312-
"sharp": "0.33"
312+
"sharp": "0.33",
313+
"cheerio": "1.0.0-rc.10"
313314
}
314315
}

sass/_foundation-setup.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* stylelint-disable no-invalid-position-at-import-rule */
2+
$global-flexbox: false; // Use float grid like Foundation 5
3+
$xy-grid: false; // Disable XY grid
4+
5+
@import 'foundation';
6+
@include foundation-global-styles;
7+
@include foundation-grid;
8+
@include foundation-typography;
9+
@include foundation-forms;
10+
@include foundation-visibility-classes;
11+
@include foundation-float-classes;
12+
13+
$small-up: 'only screen' !global;
14+
$medium-up: 'only screen and (min-width: #{-zf-bp-to-em(map-get($breakpoints, "medium"))})' !global;
15+
$large-up: 'only screen and (min-width: #{-zf-bp-to-em(map-get($breakpoints, "large"))})' !global;
16+
$xlarge-up: 'only screen and (min-width: #{-zf-bp-to-em(map-get($breakpoints, "xlarge"))})' !global;
17+
$xxlarge-up: 'only screen and (min-width: #{-zf-bp-to-em(map-get($breakpoints, "xxlarge"))})' !global;
18+
19+
// For -only queries, we need the next breakpoint minus 1/16em (0.0625em)
20+
$small-only: 'only screen and (max-width: #{-zf-bp-to-em(map-get($breakpoints, "medium")) - 0.0625em})' !global;
21+
$medium-only: 'only screen and (min-width: #{-zf-bp-to-em(map-get($breakpoints, "medium"))}) and (max-width: #{-zf-bp-to-em(map-get($breakpoints, "large")) - 0.0625em})' !global;
22+
$large-only: 'only screen and (min-width: #{-zf-bp-to-em(map-get($breakpoints, "large"))}) and (max-width: #{-zf-bp-to-em(map-get($breakpoints, "xlarge")) - 0.0625em})' !global;

sass/_main.scss

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
/* Set Foundation base font to theme font
22
(without this Foundation overrides body */
3+
$font-weight-bold: 700;
4+
$font-weight-normal: $font-weight-medium;
35
$body-font-family: $font-family;
46
$body-font-weight: $font-weight-medium;
57

6-
/* Base styles */
8+
@import 'foundation-setup';
79
@import 'base/zindex';
810
@import 'base/helper-mixins';
911
@import 'base/base';
1012
@import 'base/form';
1113
@import 'base/helper-classes';
1214
@import 'base/elements';
13-
@import '~zurb-foundation-5/scss/foundation/components/grid';
15+
@import 'grid/grid';
16+
@import 'util/util';
1417
@import 'base/helper-classes-after-foundations';
1518
@import 'base/spacing';
1619
@import 'base/radius';
@@ -40,7 +43,6 @@ $body-font-weight: $font-weight-medium;
4043
@import '../app/component/visual/index';
4144
@import '../app/component/bubble-dialog';
4245
@import '../app/component/select-maplayers-dialog';
43-
@import '~zurb-foundation-5/scss/foundation/components/forms';
4446
@import '../app/component/zone-icon';
4547
@import '../app/component/date-select';
4648
@import '../app/component/routepage/route-schedule-dropdown';
@@ -71,10 +73,3 @@ $body-font-weight: $font-weight-medium;
7173
@import '../app/component/trafficnow/trafficnow';
7274
@import '../app/component/popover';
7375
@import '../app/component/animations';
74-
75-
/* Modal */
76-
@import '~foundation-apps/scss/helpers/breakpoints';
77-
@import '~foundation-apps/scss/components/modal';
78-
79-
// And these application specific styles use Foundation variables,
80-
// so they have to be loaded afterwards

sass/base/_base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ html {
2222
/* Disable touch delay on ms-devices */
2323
touch-action: manipulation;
2424
font-size: 15px !important;
25+
height: 100%;
2526
}
2627

2728
@media screen and (min-width: 320px) {
@@ -54,6 +55,9 @@ body {
5455
font-family: $font-family;
5556
font-weight: $font-weight-medium;
5657
letter-spacing: $letter-spacing;
58+
height: 100%;
59+
margin: 0;
60+
color: $black !important;
5761

5862
/* Remove Mobile Safari automatic font size adjustments */
5963
text-size-adjust: 100%;

webpack.config.babel.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,23 @@ module.exports = {
213213
'css-loader',
214214
'postcss-loader',
215215
'sass-loader',
216+
{
217+
loader: 'sass-loader',
218+
options: {
219+
sassOptions: {
220+
includePaths: [
221+
path.join(__dirname, 'node_modules/foundation-sites/scss'),
222+
],
223+
quietDeps: true,
224+
silenceDeprecations: [
225+
'import',
226+
'global-builtin',
227+
'color-functions',
228+
'if-function',
229+
],
230+
},
231+
},
232+
},
216233
],
217234
},
218235
{

0 commit comments

Comments
 (0)