You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be easier to override in a custom theme if a class was used instead. For example, when the component is set to use 3 columns, add has-3-columns to the component__widget. The styles would then determine how wide each item should be. For example:
.has-3-columns .hotgrid__item {
width: 33%;
}
In a custom theme, if we then needed the items to only be 30% width instead of 33%, we would simply add it to the theme:
.has-3-columns .hotgrid__item {
width: 30%;
}
This would also make it easier to adjust the width at different breakpoints as we can rely on @media queries in the Less.
The text was updated successfully, but these errors were encountered:
swashbuck
changed the title
Set item widths with CSS class instead of calculated inline width
Set item widths with CSS class instead of calculated inline style
Jan 8, 2025
Subject of the issue
Currently, item widths are set as inline width styles.
adapt-hotgrid/templates/hotgrid.jsx
Lines 64 to 66 in ed04d61
This results in the width being set as an inline style.
This would be easier to override in a custom theme if a class was used instead. For example, when the component is set to use 3 columns, add
has-3-columns
to thecomponent__widget
. The styles would then determine how wide each item should be. For example:In a custom theme, if we then needed the items to only be 30% width instead of 33%, we would simply add it to the theme:
This would also make it easier to adjust the width at different breakpoints as we can rely on
@media
queries in the Less.The text was updated successfully, but these errors were encountered: