A bit of a vulnerable post by me but we need your help to get us through what has been a more difficult period than 2020.
It would be really appreciated if you could read and share in your networks too π
bell.bz/its-been-a-v...
Posts by Bryan Bemis
Design tokens app update: preview styleguide for all your tokens or select to filter any group.
Have you ever wished the browser would look at a background color and pick black or white for the text βΒ whichever one provides more contrast?
Now, the `constrast-color()` function in CSS does just that.
webkit.org/blog/16929/c...
Gotta love the transparency of Open Source
Screenshot of adding a global variable named "year" in Webstudio
Screenshot of referencing our global variable "year" in a paragraph in Webstudio
Playing with the newly released global variables in @webstudio.is
πͺ Create on the Global Root
π Reference on all pages and inside Slots
Screenshot of the Webstudio code editor dialog, showing a JavaScript script that replaces the year placeholder text (a span with Id = year) with the current year
Simpler yet, use the getElementById() method in the script to target the placeholder.
4. Add an HTML Embed and enter the script code shown in the image.
See our year placeholder's ID (i.e., π’πππ) in the script? Make sure they match.
And presto π! No more manual year updates or zombie site vibes.
3/3
1. In your copyright text, include a placeholder for the year. Anything will do.
2. Wrap the year placeholder in a span.
3. Give the span an ID (e.g., π’πππ) so we can target it with a script... π
2/3
That "2022" in a website's copyright credits? It says "zombie site." π§ββοΈ
Bots to the rescue! π€
Let's make a dynamically updating year in @webstudio. π§΅π
1/3
The @webstudio.is style guide starts with a dark theme π.
Been there, done that? πΆοΈ
Start with a light theme instead π:
1. Add the Craft Style Guide
2. Copy the CSS variables for the light theme
3. Select the Global Root element
4. Paste the copied CSS variables
docs.webstudio.is/university/c...
Love how @webstudio.is now lets you easily edit long CSS values:
π Hover to auto-scroll the value in the field
π Click to open a code editor dialog