{{ 'video-section.css' | asset_url | stylesheet_tag }} {{ 'component-deferred-media.css' | asset_url | stylesheet_tag }} {%- style -%} .section-{{ section.id }}-padding { padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; } @media screen and (min-width: 750px) { .section-{{ section.id }}-padding { padding-top: {{ section.settings.padding_top }}px; padding-bottom: {{ section.settings.padding_bottom }}px; } } {%- endstyle -%} {%- liquid assign video_id = section.settings.video.id | default: section.settings.video_url.id assign video_alt = section.settings.video.alt | default: section.settings.description assign alt = 'sections.video.load_video' | t: description: video_alt | escape assign poster = section.settings.video.preview_image | default: section.settings.cover_image if section.settings.video != null assign ratio_diff = section.settings.video.aspect_ratio | minus: poster.aspect_ratio | abs if ratio_diff < 0.01 and ratio_diff > 0 assign fix_ratio = true endif endif -%} {%- capture sizes -%} {% if section.settings.full_width -%} 100vw {%- else -%} (min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 }}px, (min-width: 750px) calc(100vw - 10rem), 100vw {%- endif %} {%- endcapture -%}