Is it possible to widen the overall answers experience? The cards on the universal search and some verticals only go as wide as the search bar. Whereas the vertical-map page takes up the entire width of the screen. Is there a reason for this design and why we would not (or could not) change it?
I know we can alter the margins for vertical searches with filters to go beyond the width of the search bar, but can we do the same for just the cards?
You’re always welcome to change the standard styling, just know that if you change it, you’ll need to test across browsers/devices to confirm functionality!
The width of the cards aligns with best practices for easier readability of paragraph-like text - if it’s too wide, it becomes harder for a user to keep track of their place while reading.
However, you can widen the answers container using the variable --hh-answers-container-width in your answers-variables.scss file. This increases the width of both the search bar and the cards themselves.
We widened the experience using the -hh-answers-container-width variable and the client loves it. However, It looks like it is causing a breakpoint issue for a tablet search or a collapsed window on desktop. I see there are set variables for breakpoints (ex. $breakpoint-mobile-max), but I am not having success fixing the issue by changing the values of these variables. Do you know how best to go about editing breakpoint widths?
Another way to do this with how you have it now. where you want to set the width to a value like 1000px, would be as follows:
1. Add an additional variable in your answers-variables.scss file. We can use this to help adjust the mobile responsiveness across different breakpoints.
$breakpoint-custom-min: 1000px;
2. Use media queries to adjust the width of the Answers-container class. You can learn more about media queries here. Here, we’ll redefine the behavior at the existing breakpoint to only fill up to 100% of the width, and define the behavior once the width is greater than your hh-answers-container-width to set the width to that value (in this case, 1000px).
Here, you can see how we’re overriding the styling (which would have set the width of the container to 1000px at the 768px breakpoint) to be 100% until we meet the threshold of the new answers-width value.