bridgemanaccessible.ca/src/static/css/new-design.css

141 lines
No EOL
3.2 KiB
CSS

body {
font-family: sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
display: flex; /* Enable flexbox for overall layout */
}
.page-container {
display: flex; /* Enable flexbox for main content and thermometer areas */
width: 100%;
max-width: 1200px; /* Optional: Limit page width */
margin: 20px auto; /* Center the container */
padding: 20px;
box-sizing: border-box;
}
.content-area {
width: 85%;
padding-right: 5%; /* Spacing for the triangle */
box-sizing: border-box;
}
.card-section {
background-color: white;
border: 1px solid #ddd;
box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.05);
border-radius: 8px;
margin-bottom: 20px;
padding: 20px;
}
.card-header h2 {
margin-top: 0;
color: #333;
}
.card-content {
color: #555;
line-height: 1.6;
margin-bottom: 15px;
}
.card-bottom .read-more {
background-color: #007bff;
color: white;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
font-size: 0.9em;
}
.card-bottom .read-more:hover {
background-color: #0056b3;
}
.thermometer-area {
width: 10%;
display: flex;
flex-direction: column;
align-items: center;
padding-left: 5px; /* Spacing from the content area */
box-sizing: border-box;
}
.thermometer-label {
font-size: 0.8em;
color: #777;
margin-bottom: 10px;
text-align: center;
writing-mode: vertical-lr; /* Make the label vertical */
}
.thermometer-graphic {
background: linear-gradient(to bottom, #fdd835, #e1f5fe); /* Two-color fade/gradient */
width: 30px; /* Adjust thickness as needed */
height: 200px; /* Adjust height as needed */
border-radius: 15px;
border: 1px solid #ccc;
}
.triangle-connector {
width: 0;
height: 0;
border-top: 20px solid transparent; /* Adjust height to control triangle size */
border-left: 20px solid white; /* Match card background */
border-bottom: calc(100% - 20px) solid transparent; /* Adjust based on top border */
position: absolute;
top: 0;
right: 10%; /* Align with the thermometer area */
box-sizing: border-box;
pointer-events: none; /* Allow clicks to pass through */
}
/* Visually hidden class for accessibility */
.visually-hidden {
position: absolute !important;
width: 1px !important;
height: 1px !important;
overflow: hidden !important;
clip: rect(0 0 0 0) !important;
margin: -1px !important;
padding: 0 !important;
border: 0 !important;
}
/* Basic responsive adjustments */
@media (max-width: 768px) {
body {
flex-direction: column; /* Stack elements on smaller screens */
align-items: center;
}
.page-container {
flex-direction: column;
width: 95%;
}
.content-area {
width: 100%;
padding-right: 0;
}
.thermometer-area {
width: 80%;
flex-direction: row; /* Label and graphic side by side */
justify-content: center;
margin-top: 20px;
padding-left: 0;
}
.thermometer-label {
writing-mode: horizontal-tb;
margin-right: 10px;
}
.triangle-connector {
display: none; /* Hide triangle on smaller screens */
}
}