Skip to content

Commit

Permalink
Fix horizontal scrolling on pages including Streamfield ImageText blo…
Browse files Browse the repository at this point in the history
…ck (#12444)

* Fix horizontal scroll on specific blocs by calculating a pixel less than bs vs tw resolves.

* Moved fix code to bottom of file and added descriptive comment.

* Update `image_text` block to fix extra pixel in margin for `tw-row` classes.

* Specify the viewport in which the fix is applied in order to avoid modifying medium and large screens current margins.
  • Loading branch information
ramram-mf authored Jun 13, 2024
1 parent 36fd640 commit aeaa4b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load l10n wagtailcore_tags wagtailimages_tags %}

{% block block_content %}
<div class="tw-row tw-my-8">
<div class="tw-row tw-my-8 !tw-mr-[calc(-1rem+1px)] small:!tw-mr-[-1rem]">
{% if value.small %}
<div class="tw-w-full tw-px-8 tw-flex tw-flex-nowrap">
<div class="tw-mr-6 tw-shrink-0 tw-w-24">
Expand Down

0 comments on commit aeaa4b9

Please sign in to comment.