Skip to content

Commit

Permalink
Merge pull request #10 from Reverier-Xu/main
Browse files Browse the repository at this point in the history
feat: add linux window borders
  • Loading branch information
mustakshif authored Jan 18, 2024
2 parents 3b4fc08 + de9efc1 commit 8f3b258
Show file tree
Hide file tree
Showing 4 changed files with 5,290 additions and 1 deletion.
1 change: 1 addition & 0 deletions style/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

@use 'platforms/mobile';
@use 'platforms/windows';
@use 'platforms/linux';

@property --property-percentage {
syntax: '<percentage>';
Expand Down
3 changes: 3 additions & 0 deletions style/platforms/linux.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body.body--linux {
border: 1px solid #80808080;
}
5,285 changes: 5,284 additions & 1 deletion theme.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ const doms = {
}

const isMacOS = navigator.platform.indexOf("Mac") === 0 || navigator.userAgentData.platform === "macOS" || "darwin" === process.platform;
const isLinux = navigator.platform.indexOf("Linux") === 0 || navigator.userAgentData.platform === "Linux" || "linux" === process.platform;
const isMobile = document.getElementById('sidebar') && document.getElementById('editor');
const isInBrowser = doms.toolbar && doms.toolbar.classList.contains('toolbar--browser');

isMacOS && document.body.classList.add('body--mac');
isLinux && document.body.classList.add('body--linux');
isMobile && document.body.classList.add('body--mobile');
isInBrowser && document.body.classList.add("body--browser");

Expand Down

0 comments on commit 8f3b258

Please sign in to comment.