Make plugin layout consistent for all screen widths based on 768px layout

This commit is contained in:
Marcus Quinn
2025-03-25 00:45:29 +00:00
parent 21b0ef599d
commit 6528d8e79a
2 changed files with 42 additions and 120 deletions

View File

@ -1033,6 +1033,7 @@ body.wp-admin .button.pricing-button:hover,
text-align: center;
}
/* Use consistent layout similar to 768px width for all screen sizes */
#recommended .plugin-card {
width: 100%;
margin: 0 0 24px 0;
@ -1058,7 +1059,6 @@ body.wp-admin .button.pricing-button:hover,
#recommended .plugin-card-top {
padding: 0;
margin-bottom: 20px;
min-height: auto;
flex-grow: 1;
}
@ -1068,13 +1068,13 @@ body.wp-admin .button.pricing-button:hover,
float: left;
width: 64px;
height: 64px;
margin: 0 20px 0 0;
margin: 0 20px 15px 0;
}
#recommended .plugin-card .name,
#recommended .plugin-card .desc {
margin-left: 84px;
margin-right: 150px; /* Increase right margin to prevent text going behind buttons */
margin-right: 0; /* Full width content */
}
#recommended .plugin-card .name h3 {
@ -1083,6 +1083,7 @@ body.wp-admin .button.pricing-button:hover,
font-weight: 600;
color: #1d2327;
line-height: 1.4;
word-wrap: break-word;
}
#recommended .plugin-card .desc {
@ -1090,28 +1091,31 @@ body.wp-admin .button.pricing-button:hover,
color: #50575e;
font-size: 14px;
line-height: 1.6;
margin-bottom: 20px;
}
/* Position action links below content, not absolute */
#recommended .plugin-card .action-links {
position: absolute;
top: 24px;
right: 0;
width: 140px; /* Slightly increase width for buttons */
position: relative;
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-end;
flex-direction: row;
align-items: center;
justify-content: flex-end;
gap: 8px;
padding-right: 20px; /* Keep padding to give text more space */
padding: 0;
margin-top: 10px;
}
#recommended .plugin-card .plugin-action-buttons {
margin: 0;
float: none;
width: 100%;
width: auto;
}
#recommended .plugin-card .plugin-action-buttons .button {
width: 100%;
width: auto;
min-width: 120px;
text-align: center;
}
@ -1138,44 +1142,7 @@ body.wp-admin .button.pricing-button:hover,
justify-content: center;
}
/* Responsive adjustments - improve mobile layout */
@media screen and (max-width: 782px) {
#recommended .wpa-plugin-container {
padding: 16px;
}
#recommended .plugin-card {
padding: 16px;
position: relative;
}
#recommended .plugin-card .name,
#recommended .plugin-card .desc {
margin-right: 0; /* Allow full width on mobile */
}
#recommended .plugin-card .action-links {
position: relative;
width: 100%;
top: auto;
right: auto;
padding-right: 0;
margin-top: 16px;
flex-direction: row;
justify-content: flex-end;
}
#recommended .plugin-card .plugin-action-buttons {
width: auto;
}
#recommended .plugin-card .plugin-action-buttons .button {
width: auto;
min-width: 120px;
}
}
/* Extra small screens */
/* Extra small screens only */
@media screen and (max-width: 480px) {
#recommended .plugin-card {
padding-top: 80px; /* Add space for icon */
@ -1372,12 +1339,4 @@ body.wp-admin .button.pricing-button:hover,
padding-left: 25px !important;
margin-left: 0 !important;
list-style-type: disc !important;
}
@media screen and (min-width: 1100px) {
/* Ensure text doesn't overlap buttons on wide screens */
#recommended .plugin-card .name,
#recommended .plugin-card .desc {
margin-right: 160px;
}
}