Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Aug 19, 2024
1 parent 6c5593d commit e78110a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/frontend/src/themes/_dark.json5
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
X11: 'rgba(0, 0, 0, 0.3)',
X12: 'rgba(255, 255, 255, 0.1)',
X13: 'rgba(255, 255, 255, 0.15)',
X14: ':alpha<0.5<@navBg',
X15: ':alpha<0<@panel',
X16: ':alpha<0.7<@panel',
X17: ':alpha<0.8<@bg',
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/themes/_light.json5
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
X11: 'rgba(0, 0, 0, 0.1)',
X12: 'rgba(0, 0, 0, 0.1)',
X13: 'rgba(0, 0, 0, 0.15)',
X14: ':alpha<0.5<@navBg',
X15: ':alpha<0<@panel',
X16: ':alpha<0.7<@panel',
X17: ':alpha<0.8<@bg',
Expand Down
6 changes: 4 additions & 2 deletions packages/frontend/src/ui/_common_/navbar-for-mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function more() {

<style lang="scss" module>
.root {
--nav-bg-transparent: color-mix(in srgb, var(--navBg), transparent 50%);
display: flex;
flex-direction: column;
}
Expand All @@ -91,7 +93,7 @@ function more() {
top: 0;
z-index: 1;
padding: 20px 0;
background: var(--X14);
background: var(--nav-bg-transparent);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
}
Expand Down Expand Up @@ -125,7 +127,7 @@ function more() {
position: sticky;
bottom: 0;
padding: 20px 0;
background: var(--X14);
background: var(--nav-bg-transparent);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
}
Expand Down
9 changes: 5 additions & 4 deletions packages/frontend/src/ui/_common_/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ function more(ev: MouseEvent) {
.root {
--nav-width: 250px;
--nav-icon-only-width: 80px;
--nav-bg-transparent: color-mix(in srgb, var(--navBg), transparent 50%);
flex: 0 0 var(--nav-width);
width: var(--nav-width);
Expand Down Expand Up @@ -144,7 +145,7 @@ function more(ev: MouseEvent) {
top: 0;
z-index: 1;
padding: 20px 0;
background: var(--X14);
background: var(--nav-bg-transparent);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
}
Expand Down Expand Up @@ -187,7 +188,7 @@ function more(ev: MouseEvent) {
position: sticky;
bottom: 0;
padding-top: 20px;
background: var(--X14);
background: var(--nav-bg-transparent);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
}
Expand Down Expand Up @@ -378,7 +379,7 @@ function more(ev: MouseEvent) {
top: 0;
z-index: 1;
padding: 20px 0;
background: var(--X14);
background: var(--nav-bg-transparent);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
}
Expand Down Expand Up @@ -408,7 +409,7 @@ function more(ev: MouseEvent) {
position: sticky;
bottom: 0;
padding-top: 20px;
background: var(--X14);
background: var(--nav-bg-transparent);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
}
Expand Down

5 comments on commit e78110a

@kakkokari-gtyih
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • --X14を消すのは不自然なので置いとくだけ置いといたほうがいいかも(もしくはX系を全部消すか)
  • --nav-bg-transparentはstyle.scssに定義し直したほうが良い可能性がある

@syuilo
Copy link
Member Author

@syuilo syuilo commented on e78110a Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--X14を消すのは不自然

不自然な理由って何かしら

--nav-bg-transparentはstyle.scssに定義し直したほうが良い可能性がある

たまたま一緒なだけだからそれを共通化するのは悪手

@tai-cha
Copy link
Contributor

@tai-cha tai-cha commented on e78110a Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X14を消すのが不自然というよりは、
X14を消すともともとX14で変更できていた部分がカスタムテーマによって変更できなくなるのではないかしら
(カスタムテーマの互換性がなくなりRefactorよりBREAKING)

@syuilo
Copy link
Member Author

@syuilo syuilo commented on e78110a Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X系は変更されることを意図してないやつだからまぁ

@tai-cha
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(だとしたら変更されることを意図してないのが明文化されていなかったので使ってる人はいなくはなさそうそうだしCHANGELOGにはしておいた方が混乱は少なさそう)

Please sign in to comment.