@ms097530
Posted
As far as CSS goes, I would recommend approaching the styling from a mobile-first perspective. This can simplify the layout as oftentimes the styling for the mobile version overlaps with the default styling in the browser (i.e. stacking content in a single column). I think this will help with your feeling of having to rewrite everything to structure the mobile version.
I think it would also be helpful to create a single error class since each error class has the exact same styling. You could give each error a class of error and instead assign them ids for ease of selection in JS. If you're looking to get rid of the form text shifting when an error occurs you could replace display: none;
with visibility: hidden;
as this will reserve space for the content but make it invisible until changed to visibility: visible;
.
Cheers, Mike
Marked as helpful
@yallsobad
Posted
@ms097530 ty sir