-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[do not merge] DEMO: design tokens and CSS variables #764
base: master
Are you sure you want to change the base?
Changes from 15 commits
3415211
b6d2f84
7b3763a
fdddf6e
6993a0a
340daf9
dc9aac2
9a7a58b
f31faa1
104b9c6
051b265
99e0b57
c5d65cc
f7226b1
1fe2c28
cf31390
0536f88
2e52d4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const config = { | ||
PARAGON_THEME_URLS: { | ||
core: { | ||
urls: { | ||
default: 'https://cdn.jsdelivr.net/npm/@edx/paragon@$paragonVersion/dist/core.min.css', | ||
brandOverride: 'https://cdn.jsdelivr.net/npm/@edx/brand-edx.org@$brandVersion/dist/core.min.css', | ||
}, | ||
}, | ||
variants: { | ||
light: { | ||
urls: { | ||
default: 'https://cdn.jsdelivr.net/npm/@edx/paragon@$paragonVersion/dist/light.min.css', | ||
brandOverride: 'https://cdn.jsdelivr.net/npm/@edx/brand-edx.org@$brandVersion/dist/light.min.css', | ||
}, | ||
default: true, | ||
dark: false, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
"lint": "fedx-scripts eslint --ext .js --ext .jsx .", | ||
"snapshot": "fedx-scripts jest --updateSnapshot", | ||
"start": "fedx-scripts webpack-dev-server --progress", | ||
"test": "TZ=UTC fedx-scripts jest --coverage --passWithNoTests" | ||
"test": "TZ=UTC fedx-scripts jest --coverage --passWithNoTests", | ||
"replace-scss-with-css": "replace-scss-with-css" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/openedx/frontend-app-profile/issues" | ||
|
@@ -27,11 +28,11 @@ | |
"extends @edx/browserslist-config" | ||
], | ||
"dependencies": { | ||
"@edx/brand": "npm:@edx/brand-openedx@1.2.0", | ||
"@edx/brand": "npm:@edx/brand-edx.org@2.2.0-alpha.9", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: will need to make similar changes to |
||
"@edx/frontend-component-footer": "12.0.0", | ||
"@edx/frontend-component-header": "4.0.0", | ||
"@edx/frontend-platform": "4.5.0", | ||
"@edx/paragon": "^20.32.0", | ||
"@edx/paragon": "21.0.0-alpha.36", | ||
"@fortawesome/fontawesome-svg-core": "1.2.36", | ||
"@fortawesome/free-brands-svg-icons": "5.15.4", | ||
"@fortawesome/free-regular-svg-icons": "5.15.4", | ||
|
@@ -65,8 +66,8 @@ | |
"devDependencies": { | ||
"@commitlint/cli": "17.6.3", | ||
"@commitlint/config-angular": "17.6.3", | ||
"@edx/browserslist-config": "^1.1.1", | ||
"@edx/frontend-build": "12.8.38", | ||
"@edx/browserslist-config": "1.1.1", | ||
"@edx/frontend-build": "github:openedx/frontend-build#ags/2321", | ||
"@edx/reactifex": "2.2.0", | ||
"@testing-library/react": "11.2.7", | ||
"codecov": "3.8.3", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,42 @@ | ||
@import "~@edx/brand/paragon/fonts"; | ||
@import "~@edx/brand/paragon/variables"; | ||
@import "~@edx/paragon/scss/core/core"; | ||
@import "~@edx/brand/paragon/overrides"; | ||
/** | ||
* 1. Remove the prior @edx/paragon and @edx/brand imports: | ||
*/ | ||
|
||
// @import "~@edx/brand/paragon/fonts"; | ||
// @import "~@edx/brand/paragon/variables"; | ||
// @import "~@edx/paragon/scss/core/core"; | ||
// @import "~@edx/brand/paragon/overrides"; | ||
|
||
/** | ||
* 2. If using externally hosted CSS, include just the @custom-media breakpoints from @edx/paragon and | ||
* @edx/brand. These will allow the use of CSS media queries such as `@media(--min-pgn-size-breakpoint-md) { ... }` | ||
* throughout your MFE styles. | ||
* | ||
* Note: the @edx/brand breakpoints must be imported _after_ the @edx/paragon breakpoints. | ||
*/ | ||
@use "@edx/paragon/styles/css/core/custom-media-breakpoints.css" as paragonCustomMediaBreakpoints; | ||
@use "@edx/brand/paragon/css/core/custom-media-breakpoints.css" as brandCustomMediaBreakpoints; | ||
|
||
/** | ||
* 2(a). If using locally installed CSS, include the core.min.css and light.min.css files from @edx/paragon | ||
* and @edx/brand. | ||
* | ||
* Note: the light.min.css file should be imported _after_ the core.min.css file. Also, the @edx/brand files should be | ||
* imported _after_ the @edx/paragon files. | ||
*/ | ||
|
||
// @use "@edx/paragon/dist/core.min.css"; | ||
// @use "@edx/paragon/dist/light.min.css"; | ||
// @use "@edx/brand/dist/core.min.css"; | ||
// @use "@edx/brand/dist/light.min.css"; | ||
|
||
/** | ||
* Note: `@edx/frontend-component-header` uses SCSS variables/mixins that are no longer available when using | ||
* already compiled @edx/paragon and @edx/brand CSS styles. For this demo, the `node_module/@edx/frontend-component-header` | ||
* styles were modified to use Paragon's new CSS variables instead. | ||
* | ||
* See https://github.com/openedx/paragon/issues/2348 for more details. | ||
*/ | ||
@import "~@edx/frontend-component-header/dist/index"; | ||
@import "~@edx/frontend-component-footer/dist/footer"; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can those be installed by their crossponding PRs? |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: not explicitly necessary unless you opt to define
PARAGON_THEME_URLS
within the MFE configuration API inedx-platform
.