John Siciliano

@johnsicili.bsky.social

// Creating technical content

DRY (don’t repeat yourself) is a core development principle. Hardcode an email in 3 places on a site, and human error will strike if you need to update it. Plus, it just takes more work. Now you can define reusable data on the Global Root. Think phone numbers, emails, CMS API info, etc.

Webstudio@webstudio.is · last yr.

Want to reuse an email 📧, phone number, or CMS connection data throughout your site?? Now you can with Global Data Variables! 🌎 Define reusable data globally 📦 Access the variables anywhere… including inside Slots! 👌 Maintain consistency 🫰 Easier CMS setup! Demos below 😉

Official Webstudio sections library coming soon! - Built with Craft - One-click insert - Auto-adapts to your design system on insert - Quality > quantity - Accessible and SEO’d Talk soon 😉

Bild

Starting an A/B test for our homepage title. It’s been extremely challenging to ideate these, specifically balancing clarity, SEO, punchiness, target audience, and unique value proposition.

Bild

What do you do when implementing a Figma design that has images that go to the edge of the design and then are cut off? How should this be handled on larger screens? I personally export the non-clipped image and on larger screens show the full image outside of the container.

Figma to WS update: Color vars! 1 Feed it CSS from Figma 2 Suggest the Open Props color groups 3 AI maps colors to palette variables (—gray-12) 4 Human intervention lets you customize the mappings 5 AI maps the color vars to semantic vars by interpreting their usage from the CSS

I’m using Preview mode 5x more with the new shortcut… ⌘ + Shift + D All with the left hand. This shortcut is for toggling to Design mode, but if you’re already in it, it’ll take you to Preview.

Webstudio Tip: Use the Expression Editor for conditional plural formatting. Example: Display "1 template" or "6 templates" dynamically with this expression: `${total} template${+total == 1 ? '' : 's'}`

Bild

Woah, I just learned that if you hold option while taking a screenshot, it grows outwards from the center point. This makes it a lot easier to take a screenshot with the desired focal point in the middle.

Figma → Webstudio update: Added support for Local Styles! Including: - Grid template columns based on what it sees - Flex with direction and Craft gap vars - Background colors (on `section`) Also added a CLI and some other helpful tasks 😉

Figma to Webstudio update: Now using OpenAI API in the local script to convert the image to HTML. Then the usual code converts the HTML to Webstudio AST and copies it to the clipboard. Note: I trimmed the video, the API takes longer than that :)

Updated Figma to Webstudio with improved process: - ChatGPT for screenshot to HTML with attributes. - Custom script for HTML to Webstudio AST. ChatGPT is very reliable for the HTML but too inconsistent with the AST. Also added support for: - Alt text - Grid columns - Cards

Working on a Figma to Webstudio ChatGPT prompt. It outputs Craft-compliant* Webstudio AST (format for pasting) It adds: - Components - Existing Tokens (section, container, grid, headings, buttons) - Renames instance labels - Sets box tag like h2 or section *most of the time😉