-
Notifications
You must be signed in to change notification settings - Fork 281
refactor: add global scss #2798
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import '../../../src/styles/jd-font.scss'; | ||
|
||
body { | ||
font-size: 14px; | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,22 +237,19 @@ async function copyStyles() { | |
resolve(__dirname, '../dist/styles'), | ||
) | ||
|
||
const content = [ | ||
let content = [ | ||
`@import '../theme-default.scss';`, | ||
`@import '../variables.scss';`, | ||
`@import '../mixins/index.scss';`, | ||
`@import '../animation/index.scss';`, | ||
`@import '../theme-dark.scss';`, | ||
`@import '../font-face.scss';`, | ||
] | ||
const projectID = process.env.VITE_APP_PROJECT_ID | ||
if (projectID) { | ||
content[1] = `@import '../variables-${projectID}.scss';` | ||
content = [ | ||
`@import '../theme-${projectID}.scss';`, | ||
oasis-cloud marked this conversation as resolved.
Show resolved
Hide resolved
|
||
`@import '../font-face.scss';`, | ||
] | ||
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. 💡 Codebase verification 需要添加缺失的 font-face.scss 文件 检查结果显示:
建议:
🔗 Analysis chain验证项目特定主题文件的存在性 当设置了 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# 描述:验证项目特定主题文件是否存在
# 检查主题文件
fd -t f "theme-.*\.scss$" "src/styles"
Length of output: 150 Script: #!/bin/bash
# 检查主题文件的内容结构,确保它们是有效的 SCSS 文件
for theme in $(fd -t f "theme-.*\.scss$" "src/styles"); do
echo "=== $theme 内容 ==="
head -n 5 "$theme"
echo
done
# 检查 font-face.scss 文件是否存在及其内容
echo "=== font-face.scss 文件检查 ==="
fd -t f "font-face.scss$" "src/styles" -x head -n 5 {}
Length of output: 1380 |
||
} | ||
const scssFiles = await glob(['dist/es/packages/**/*.scss']) | ||
scssFiles.forEach((file) => { | ||
content.push( | ||
`@import '${relativeFilePath('/dist/styles/themes/default.scss', '/' + file)}';`, | ||
) | ||
}) | ||
|
||
dest('dist/styles/themes/default.scss', content.join('\n')) | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import '../../styles/jd-font.scss'; | ||
|
||
html, | ||
body { | ||
&::-webkit-scrollbar { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.