Aleksandr Slugin
skandar-dev.bsky.social
Aleksandr Slugin
@skandar-dev.bsky.social
Couple of screenshots
December 8, 2024 at 9:44 PM
You can see a real example of usage in my blog skandar.dev/articles/obj...
and Sara Soueidan's blog (I borrowed this idea from her) www.sarasoueidan.com/blog/accessi...

Also you can read more in this MDN article developer.mozilla.org/en-US/docs/W...
December 8, 2024 at 9:43 PM
When we name lines using "-start" and "-end" at the end of names, we can use shorthand of the name without "-start" and "-end" as in the code in the screenshot.

If we want to specify "grid-column" and "grid-row" at the same time we can use shorthand "grid-area".
December 8, 2024 at 9:43 PM
In the code on the screenshot we want all "<img>" elements to fill the space of the columns from line "full-start" to line "full-end" and "<p>" from line "content-start" to line "content-end".
December 8, 2024 at 9:43 PM

We can create invisible lines and give them names using [some-name] syntax. After that, we can use those named lines for specifying which columns/rows element should fill.
December 8, 2024 at 9:43 PM
After that, you can use component in the *.mdx file without importing it, and the styles will be generated.

More complex example you can see in this PR: github.com/Skandar/skan...
Refactor/Callout-styles by Skandar · Pull Request #6 · Skandar/skandar.dev
When we use Astro component inside MDX, @vanilla-extract/css doesn't create styles for component (but generate class). Importing components in <Content> fix this issue.
github.com
November 24, 2024 at 6:00 PM
Also there's Telegram channel (t.me/skandar_dev) where I'll publish links to my articles, interesting finds on the internet and my thoughts on them.
skandar.dev
Chanel about web and technologies.
t.me
November 16, 2024 at 4:00 PM