-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add globals and resets #5
Changes from all commits
ec4ef84
5db3ee5
25e1422
3fab3af
d1740e9
89693e0
4dd785c
d126a4f
ee3882e
03a3ea3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { createGlobalStyle } from "styled-components"; | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
@import url("https://fonts.cdnfonts.com/css/new-super-mario-font-u"); | ||
|
||
*, | ||
::after, | ||
::before { | ||
box-sizing: border-box; | ||
} | ||
|
||
h1, | ||
h2, | ||
body { | ||
margin: 0; | ||
padding:0; | ||
} | ||
|
||
button { | ||
margin:0; | ||
background-color: transparent; | ||
padding: 0; | ||
} | ||
|
||
ul { | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
body { | ||
font-family: ${({ theme }) => theme.typography["main-font-family"]}; | ||
color: ${({ theme }) => theme.color["main-font"]}; | ||
background-color: ${({ theme }) => theme.color["main-background"]}; | ||
font-size: ${({ theme }) => theme.typography["properties-size"]}; | ||
} | ||
|
||
`; | ||
|
||
export default GlobalStyle; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { DefaultTheme } from "styled-components"; | ||
|
||
const mainTheme: DefaultTheme = { | ||
color: { | ||
"container-background": "#fbd000", | ||
"main-background": "#049cd8", | ||
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. ponlos por orden jerárquico: primero el main, después el container please, para que se entienda rápido |
||
"error-background": "#e52521", | ||
"successfull-background": "#43b047", | ||
"main-font": "#000", | ||
"secondary-font": "#fff", | ||
"input-background": "#fff", | ||
}, | ||
|
||
typography: { | ||
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. falta un enter en la 12 |
||
"main-font-family": "Verdana, Geneva, Tahoma, sans-serif", | ||
"secondary-font-family": "'New Super Mario Font U', sans-serif", | ||
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. instalar la fuente, no ponerlo en el html |
||
"properties-size": "1,1875rem", | ||
"title-size": "2.5rem", | ||
"header-size": "1.875rem", | ||
"input-text-size": "1.125rem", | ||
"input-title-size": "1.25rem", | ||
}, | ||
}; | ||
|
||
export default mainTheme; |
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. Arreglar con la revisión de naming del mainTheme |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import "styled-components"; | ||
|
||
declare module "styled-components" { | ||
export interface DefaultTheme { | ||
color: { | ||
"container-background": string; | ||
"main-background": string; | ||
"error-background": string; | ||
"successfull-background": string; | ||
"main-font": string; | ||
"secondary-font": string; | ||
"input-background": string; | ||
}; | ||
|
||
typography: { | ||
"main-font-family": string; | ||
"secondary-font-family": string; | ||
"properties-size": string; | ||
"title-size": string; | ||
"header-size": string; | ||
"input-title-size": string; | ||
"input-text-size": string; | ||
"title-size": string; | ||
"header-size": string; | ||
}; | ||
} | ||
} |
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.
sobran las líneas 35 y 36