From 02dc9aab3fdde04becc4b469dea90e65ca81c349 Mon Sep 17 00:00:00 2001 From: Nadir Musayev Date: Mon, 12 Jan 2026 22:55:21 +0400 Subject: [PATCH 1/2] adding focus_css to glide page --- content/collections/tags/glide.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/content/collections/tags/glide.md b/content/collections/tags/glide.md index 521afee5a..7ce9987fe 100644 --- a/content/collections/tags/glide.md +++ b/content/collections/tags/glide.md @@ -432,6 +432,26 @@ _Note: All Glide generated images are cropped at their focal point, unless you d 'auto_crop' => true, ``` + +### focus_css +The focal point of the asset, in a format suitable for the background-position CSS property, if one has been set. + +::tabs + +::tab antlers +```antlers +{{ focus_css }} +``` +::tab blade +```blade +{{ $focus_css }} +``` +:: + +```html +50% 30% +``` + ## Unsupported formats Glide will resize whatever images it supports, like jpgs or pngs. If you pass an unsupported type to Glide, like an svg, it'll just return the unmodified URL. From e5726cbe534cc924a7842e8d571188761bfd0db5 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 22 Jan 2026 00:42:01 +0000 Subject: [PATCH 2/2] wip --- content/collections/tags/glide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/collections/tags/glide.md b/content/collections/tags/glide.md index 7ce9987fe..2db6540a7 100644 --- a/content/collections/tags/glide.md +++ b/content/collections/tags/glide.md @@ -434,7 +434,8 @@ _Note: All Glide generated images are cropped at their focal point, unless you d ### focus_css -The focal point of the asset, in a format suitable for the background-position CSS property, if one has been set. + +You may use the [`focus_css`](/variables/focus_css) variable to get an asset's focal point in a format suitable for the `background-position` CSS property. ::tabs