Skip to content

Commit f10dc35

Browse files
committed
fix(normalise.css): added normalise.css
1 parent 5f2515b commit f10dc35

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

__appset/configColor.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
const Color = {
22
"default": {
33
"bgColor": "#ffffff",
4+
"color": "#000000",
45
"primary": "#00364e",
56
"secondary": "#03567b"
67
},
78
"dark": {
89
"bgColor": "#0a0a0a",
10+
"color": "#ffffff",
911
"primary": "#0a0a0a",
1012
"secondary": "#1f1f1f"
1113
}

__appset/normalise.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { createGlobalStyle } from "styled-components"
2+
3+
const Normalise = createGlobalStyle`
4+
html {
5+
box-sizing: border-box;
6+
}
7+
8+
body {
9+
background: ${(props) => props.theme.Universal.Color.bgColor};
10+
color: ${(props) => props.theme.Universal.Color.color};
11+
font-size: ${(props) => props.theme.Universal.FontSize.s};
12+
font-weight: ${(props) => props.theme.Universal.FontWeight.normal};
13+
font-family: ${(props) => props.theme.Universal.FontFamily.roboto}, system-ui, sans-serif;
14+
margin: 0;
15+
}
16+
17+
*,
18+
*::after,
19+
*::before {
20+
line-height: 1.2;
21+
box-sizing: inherit;
22+
}
23+
`
24+
25+
export default Normalise

__appset/themePrepare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default theme;\n`
9595
}
9696

9797
fs.readFile(`${appDir}/${component}`, "utf8", (err, data) => {
98-
if (component === "theme.js" || component === "configPXL.js") {
98+
if (component === "theme.js" || component === "configPXL.js" || component === "normalise.js") {
9999
console.log(componentFile, defaultDir, component)
100100
fs.writeFile(componentFile, fs.readFileSync(`${defaultDir}/${component}`).toString(), () => {})
101101
} else {

0 commit comments

Comments
 (0)