# How do handle dynamic border properties?

**URL:** <https://community.weweb.io/t/how-do-handle-dynamic-border-properties/5514>\
**Category:** How do I?\
**Tags:** design\
**Created:** [November 22, 2023, 12:03am UTC](https://community.weweb.io/t/how-do-handle-dynamic-border-properties/5514 "2023-11-22T00:03:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lantzgould](https://avatars.discourse-cdn.com/v4/letter/l/ecccb3/32.png) [@Lantzgould](https://community.weweb.io/u/Lantzgould)\
**Post date:** [November 22, 2023, 12:03am UTC](https://community.weweb.io/t/how-do-handle-dynamic-border-properties/5514/1 "2023-11-22T00:03:18Z")

</div>

I decided to try out a dark/light setting by following this guide:

> [@How to manage Light and Dark mode](https://community.weweb.io/t/how-to-manage-light-and-dark-mode/4726):
>
> Hi everyone, I am following up on a question from Neil during the office hours on October 3, 2023. The question was about how to properly implement a light and dark mode in WeWeb. There are multiple approaches to managing this topic. What I consider to be a best practice is to use CSS variables. Here is how you can utilize this powerful feature in the editor: First, create two object variables: one for the light colors and another one for the dark colors. As a default value, you need to incl…

My question is: Using the method above, how can I ensure a border-width remains 1px while having the color variable dynamic?

 ![CleanShot 2023-11-21 at 16.01.13@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/fd7f7866decfb357c7951f38edc26fc1d5ed313c.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 22, 2023, 8:06am UTC](https://community.weweb.io/t/how-do-handle-dynamic-border-properties/5514/2 "2023-11-22T08:06:29Z")

</div>

Add + solid #color  
This way it is somwthing like (1px solid red)
