openui/open-ui

Utilise CSS variables across the site

オープン

#673 opened on 2023/03/04

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)MDX (222 件のフォーク)github user discovery
frontendgood first issueneeds-triageopenui-site

Repository metrics

Stars
 (4,488 個のスター)
PR merge metrics
 (平均マージ 2d) (30d で 9 merged PRs)

説明

We have a lot of hardcoded colour and spacing values across our CSS files. We also have a lot of similar colours that could be consolidated into a single colour variables.

Here's a small slice of the different variables that we have across the site:

values number of files total occurrences
#333 1 1
#eee 2 2
#00a453 3 3
#f2f2f2 2 2
#ffdf3f 1 2

This isn't included spacing values or rgba values.

To ensure a consistent visual experience across the site, we should look to use CSS variables where possible.

This means defining the CSS variables in the global.css file, and using them in other CSS files or within style blocks.

This will also allow us to more easily add a dark mode, should we decide to add one at a later date.

コントリビューターガイド