split styles.css into multiple files

This commit is contained in:
Riley Housden 2022-11-09 13:27:25 -05:00
parent 064059dd30
commit 0c6ad83f41
5 changed files with 85 additions and 135 deletions

37
index-styles.css Normal file
View file

@ -0,0 +1,37 @@
:root {
--social-text-color: #683655;
--mastodon-text-color: #3088D4;
--discord-text-color: #7289DA;
}
.social {
color: #683655;
font-size: large;
font-weight: bold;
display: block;
}
#mastodon {
font-style: italic;
text-decoration: none;
color: #3088D4;
}
#discord {
font-style: italic;
text-decoration: none;
color: #7289DA;
}
#contact {
border-style: solid;
border-width: .2vh;
border-color: var(--border-color);
padding: 1vh;
background-color: var(--header-background-color);
display: block;
}
#contact h2 {
margin: 0;
}

View file

@ -6,6 +6,7 @@
<meta http-equiv="content-type" content="text/html"> <meta http-equiv="content-type" content="text/html">
<title>Quack! ur gay!</title> <title>Quack! ur gay!</title>
<link rel="stylesheet" href="./styles.css"> <link rel="stylesheet" href="./styles.css">
<link rel="stylesheet" href="./index-styles.css">
<link rel="icon" href="./res/icon.png"> <link rel="icon" href="./res/icon.png">
</head> </head>
<body> <body>

View file

@ -1,100 +1,26 @@
body { :root {
background-color: #424242; --body-background-color: #424242;
} --header-background-color: linear-gradient(20deg, #6E9277 20%, #FFD483 50%, #FC6467 85%);
--nav-background-color: #424242;
#wrapper { --nav-text-color: #B2C5D6;
background-color: #B2C5D6; --nav-hover-color: #4B4B4B;
margin-left: auto; --wrapper-background-color: #B2C5D6;
margin-right: auto; --border-color: #424242;
width: 90%; --text-color: #424242;
display: flex;
flex-direction: column;
}
#content {
margin: 0;
padding-top: 0;
padding-left: 1vh;
padding-right: 1vh;
overflow: visible;
}
body {
margin: 0;
height: 100vh;
} }
header { header {
background: linear-gradient(20deg, #6E9277 20%, #FFD483 50%, #FC6467 85%); background: var(--header-background-color);
margin-bottom: 1vh;
}
h1, h2, h3, h4, h5, h6 {
color: #424242;
}
nav ul {
list-style-type: none;
margin-left: .3%;
margin-right: .3%;
margin-top: .3%;
margin-bottom: .3%;
padding: 0;
overflow: hidden;
background-color: #424242;
display: block;
}
nav li {
margin: 0;
display: inline;
float: left;
}
nav li a {
display: block;
color: #B2C5D6;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
nav li a:hover {
background-color: #4B4B4B;
}
footer {
background: linear-gradient(20deg, #ffadad, #ffd6a5, #fdffb6, #caffbf, #9bf6ff, #a0c4ff, #bdb2ff, #ffc6ff);
margin-top: auto;
}
footer p {
text-align: center;
}
h1 {
text-align: center;
}
h2 {
margin-top: 1vh;
margin-bottom: 1vh;
}
p {
color: #424242;
margin-top: 1%;
margin-bottom: 1%;
} }
li { li {
color: #424242; color: var(--text-color);
} }
hr { hr {
border-style: dashed; border-style: dashed;
border-color: #424242; border-color: var(--border-color);
color: #424242; color: var(--text-color);
margin: auto; margin: auto;
} }
@ -118,7 +44,7 @@ img {
} }
figcaption { figcaption {
color: #424242; color: var(--text-color);
} }
.example-img-container { .example-img-container {

View file

@ -5,6 +5,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="content-type" content="text/html"> <meta http-equiv="content-type" content="text/html">
<title>Stoplight Schema</title> <title>Stoplight Schema</title>
<link rel="stylesheet" href="./styles.css">
<link rel="stylesheet" href="./stoplight-styles.css"> <link rel="stylesheet" href="./stoplight-styles.css">
<link rel="icon" href="./res/icon.png"> <link rel="icon" href="./res/icon.png">
</head> </head>

View file

@ -1,15 +1,23 @@
body { :root {
background-color: #293B2A; --body-background-color: #293B2A;
--header-background-color: #646D5A;
--nav-background-color: #505948;
--nav-text-color: #8CAA8C;
--nav-hover-color: #464F3E;
--wrapper-background-color: #647E5A;
--border-color: #101010;
--text-color: #101010;
--footer-gradient: linear-gradient(20deg, #ffadad, #ffd6a5, #fdffb6, #caffbf, #9bf6ff, #a0c4ff, #bdb2ff, #ffc6ff);
} }
#wrapper { #wrapper {
background-color: #647E5A; background-color: var(--wrapper-background-color);
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
border-left: 1px solid #101010; border-left: 1px solid var(--border-color);
border-right: 1px solid #101010; border-right: 1px solid var(--border-color);
width: 90%; width: 90%;
height: 100vh; /* remove once content grows enough */ min-height: 100vh; /* keeps the wrapper at least the length of the screen */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@ -25,19 +33,27 @@ body {
body { body {
margin: 0; margin: 0;
height: 100vh; height: 100vh;
background-color: var(--body-background-color);
}
h1, h2, h3, h4, h5, h6 {
color: var(--text-color);
} }
header { header {
background-color: #646D5A; background-color: var(--header-background-color);
margin-bottom: 1vh; margin-bottom: 1vh;
} }
nav ul { nav ul {
list-style-type: none; list-style-type: none;
margin: 0; margin-left: .3%;
margin-right: .3%;
margin-top: .3%;
margin-bottom: .3%;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
background-color: #505948; background-color: var(--nav-background-color);
display: block; display: block;
} }
@ -49,25 +65,25 @@ nav li {
nav li a { nav li a {
display: block; display: block;
color: #8CAA8C; color: var(--nav-text-color);
text-align: center; text-align: center;
padding: 14px 16px; padding: 14px 16px;
text-decoration: none; text-decoration: none;
} }
nav li a:hover { nav li a:hover {
background-color: #464F3E; background-color: var(--nav-hover-color);
} }
footer { footer {
background: linear-gradient(20deg, #ffadad, #ffd6a5, #fdffb6, #caffbf, #9bf6ff, #a0c4ff, #bdb2ff, #ffc6ff); background: var(--footer-gradient);
margin-top: auto; margin-top: auto;
} }
footer hr { footer hr {
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-color: #101010; border-color: var(--border-color);
margin: auto; margin: auto;
} }
@ -85,7 +101,7 @@ h2 {
} }
p { p {
color: #101010; color: var(--text-color);
margin-top: 1%; margin-top: 1%;
margin-bottom: 1%; margin-bottom: 1%;
} }
@ -93,38 +109,7 @@ p {
hr { hr {
border-width: 1px; border-width: 1px;
border-style: dashed; border-style: dashed;
border-color: #101010; border-color: var(--border-color);
color: var(--border-color);
margin: auto; margin: auto;
} }
.social {
color: #683655;
font-size: large;
font-weight: bold;
display: block;
}
#mastodon {
font-style: italic;
text-decoration: none;
color: #3088D4;
}
#discord {
font-style: italic;
text-decoration: none;
color: #7289DA;
}
#contact {
border-style: solid;
border-width: .2vh;
border-color: #101010;
padding: 1vh;
background-color: #646D5A;
display: block;
}
#contact h2 {
margin: 0;
}