diff --git a/screenshots/pages/colorpicker.astro b/screenshots/pages/colorpicker.astro index 0df6b3adb..66ac4ea03 100644 --- a/screenshots/pages/colorpicker.astro +++ b/screenshots/pages/colorpicker.astro @@ -1,32 +1,23 @@ --- -// The Colorpicker plugin added in 1.7: a label form with the color field and -// its panel open under it, opacity slider and format select included. The -// panel is opened here rather than left to a focus the capture tool cannot -// make, and the fake cursor rests on the handle in the gradient. +// The Colorpicker plugin added in 1.7, on its own: the color field with its +// panel open under it, opacity slider and format select included. The panel +// is opened here rather than left to a focus the capture tool cannot make, +// and the fake cursor rests on the handle in the gradient. import ScreenshotLayout from '../layouts/ScreenshotLayout.astro' -import Card from '@ui/Card.astro' -import CardBody from '@ui/CardBody.astro' import Colorpicker from '@ui/Colorpicker.astro' -import FormGroup from '@ui/FormGroup.astro' --- - - - - - - - - - - - + + - + @@ -35,10 +26,10 @@ import FormGroup from '@ui/FormGroup.astro' const input = document.getElementById('colorpicker-color') if (!input || !window.tabler?.Colorpicker) return - // The panel lives in the card, not in : the capture hides the - // theme toggle after the page is ready, which moves the frame, and a - // panel placed against would stay where the field used to be. - new window.tabler.Colorpicker(input, { container: input.closest('.card') }).show().then(() => { + // The panel lives next to the field, not in : the capture hides + // the theme toggle after the page is ready, which moves the frame, and + // the picture is taken before the panel has a frame to follow the field. + new window.tabler.Colorpicker(input, { container: input.closest('[data-screenshot-target]') }).show().then(() => { const marker = document.querySelector('.colorpicker-panel .colorpicker-marker') if (!marker) return