Skip to content

Commit

Permalink
style: update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Sep 11, 2024
1 parent fe060fb commit 864601a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default defineConfig({
presetUno(),
presetChinese({
extendTheme: false, // Do not extend the theme object
themeKey: 'customFontFamily', // Use a custom theme key
themeKey: "customFontFamily", // Use a custom theme key
chineseType: "traditional", // Specify the text as Traditional Chinese
}),
// ...custom presets
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default defineConfig({
presetUno(),
presetChinese({
extendTheme: false, // 不扩展主题对象
themeKey: 'customFontFamily', // 使用自定义的主题键
themeKey: "customFontFamily", // 使用自定义的主题键
chineseType: "traditional", // 指定文本为繁体中文
}),
// ...custom presets
Expand Down
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "examples",
"version": "0.0.1",
"type": "module",
"version": "0.0.1",
"private": true,
"packageManager": "[email protected]",
"description": "unocss-preset-chinese-examples",
Expand Down
2 changes: 1 addition & 1 deletion examples/src/utils/typeChecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export {
export const isServerRendering = (() => {
try {
return !(typeof window !== "undefined" && document !== undefined);
} catch (e) {
} catch () {
return true;
}
})();
Expand Down
2 changes: 1 addition & 1 deletion src/typography/css/annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function generateAnnotationCss(selectorName: string) {
${getNonCjkBlockCss(`${selectorName}--annotation em`, {
"-webkit-text-emphasis": "none",
"text-emphasis": "none",
})}
})}
.${selectorName}--annotation .${selectorName}-meta {
margin-block-start: calc(${getVariables.stdBlockUnit} * 0.5);
margin-block-end: ${getVariables.stdBlockUnit};
Expand Down
4 changes: 2 additions & 2 deletions src/typography/css/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export function generateBaseCss(selectorName: string) {
${getNonCjkBlockCss(`${selectorName} p`, {
"text-align": "start",
})}
})}
${getNonCjkBlockCss(selectorName, {
"letter-spacing": getVariables.letterSpacingNormal,
})}
})}
`;
}
4 changes: 2 additions & 2 deletions src/typography/css/heading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export function generateHeadingCss(selectorName: string) {
${getNonCjkBlockCss(`${selectorName} h1, h2, h3`, {
"letter-spacing": "0",
})}
})}
${getNonCjkBlockCss(selectorName, {
"letter-spacing": getVariables.letterSpacingNormal,
})}
})}
`;
}
2 changes: 1 addition & 1 deletion src/typography/css/other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function generateOtherCss(selectorName: string) {
${getNonCjkBlockCss(`${selectorName}-em`, {
"-webkit-text-emphasis": "start",
"text-emphasis": "none",
})}
})}
.${selectorName} .${selectorName}-ruby--inline {
display: inline-flex;
flex-direction: column-reverse;
Expand Down
2 changes: 1 addition & 1 deletion src/typography/preflights/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function getCSS(
.map((s) => {
// pseudo class & pseudo elements matcher
// matches :, ::, -, (), numbers and words
const match = s.match(/::?(?:[():\-\d\w]+)$/g);
const match = s.match(/:[():\-\w]+$/g);

if (match) {
const matchStr = match[0];
Expand Down

0 comments on commit 864601a

Please sign in to comment.