Skip to content

Commit 981dccf

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

File tree

7 files changed

+17863
-9496
lines changed

7 files changed

+17863
-9496
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ APP_ID=''
2929
MFE_CONFIG_API_URL=''
3030
SEARCH_CATALOG_URL=''
3131
ENABLE_SKILLS_BUILDER_PROFILE=''
32+
# Fallback in local style files
33+
PARAGON_THEME_URLS={}

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ APP_ID=''
3030
MFE_CONFIG_API_URL=''
3131
SEARCH_CATALOG_URL='http://localhost:18000/courses'
3232
ENABLE_SKILLS_BUILDER_PROFILE=''
33+
# Fallback in local style files
34+
PARAGON_THEME_URLS={}

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
2525
COLLECT_YEAR_OF_BIRTH=true
2626
APP_ID=''
2727
MFE_CONFIG_API_URL=''
28+
PARAGON_THEME_URLS={}

package-lock.json

Lines changed: 17843 additions & 9479 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
@@ -39,7 +39,7 @@
3939
"@fortawesome/free-regular-svg-icons": "6.7.2",
4040
"@fortawesome/free-solid-svg-icons": "6.7.2",
4141
"@fortawesome/react-fontawesome": "0.2.2",
42-
"@openedx/paragon": "^22.17.0",
42+
"@openedx/paragon": "^23.4.5",
4343
"@pact-foundation/pact": "^11.0.2",
4444
"@redux-devtools/extension": "3.3.0",
4545
"classnames": "2.5.1",

src/index.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
@import "~@edx/brand/paragon/fonts";
2-
@import "~@edx/brand/paragon/variables";
3-
@import "~@openedx/paragon/scss/core/core";
4-
@import "~@edx/brand/paragon/overrides";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints;
2+
53
@import "~@edx/frontend-component-header/dist/index";
64
@import "~@edx/frontend-component-footer/dist/footer";
75

src/profile/index.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
position: absolute;
2929
left: 1.5rem;
3030
top: 5.25rem;
31-
color: $gray-500;
31+
color: var(--pgn-color-gray-500);
3232
line-height: 0.9rem;
3333
font-size: 0.8rem;
3434
font-style: normal;
@@ -42,24 +42,24 @@
4242

4343
.icon-visibility-off {
4444
height: 1rem;
45-
color: $gray-500;
45+
color: var(--pgn-color-gray-500);
4646
}
4747

4848
.profile-page {
4949
.edit-section-header {
50-
@extend .h6;
50+
font-size: var(--pgn-typography-font-size-h6-base);
5151
display: block;
5252
font-weight: normal;
5353
letter-spacing: 0;
5454
margin: 0;
5555
}
5656

5757
label.edit-section-header {
58-
margin-bottom: $spacer * .5;
58+
margin-bottom: calc(var(--pgn-spacing-spacer-base) * .5);
5959
}
6060

6161
.profile-avatar-wrap {
62-
@include media-breakpoint-up(md) {
62+
@media (--pgn-size-breakpoint-min-width-md) {
6363
max-width: 12rem;
6464
margin-right: 0;
6565
margin-top: -8rem;
@@ -77,25 +77,25 @@
7777
align-items: center;
7878
border-radius: 50%;
7979

80-
@include media-breakpoint-up(md) {
80+
@media (--pgn-size-breakpoint-min-width-md) {
8181
background: linear-gradient(to top, rgba(0,0,0,.65) 4rem, rgba(0,0,0,0) 4rem);
8282
align-items: flex-end;
8383
}
8484

8585
.btn {
8686
text-decoration: none;
87-
@include media-breakpoint-up(md) {
87+
@media (--pgn-size-breakpoint-min-width-md) {
8888
margin-bottom: 1.2rem;
8989
}
9090
}
9191

9292
.dropdown {
93-
@include media-breakpoint-up(md) {
93+
@media (--pgn-size-breakpoint-min-width-md) {
9494
margin-bottom: 1.2rem;
9595
}
9696

9797
.btn {
98-
color: $white;
98+
color: var(--pgn-color-white);
9999
background: transparent;
100100
border-color: transparent;
101101
margin: 0;
@@ -108,7 +108,7 @@
108108
height: 5rem;
109109
position: relative;
110110

111-
@include media-breakpoint-up(md) {
111+
@media (--pgn-size-breakpoint-min-width-md) {
112112
width: 12rem;
113113
height: 12rem;
114114
}
@@ -128,7 +128,7 @@
128128
border-radius:0;
129129
transition: opacity 200ms ease;
130130

131-
@include media-breakpoint-up(md) {
131+
@media (--pgn-size-breakpoint-min-width-md) {
132132
height: 4rem;
133133
}
134134

@@ -142,7 +142,7 @@
142142
position: relative;
143143

144144
.certificate-title {
145-
font-family: $font-family-serif;
145+
font-family: var(--pgn-typography-font-family-serif);
146146
font-weight: 400;
147147
}
148148

0 commit comments

Comments
 (0)