Files
grungnet/src/theme.js

288 lines
5.8 KiB
JavaScript
Raw Normal View History

2020-11-20 09:24:49 +11:00
const theme = {
2020-03-15 17:50:56 +11:00
colors: {
text: "hsl(210, 50%, 96%)",
background: "hsl(230, 25%, 18%)",
primary: "hsl(260, 100%, 80%)",
secondary: "hsl(290, 100%, 80%)",
highlight: "hsl(260, 20%, 40%)",
purple: "hsl(290, 100%, 80%)",
muted: "hsla(230, 20%, 0%, 20%)",
2020-04-06 15:38:36 +10:00
gray: "hsl(0, 0%, 70%)",
overlay: "hsla(230, 25%, 15%, 80%)",
border: "hsla(210, 50%, 96%, 0.5)",
2020-04-26 19:04:18 +10:00
modes: {
light: {
text: "hsl(10, 20%, 20%)",
background: "hsl(10, 10%, 98%)",
primary: "hsl(260, 100%, 80%)",
secondary: "hsl(290, 100%, 80%)",
highlight: "hsl(260, 20%, 40%)",
muted: "hsla(230, 20%, 60%, 20%)",
overlay: "hsla(230, 100%, 97%, 80%)",
border: "hsla(10, 20%, 20%, 0.5)",
2020-04-26 19:04:18 +10:00
},
},
2020-03-15 17:50:56 +11:00
},
fonts: {
body: "'Bree Serif', Georgia, serif",
2020-03-26 13:26:10 +11:00
body2:
2020-03-26 12:24:52 +11:00
"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif",
heading: "'Bree Serif', serif",
monospace: "Menlo, monospace",
display: "'Pacifico', Helvetica, sans-serif",
2020-03-15 17:50:56 +11:00
},
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72],
fontWeights: {
2020-03-26 12:24:52 +11:00
caption: 200,
2020-04-09 23:45:39 +10:00
body: 400,
heading: 400,
2020-04-06 15:38:36 +10:00
display: 400,
2020-03-15 17:50:56 +11:00
},
lineHeights: {
body: 1.3,
2020-11-27 11:22:58 +11:00
body2: 1.5,
display: 1.1,
2020-04-06 15:38:36 +10:00
heading: 1.25,
2020-03-15 17:50:56 +11:00
},
breakpoints: ["12em", "24em", "40em", "56em", "64em"],
2020-03-26 12:24:52 +11:00
text: {
2020-03-15 17:50:56 +11:00
heading: {
fontFamily: "heading",
fontWeight: "heading",
2020-03-26 12:24:52 +11:00
lineHeight: "heading",
2020-04-06 15:38:36 +10:00
fontSize: 1,
2020-03-15 17:50:56 +11:00
},
display: {
variant: "text.heading",
2020-03-26 12:24:52 +11:00
fontFamily: "display",
2020-03-15 17:50:56 +11:00
fontSize: [5, 6],
fontWeight: "display",
2020-04-06 15:38:36 +10:00
mt: 3,
2020-03-26 12:24:52 +11:00
},
caption: {
2020-03-26 13:26:10 +11:00
fontFamily: "body2",
2020-03-26 12:24:52 +11:00
fontWeight: "caption",
2020-04-09 23:45:39 +10:00
fontSize: 0,
2020-04-06 15:38:36 +10:00
color: "gray",
2020-03-26 12:24:52 +11:00
},
2020-03-26 13:26:10 +11:00
body2: {
fontFamily: "body2",
fontSize: 0,
2020-04-06 15:38:36 +10:00
fontWeight: "body",
2020-11-27 11:22:58 +11:00
lineHeight: "body2",
2020-04-06 15:38:36 +10:00
},
2020-03-15 17:50:56 +11:00
},
styles: {
Container: {
p: 3,
2020-04-06 15:38:36 +10:00
maxWidth: 1024,
2020-03-15 17:50:56 +11:00
},
root: {
fontFamily: "body",
lineHeight: "body",
2020-04-06 15:38:36 +10:00
fontWeight: "body",
2020-03-15 17:50:56 +11:00
},
h1: {
variant: "text.display",
2020-03-15 17:50:56 +11:00
},
h2: {
variant: "text.heading",
2020-04-06 15:38:36 +10:00
fontSize: 5,
2020-03-15 17:50:56 +11:00
},
h3: {
variant: "text.heading",
2020-04-06 15:38:36 +10:00
fontSize: 4,
2020-03-15 17:50:56 +11:00
},
h4: {
variant: "text.heading",
2020-04-06 15:38:36 +10:00
fontSize: 3,
2020-03-15 17:50:56 +11:00
},
h5: {
variant: "text.heading",
2020-04-06 15:38:36 +10:00
fontSize: 2,
2020-03-15 17:50:56 +11:00
},
h6: {
variant: "text.heading",
2020-04-06 15:38:36 +10:00
fontSize: 1,
2020-03-15 17:50:56 +11:00
},
a: {
variant: "text.body2",
color: "text",
2020-03-15 17:50:56 +11:00
"&:hover": {
color: "primary",
},
"&:active": {
2020-04-06 15:38:36 +10:00
color: "secondary",
},
2020-03-15 17:50:56 +11:00
},
pre: {
variant: "prism",
fontFamily: "monospace",
fontSize: 1,
p: 3,
color: "text",
bg: "muted",
overflow: "auto",
code: {
2020-04-06 15:38:36 +10:00
color: "inherit",
},
2020-03-15 17:50:56 +11:00
},
code: {
fontFamily: "monospace",
color: "secondary",
2020-04-06 15:38:36 +10:00
fontSize: 1,
2020-03-15 17:50:56 +11:00
},
inlineCode: {
fontFamily: "monospace",
color: "secondary",
2020-04-06 15:38:36 +10:00
bg: "muted",
2020-03-15 17:50:56 +11:00
},
hr: {
border: 0,
borderBottom: "1px solid",
2020-04-06 15:38:36 +10:00
borderColor: "muted",
2020-03-15 17:50:56 +11:00
},
img: {
2020-04-06 15:38:36 +10:00
maxWidth: "100%",
},
2020-06-28 13:47:05 +10:00
progress: {
color: "text",
backgroundColor: "overlay",
},
2020-03-15 17:50:56 +11:00
},
prism: {
".comment,.prolog,.doctype,.cdata,.punctuation,.operator,.entity,.url": {
2020-04-06 15:38:36 +10:00
color: "gray",
2020-03-15 17:50:56 +11:00
},
".comment": {
2020-04-06 15:38:36 +10:00
fontStyle: "italic",
2020-03-15 17:50:56 +11:00
},
".property,.tag,.boolean,.number,.constant,.symbol,.deleted,.function,.class-name,.regex,.important,.variable": {
2020-04-06 15:38:36 +10:00
color: "purple",
2020-03-15 17:50:56 +11:00
},
".atrule,.attr-value,.keyword": {
2020-04-06 15:38:36 +10:00
color: "primary",
2020-03-15 17:50:56 +11:00
},
".selector,.attr-name,.string,.char,.bultin,.inserted": {
2020-04-06 15:38:36 +10:00
color: "secondary",
},
2020-03-15 17:50:56 +11:00
},
forms: {
label: {
2020-04-06 15:38:36 +10:00
fontWeight: 400,
},
input: {
"&:focus": {
2020-04-06 15:38:36 +10:00
outlineColor: "primary",
},
"&:disabled": {
backgroundColor: "muted",
2020-10-15 16:27:20 +11:00
opacity: 0.5,
borderColor: "text",
},
fontFamily: "body2",
2020-04-06 15:38:36 +10:00
},
slider: {
"&:disabled": {
opacity: 0.5,
},
},
},
buttons: {
primary: {
color: "text",
bg: "transparent",
borderStyle: "solid",
borderWidth: "1px",
borderColor: "text",
"&:hover": {
borderColor: "highlight",
2020-04-06 15:38:36 +10:00
cursor: "pointer",
},
fontFamily: "body",
"&:focus": {
2020-04-06 15:38:36 +10:00
outline: "none",
},
"&:active": {
2020-04-06 15:38:36 +10:00
borderColor: "primary",
},
"&:disabled": {
borderColor: "text",
opacity: 0.5,
},
},
secondary: {
2020-04-15 12:49:56 +10:00
color: "text",
bg: "transparent",
2020-04-15 12:49:56 +10:00
border: "none",
2020-04-06 15:38:36 +10:00
fontFamily: "body",
2020-04-15 12:49:56 +10:00
"&:focus": {
outline: "none",
},
"&:disabled": {
opacity: 0.5,
},
"&:hover": {
color: "primary",
cursor: "pointer",
},
"&:active": {
color: "secondary",
},
},
icon: {
"&:hover": {
2020-04-06 15:38:36 +10:00
cursor: "pointer",
color: "primary",
},
"&:focus": {
2020-04-06 15:38:36 +10:00
outline: "none",
},
"&:active": {
2020-04-06 15:38:36 +10:00
color: "secondary",
},
"&:disabled": {
opacity: 0.5,
color: "text",
},
},
close: {
"&:hover": {
2020-04-06 15:38:36 +10:00
cursor: "pointer",
color: "primary",
},
"&:focus": {
2020-04-06 15:38:36 +10:00
outline: "none",
},
"&:active": {
2020-04-06 15:38:36 +10:00
color: "secondary",
},
},
},
links: {
footer: {
variant: "text.caption",
textDecoration: "underline",
"&:hover": {
textDecorationColor: "hsl(260, 100%, 80%)",
cursor: "pointer",
},
"&:active": {
textDecorationColor: "hsl(290, 100%, 80%)",
},
},
},
messages: {
warning: {
backgroundColor: "#d65c64",
borderLeftColor: "#ff939b",
},
note: {
2020-07-02 20:17:04 +10:00
backgroundColor: "#ca871e",
borderLeftColor: "#ebd2ac",
},
},
2020-03-15 17:50:56 +11:00
};
2020-11-20 09:24:49 +11:00
export default theme;