Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChugunovRoman committed Feb 20, 2022
2 parents ea6ca4d + a54b15b commit 799adb9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ If you receive a `NO_PUBKEY` error while running `apt update`, then you must add
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 70F3445E637983CC
```

#### Alternative Ubuntu install

Download the .deb package from the [Releases](https://github.com/Figma-Linux/figma-linux/releases) page, and install it with `apt`.
```bash
sudo apt install figma-linux_*_amd64.deb
```

### Arch-based distros

Expand All @@ -105,7 +111,7 @@ sudo dnf install figma-linux-*.x86_64.rpm
1. Clone the repository:
```bash
git clone https://github.com/Figma-Linux/figma-linux
cd linux
cd figma-linux
```
2. Install Rust:
```bash
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions src/middleware/ThemesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ export class ThemesManager {
document.body.style.setProperty("--fg-overlay-sep", value);
}
}

document.body.style.setProperty("background-color", "var(--gb-panel)");

document.body.style.setProperty("--color-bg", "var(--bg-panel)");
document.body.style.setProperty("--color-bg-selected", "var(--bg-panel)");
document.body.style.setProperty("--color-text", "var(--text)");
document.body.style.setProperty("--color-text-secondary", "var(--text)");
document.body.style.setProperty("--color-border", "var(--borders)");
document.body.style.setProperty("--color-text-disabled", "var(--text-disabled)");
document.body.style.setProperty("--color-bg-selected-secondary", "var(--bg-panel)");
}

init(): void {
Expand All @@ -94,7 +104,6 @@ export class ThemesManager {
const additionStyleRules: string[] = [
"#react-page { background-color: var(--bg-panel); }",
`span[class*="action_option--shortcut"] { color: var(--fg-overlay); }`,
`div[class*="search--searchContainer"] input { background-color: var(--bg-panel) !important; }`,
`div[class*="file_browser_page_view"] { background-color: var(--bg-panel) !important; }`,
];

Expand Down Expand Up @@ -123,7 +132,6 @@ export class ThemesManager {
}

if (/search--searchInput/.test(cssRule.selectorText)) {
cssRule.style["backgroundColor"] = `var(--bg-panel)`;
cssRule.style["color"] = `var(--text-active)`;
}

Expand All @@ -133,6 +141,15 @@ export class ThemesManager {
if (/tool_bar--toolBarRightSide|pages_panel--pageRowSelected/.test(cssRule.selectorText)) {
cssRule.style["fill"] = `var(--text-active)`;
}
if (/.svg-container/.test(cssRule.selectorText)) {
additionStyleRules.push(`.svg-container path:not([fill="none"]) { fill: var(--text-active); }`);
}
if (/.text--_negText/.test(cssRule.selectorText)) {
additionStyleRules.push(`${cssRule.selectorText} { color: var(--fg-header); }`);
}
if (/.navbar--workspaceSubtitle/.test(cssRule.selectorText)) {
additionStyleRules.push(`${cssRule.selectorText} { color: var(--fg-header); }`);
}
if (/upgrade_section--icon/.test(cssRule.selectorText)) {
additionStyleRules.push(`span[class*="upgrade_section--icon"] > svg > path { fill: var(--text); }`);
}
Expand All @@ -146,11 +163,6 @@ export class ThemesManager {
if (/basic_form--textInput/.test(cssRule.selectorText)) {
cssRule.style["backgroundColor"] = `var(--bg-panel)`;
}
if (
/(search--searchContainer--.*:hover|search--expandingSearchBoxContainerFocused)/.test(cssRule.selectorText)
) {
cssRule.style["backgroundColor"] = `var(--bg-header)`;
}
if (/step_breadcrumb--stepTitle/.test(cssRule.selectorText)) {
cssRule.style["color"] = `var(--text-active)`;
}
Expand Down

0 comments on commit 799adb9

Please sign in to comment.