Skip to content

Commit 2e59e24

Browse files
feat!: add design tokens support (#665)
BREAKING CHANGE: Pre-design-tokens theming is no longer supported. Co-authored-by: Diana Olarte <[email protected]>
1 parent 7586529 commit 2e59e24

File tree

12 files changed

+2170
-916
lines changed

12 files changed

+2170
-916
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ CAREER_LINK_URL=''
4242
ENABLE_EDX_PERSONAL_DASHBOARD=false
4343
ENABLE_PROGRAMS=false
4444
NON_BROWSABLE_COURSES=false
45+
# Fallback in local style files
46+
PARAGON_THEME_URLS={}

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ CAREER_LINK_URL=''
4848
ENABLE_EDX_PERSONAL_DASHBOARD=false
4949
ENABLE_PROGRAMS=false
5050
NON_BROWSABLE_COURSES=false
51+
# Fallback in local style files
52+
PARAGON_THEME_URLS={}

.env.test

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

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@fortawesome/free-solid-svg-icons": "^5.15.4",
4242
"@fortawesome/react-fontawesome": "^0.2.0",
4343
"@openedx/frontend-plugin-framework": "^1.7.0",
44-
"@openedx/paragon": "^22.16.0",
44+
"@openedx/paragon": "^23.4.5",
4545
"@redux-devtools/extension": "3.3.0",
4646
"@reduxjs/toolkit": "^2.0.0",
4747
"classnames": "^2.3.1",

src/App.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// 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";
2+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints;
63

74
$fa-font-path: "~font-awesome/fonts";
85
@import "~font-awesome/scss/font-awesome";
96

10-
$input-focus-box-shadow: $input-box-shadow; // hack to get upgrade to paragon 4.0.0 to work
7+
$input-focus-box-shadow: var(--pgn-elevation-form-input-base); // hack to get upgrade to paragon 4.0.0 to work
118

129
@import "~@edx/frontend-component-header/dist/index";
1310
@import "~@edx/frontend-component-footer/dist/_footer";

src/containers/CourseCard/CourseCard.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
@import "@openedx/paragon/scss/core/core";
2-
31
.course-card {
42
.card {
53
.pgn__card-wrapper-image-cap.vertical {
64
display: flex;
7-
min-height: $card-image-vertical-max-height;
5+
min-height: var(--pgn-size-card-image-vertical-max-height);
86
}
97
.pgn__card-image-cap {
108
border-bottom-left-radius: 0 !important;
@@ -53,11 +51,11 @@
5351
> .alert {
5452
border-radius: 0;
5553
box-shadow: none;
56-
padding: map-get($spacers, 3) map-get($spacers, 4);
54+
padding: var(--pgn-spacing-spacer-3) var(--pgn-spacing-spacer-4);
5755

5856
&:last-of-type {
59-
border-bottom-left-radius: $alert-border-radius;
60-
border-bottom-right-radius: $alert-border-radius;
57+
border-bottom-left-radius: var(--pgn-size-alert-border-radius);
58+
border-bottom-right-radius: var(--pgn-size-alert-border-radius);
6159
}
6260
}
6361

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
@import "~@edx/brand/paragon/variables";
2-
@import "~@openedx/paragon/scss/core/core";
3-
@import "~@edx/brand/paragon/overrides";
4-
51
a.course-card-title {
6-
color: $black;
2+
color: var(--pgn-color-black);
73
}
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
@import "@openedx/paragon/scss/core/core";
2-
31
#no-courses-content-view {
4-
border: 2px solid $light-400;
2+
border: 2px solid var(--pgn-color-light-400);
53
flex-direction: column;
6-
padding-bottom: map-get($spacers, 5);
7-
padding-top: map-get($spacers, 5);
4+
padding-bottom: var(--pgn-spacing-spacer-5);
5+
padding-top: var(--pgn-spacing-spacer-5);
86
height: 100%;
97

108
& > * {
11-
margin-top: map-get($spacers, 3);
12-
margin-bottom: map-get($spacers, 3);
9+
margin-top: var(--pgn-spacing-spacer-3);
10+
margin-bottom: var(--pgn-spacing-spacer-3);
1311
}
1412
}
1513

src/containers/CoursesPanel/index.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import "@openedx/paragon/scss/core/core";
2-
31
.course-list-heading-container {
42
display: flex;
53
flex-direction: row;
@@ -8,8 +6,8 @@
86
}
97

108
.course-list-title {
11-
font-size: $h2-font-size;
12-
margin: map-get($spacers, 3) 0;
9+
font-size: var(--pgn-typography-font-size-h2-base);
10+
margin: var(--pgn-spacing-spacer-3) 0;
1311
}
1412

1513
.course-list-loading {
@@ -24,7 +22,7 @@
2422
align-self: center;
2523
}
2624

27-
@include media-breakpoint-down(md) {
25+
@media (--pgn-size-breakpoint-max-width-md) {
2826
.course-list-heading-container {
2927
flex-direction: column-reverse;
3028
align-items: flex-start;
@@ -36,7 +34,7 @@
3634
}
3735

3836
.course-list-title {
39-
font-size: $h3-font-size;
40-
margin: map-get($spacers, 2) 0;
37+
font-size: var(--pgn-typography-font-size-h3-base);
38+
margin: var(--pgn-spacing-spacer-2) 0;
4139
}
4240
}

0 commit comments

Comments
 (0)