FormMaker/static/style.css

152 lines
3.1 KiB
CSS
Raw Permalink Normal View History

2024-09-06 00:44:15 -06:00
/* General Styles */
2024-09-03 22:11:12 -06:00
body {
2024-09-06 00:44:15 -06:00
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f9f9fc;
2024-09-03 22:11:12 -06:00
color: #333;
margin: 0;
padding: 0;
2024-09-06 00:44:15 -06:00
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
2024-09-03 22:11:12 -06:00
}
2024-09-06 00:44:15 -06:00
/* Main container for both form and matches */
2024-09-03 22:11:12 -06:00
.container {
2024-09-06 00:44:15 -06:00
display: flex;
justify-content: center;
align-items: center;
width: 90%; /* Increased width for a more uniform layout */
max-width: 1000px;
transition: all 0.6s ease-in-out;
}
/* Form and Matches Sections */
.form-section, .matches-section {
width: 100%;
2024-09-03 22:11:12 -06:00
padding: 20px;
background-color: white;
2024-09-06 00:44:15 -06:00
border-radius: 15px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: all 0.6s ease-in-out;
box-sizing: border-box; /* Ensure padding is included in the width */
2024-09-03 22:11:12 -06:00
}
2024-09-06 00:44:15 -06:00
/* Ensure both form and matches have the same width */
.form-section {
max-width: 400px;
}
/* Hidden matches section by default */
.matches-section {
opacity: 0;
height: 0;
visibility: hidden;
transition: all 0.6s ease-in-out; /* Smooth transition for visibility */
2024-09-03 22:11:12 -06:00
}
2024-09-06 00:44:15 -06:00
/* Show matches when class chip is added */
.show-matches .matches-section {
opacity: 1;
height: auto;
visibility: visible;
margin-left: 20px;
transition: all 0.6s ease-in-out;
2024-09-03 22:11:12 -06:00
}
2024-09-06 00:44:15 -06:00
/* Smooth fade-in animation for the matches section */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateX(50px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Form Section Animation */
.show-matches .form-section {
transform: translateX(-50%);
transition: all 0.6s ease-in-out;
2024-09-03 22:11:12 -06:00
}
2024-09-06 00:44:15 -06:00
/* Input fields */
form input[type="text"], form input[type="email"], form input[type="submit"] {
2024-09-03 22:11:12 -06:00
width: 100%;
padding: 10px;
2024-09-06 00:44:15 -06:00
margin-bottom: 15px;
border-radius: 8px;
border: 1px solid #ddd;
2024-09-03 22:11:12 -06:00
font-size: 16px;
2024-09-06 00:44:15 -06:00
box-sizing: border-box;
2024-09-03 22:11:12 -06:00
}
2024-09-06 00:44:15 -06:00
/* Submit button */
2024-09-03 22:11:12 -06:00
form input[type="submit"] {
2024-09-06 00:44:15 -06:00
background-color: #007bff;
2024-09-03 22:11:12 -06:00
color: white;
border: none;
cursor: pointer;
2024-09-06 00:44:15 -06:00
transition: background-color 0.3s;
2024-09-03 22:11:12 -06:00
}
form input[type="submit"]:hover {
2024-09-06 00:44:15 -06:00
background-color: #0056b3;
2024-09-05 17:51:53 -06:00
}
2024-09-06 00:44:15 -06:00
/* Tags (Class Chips) Styling */
2024-09-05 17:51:53 -06:00
.tags-input-container {
display: flex;
flex-wrap: wrap;
border: 1px solid #ccc;
padding: 8px;
2024-09-06 00:44:15 -06:00
border-radius: 8px;
2024-09-05 17:51:53 -06:00
min-height: 40px;
cursor: text;
}
.tags-input-container:focus-within {
2024-09-06 00:44:15 -06:00
border-color: #007bff;
2024-09-05 17:51:53 -06:00
}
.tag {
display: inline-flex;
align-items: center;
background-color: #e0e0e0;
2024-09-06 00:44:15 -06:00
border-radius: 20px;
2024-09-05 17:51:53 -06:00
padding: 4px 8px;
margin: 4px;
font-size: 14px;
}
.tag:hover .close {
display: inline-block;
}
.tag .close {
margin-left: 8px;
cursor: pointer;
display: none;
font-size: 14px;
color: red;
}
2024-09-06 00:44:15 -06:00
/* Fix for text overflow in input fields */
2024-09-05 17:51:53 -06:00
.tags-input-container input {
border: none;
outline: none;
flex-grow: 1;
font-size: 14px;
padding: 4px;
2024-09-06 00:44:15 -06:00
min-width: 50px;
}
/* Matches section styling (not a card for the 'No similar classes' text) */
#matches-container p {
margin: 0;
color: #666;
text-align: center;
}