Skip to content

Commit fa0c190

Browse files
authored
Merge pull request #5 from eduNEXT/jipm/added-css-variables-support-sumac
feat: add css variables support sumac
2 parents 021f52b + 75d8005 commit fa0c190

15 files changed

Lines changed: 5887 additions & 2333 deletions

File tree

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ ENABLE_NOTICES=''
4242
CAREER_LINK_URL=''
4343
ENABLE_EDX_PERSONAL_DASHBOARD=false
4444
ENABLE_PROGRAMS=false
45+
PARAGON_THEME_URLS={}

.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ ENABLE_NOTICES=''
4848
CAREER_LINK_URL=''
4949
ENABLE_EDX_PERSONAL_DASHBOARD=false
5050
ENABLE_PROGRAMS=false
51+
PARAGON_THEME_URLS={}

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ ENABLE_NOTICES=''
4747
CAREER_LINK_URL=''
4848
ENABLE_EDX_PERSONAL_DASHBOARD=true
4949
ENABLE_PROGRAMS=false
50+
PARAGON_THEME_URLS={}

package-lock.json

Lines changed: 5834 additions & 2276 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"quality": "npm run lint-fix && npm run test",
2121
"watch-tests": "jest --watch",
2222
"snapshot": "fedx-scripts jest --updateSnapshot",
23-
"prepare": "husky install"
23+
"prepare": "husky install",
24+
"replace-variables": "paragon replace-variables -p src -t usage"
2425
},
2526
"author": "edX",
2627
"license": "AGPL-3.0",
@@ -30,18 +31,19 @@
3031
},
3132
"dependencies": {
3233
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
33-
"@edx/frontend-component-header": "^5.6.0",
34+
"@edx/frontend-component-header": "npm:@edunext/frontend-component-header@5.8.0-alpha.1",
35+
"@edx/frontend-component-footer": "github:edunext/frontend-component-footer#edunext/css-variables-14.0.0",
3436
"@edx/frontend-enterprise-hotjar": "3.0.0",
35-
"@edx/frontend-platform": "8.1.2",
37+
"@edx/frontend-platform": "npm:@edunext/frontend-platform@8.1.2-alpha.1",
3638
"@edx/openedx-atlas": "^0.6.0",
37-
"@edx/react-unit-test-utils": "3.0.0",
39+
"@edx/react-unit-test-utils": "npm:@edunext/react-unit-test-utils@3.0.0-alpha.1",
3840
"@fortawesome/fontawesome-svg-core": "^1.2.36",
3941
"@fortawesome/free-brands-svg-icons": "^5.15.4",
4042
"@fortawesome/free-solid-svg-icons": "^5.15.4",
4143
"@fortawesome/react-fontawesome": "^0.2.0",
42-
"@openedx/frontend-plugin-framework": "^1.2.0",
43-
"@openedx/frontend-slot-footer": "^1.0.2",
44-
"@openedx/paragon": "^22.2.2",
44+
"@openedx/frontend-plugin-framework": "npm:@edunext/frontend-plugin-framework@1.3.0-alpha.1",
45+
"@openedx/frontend-slot-footer": "npm:@edunext/frontend-slot-footer@1.0.2-alpha.1",
46+
"@openedx/paragon": "^23.0.0-alpha.7",
4547
"@redux-beacon/segment": "^1.1.0",
4648
"@redux-devtools/extension": "3.3.0",
4749
"@reduxjs/toolkit": "^1.6.1",

src/App.scss

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
// frontend-app-*/src/index.scss
2-
@import "~@edx/brand/paragon/fonts";
3-
@import "~@edx/brand/paragon/variables";
4-
@import "~@openedx/paragon/scss/core/core";
5-
@import "~@edx/brand/paragon/overrides";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints;
62

7-
$fa-font-path: "~font-awesome/fonts";
8-
@import "~font-awesome/scss/font-awesome";
9-
10-
$input-focus-box-shadow: $input-box-shadow; // hack to get upgrade to paragon 4.0.0 to work
3+
$input-focus-box-shadow: var(--pgn-elevation-form-input-base); // hack to get upgrade to paragon 4.0.0 to work
114

125
@import "~@edx/frontend-component-header/dist/index";
136
@import "~@edx/frontend-component-footer/dist/_footer";

src/containers/CourseCard/CourseCard.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@import "@openedx/paragon/scss/core/core";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints;
22

33
.course-card {
44
.card {
55
.pgn__card-wrapper-image-cap.vertical {
66
display: flex;
7-
min-height: $card-image-vertical-max-height;
7+
min-height: var(--pgn-size-card-image-vertical-max-height);
88
}
99
.pgn__card-image-cap {
1010
border-bottom-left-radius: 0 !important;
@@ -53,11 +53,11 @@
5353
> .alert {
5454
border-radius: 0;
5555
box-shadow: none;
56-
padding: map-get($spacers, 3) map-get($spacers, 4);
56+
padding: var(--pgn-spacing-spacer-3) var(--pgn-spacing-spacer-4);
5757

5858
&:last-of-type {
59-
border-bottom-left-radius: $alert-border-radius;
60-
border-bottom-right-radius: $alert-border-radius;
59+
border-bottom-left-radius: var(--pgn-size-alert-border-radius);
60+
border-bottom-right-radius: var(--pgn-size-alert-border-radius);
6161
}
6262
}
6363

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
@import "~@edx/brand/paragon/variables";
2-
@import "~@openedx/paragon/scss/core/core";
3-
@import "~@edx/brand/paragon/overrides";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints;
42

53
a.course-card-title {
6-
color: $black;
4+
color: var(--pgn-color-black);
75
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
@import "@openedx/paragon/scss/core/core";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints;
22

33
#no-courses-content-view {
4-
border: 2px solid $light-400;
4+
border: 2px solid var(--pgn-color-light-400);
55
flex-direction: column;
6-
padding-bottom: map-get($spacers, 5);
7-
padding-top: map-get($spacers, 5);
6+
padding-bottom: var(--pgn-spacing-spacer-5);
7+
padding-top: var(--pgn-spacing-spacer-5);
88
height: 100%;
99

1010
& > * {
11-
margin-top: map-get($spacers, 3);
12-
margin-bottom: map-get($spacers, 3);
11+
margin-top: var(--pgn-spacing-spacer-3);
12+
margin-bottom: var(--pgn-spacing-spacer-3);
1313
}
1414
}
1515

src/containers/CoursesPanel/index.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "@openedx/paragon/scss/core/core";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints;
22

33
.course-list-heading-container {
44
display: flex;
@@ -8,8 +8,8 @@
88
}
99

1010
.course-list-title {
11-
font-size: $h2-font-size;
12-
margin: map-get($spacers, 3) 0;
11+
font-size: var(--pgn-typography-font-size-h2-base);
12+
margin: var(--pgn-spacing-spacer-3) 0;
1313
}
1414

1515
.course-list-loading {
@@ -24,7 +24,7 @@
2424
align-self: center;
2525
}
2626

27-
@include media-breakpoint-down(md) {
27+
@media (--max-pgn-size-breakpoint-md) {
2828
.course-list-heading-container {
2929
flex-direction: column-reverse;
3030
align-items: flex-start;
@@ -36,7 +36,7 @@
3636
}
3737

3838
.course-list-title {
39-
font-size: $h3-font-size;
40-
margin: map-get($spacers, 2) 0;
39+
font-size: var(--pgn-typography-font-size-h3-base);
40+
margin: var(--pgn-spacing-spacer-2) 0;
4141
}
4242
}

0 commit comments

Comments
 (0)