Skip to content

Commit

Permalink
Merge pull request #9 from ubc-web-services/card--icon-overflow
Browse files Browse the repository at this point in the history
output flex classes when card icon position set to top
  • Loading branch information
ubcjohn authored Nov 6, 2024
2 parents 7462199 + d0b3a5c commit 74ad2ea
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions components/card--icon/card--icon.twig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
'mt-0',
]
%}
{% if layout is same as 'flex-col' %}
{% set layout_classes = [
'flex',
'flex-col',
]
%}
{% endif %}
{% if layout is same as 'flex-row' %}
{% set layout_classes = [
'sm--flex',
Expand All @@ -54,18 +61,6 @@
]
%}
{% endif %}
{% if layout is same as 'ubc-card--horiz' or layout is same as 'ubc-card--horiz-rev' %}
{% set figure_layout_classes = [
'sm--max-w-[300px]',
'sm--shrink-0',
]
%}
{% set horiz_content_classes = [
'flex-1',
'self-center',
]
%}
{% endif %}
<article{{ cardprimaryattributes.addClass(classes, layout_classes) }}>
<figure{{ figureattributes.addClass(figure_classes, figure_layout_classes) }}>
{% block media %}{% endblock %}
Expand Down

0 comments on commit 74ad2ea

Please sign in to comment.