Join the Webstudio community

Updated 2 months ago

Copy asset link

At a glance

The community members discuss the need for an ability to copy direct links to assets, similar to Webflow. One community member wants to use CSS to style elements based on their order (nth-child), but is unsure if directly copying links from the browser inspector will work consistently. Another community member advises against hardcoding asset links as they may change in the future. The discussion explores using a CMS, reusing styles with tokens, and creating card variants that the client can choose from. The final suggestion is to add all possible variations to the content block template, as the community members determine this is the best solution for the current case.

Will be good to have an ability to copy direct link to the asset. Like in webflow.
Attachment
image.png
1
b
J
B
12 comments
Okay looks like complex issue. I just need links to use in CSS for styling elements based on their order (nth-child). If I just copy link from browser inspector, will it work consitently?
We don't recommend hardcoding asset links as they may change in the future
Maybe a simple CMS can help?
This elements are not coming from cms. I want let client use 'content block' with template to add and remove elements. So I need to hard code styles instead of adding them separately for each card
Can you reuse styles with tokens?
Not sure how to use tokens here. They are not available in Content mode. What I need to do:
I have several cards in the section with different decoration. Client wants to add/remove cards by himself. So content block fits well. I want to style decorations with CSS nth child for example: every second card will have this decor element, every third card this, etc.
sounds like your cards need to have variants, which customer can choose on each crd
You mean like add all possible variations to the content block template?
generally, in abstract terms, you have a card that needs to hvae an option "decor", and each card instance can have a different decor set by the user
Something like this. But generally I would like to automate this for user, because it's just visual thing defined by designer and doesn't affect content or functional. But if it's not possible, letting client choose by himself will work as well.
For now adding each variation to content block should do the job
Thanks for help. Will go this way in current case.
Add a reply
Sign up and join the conversation on Discord