Skip to content

Commit b7f3637

Browse files
committed
coursework: complete CSS styling for button and quote text
1 parent 4f79256 commit b7f3637

File tree

2 files changed

+61
-9
lines changed

2 files changed

+61
-9
lines changed

Sprint-3/quote-generator/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<script defer src="quotes.js"></script>
99
</head>
1010
<body>
11-
<main class="app">
11+
<main>
1212
<h1>Quote Generator</h1>
13-
<section class="quote-card">
13+
<section>
1414
<span class="quote-mark quote-mark-open">"</span>
1515
<p id="quote"></p>
1616
<p id="author"></p>

Sprint-3/quote-generator/style.css

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
box-sizing: border-box;
33
margin: 0;
44
padding: 0;
5+
border: none;
56
}
67

78
body {
89
height: 100vh;
9-
background: linear-gradient(135deg, #90a3ff 0%, #b893ff 50%, #f2a1ff 100%);
10+
background: var(--main-bg-colour);
1011
font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
11-
color: #3f2475;
12+
color: var(--font-colour);
1213
display: flex;
1314
justify-content: center;
1415
padding: 2rem 1.25rem 3rem;
1516
}
1617

17-
.app {
18+
main {
1819
width: 1100px;
1920
display: flex;
2021
flex-direction: column;
@@ -25,14 +26,65 @@ h1 {
2526
font-size: 3rem;
2627
font-weight: 900;
2728
margin-bottom: 2rem;
29+
text-align: center;
2830
}
2931

30-
.quote-card {
31-
width: 100%;
32-
background: rgba(249, 245, 255, 0.6);
32+
section {
33+
max-width: 800px;
34+
background: var(--card-bg-colour);
3335
border-radius: 1rem;
36+
border: solid 2px #e7dcfb;
3437
padding: 5rem;
35-
/* position: relative; */
38+
position: relative;
3639
text-align: center;
3740
box-shadow: 0 14px 32px rgba(80, 40, 140, 0.14);
3841
}
42+
43+
#quote {
44+
font-size: 1.75rem;
45+
font-weight: 600;
46+
padding-bottom: 25px;
47+
max-width: 60ch;
48+
}
49+
50+
#author {
51+
font-size: 1.35rem;
52+
}
53+
54+
.quote-mark {
55+
font-size: 7rem;
56+
position: absolute;
57+
font-family: "Times New Roman", Times, serif;
58+
}
59+
60+
.quote-mark-open {
61+
left: 3rem;
62+
top: 0.2rem;
63+
}
64+
65+
.quote-mark-close {
66+
right: 3rem;
67+
bottom: -3rem;
68+
}
69+
70+
button {
71+
margin: 30px;
72+
padding: 10px 25px;
73+
font-family: inherit;
74+
font-size: 1.15rem;
75+
font-weight: 400;
76+
color: white;
77+
background-color: var(--font-colour);
78+
border-radius: 0.5rem;
79+
}
80+
81+
:root {
82+
--main-bg-colour: linear-gradient(
83+
35deg,
84+
#90a3ff 0%,
85+
#b893ff 50%,
86+
#f2a1ff 100%
87+
);
88+
--card-bg-colour: rgba(245, 246, 255, 0.6);
89+
--font-colour: #3f2475;
90+
}

0 commit comments

Comments
 (0)