Skip to content

Commit

Permalink
Remove fomantic transition module (#26469)
Browse files Browse the repository at this point in the history
Removes all dropdown and dimmer animations. Works everywhere as far as I
can tell, but need to give this thorough testing. Removes around 70kb
JS/CSS.

Note, I'm not 100% sure regarding the various callbacks, those will need
more investigation, but it appears to work nonetheless.

Fixes: #15709
  • Loading branch information
silverwind authored Aug 16, 2023
1 parent 3b129aa commit 376c0e2
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 3,177 deletions.
29 changes: 27 additions & 2 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
--color-button: #fafafa;
--color-code-bg: #ffffff;
--color-code-sidebar-bg: #f5f5f5;
--color-shadow: #00000030;
--color-shadow: #00000026;
--color-secondary-bg: #f4f4f4;
--color-expand-button: #d8efff;
--color-placeholder-text: #aaa;
Expand All @@ -248,6 +248,7 @@
--color-accent: var(--color-primary-light-1);
--color-small-accent: var(--color-primary-light-6);
--color-active-line: #fffbdd;
--color-overlay-backdrop: #080808c0;
accent-color: var(--color-accent);
color-scheme: light;
}
Expand Down Expand Up @@ -705,6 +706,16 @@ a.label,
background: var(--color-active) !important;
}

/* styles from removed fomantic transition module */
.hidden.transition {
visibility: hidden;
display: none;
}
.visible.transition {
display: block !important;
visibility: visible !important;
}

.ui.message {
background: var(--color-box-body);
color: var(--color-text);
Expand Down Expand Up @@ -796,7 +807,7 @@ a.label,
.ui.selection.active.dropdown:hover,
.ui.selection.active.dropdown .menu,
.ui.selection.active.dropdown:hover .menu {
border-color: var(--color-primary-light-2);
border-color: var(--color-primary);
}

.ui.selection.dropdown .menu {
Expand Down Expand Up @@ -1186,6 +1197,20 @@ img.ui.avatar,
box-shadow: none;
}

.ui.dropdown .menu,
.ui.upward.dropdown > .menu,
.ui.menu .dropdown.item .menu,
.ui.selection.active.dropdown .menu,
.ui.upward.selection.dropdown .menu,
.ui.selection.active.dropdown:hover .menu,
.ui.upward.active.selection.dropdown:hover .menu {
box-shadow: 0 6px 18px var(--color-shadow);
}

.ui.dimmer {
background: var(--color-overlay-backdrop);
}

/* Override semantic selector '.ui.menu:not(.vertical) .item > .button' */
/* This fixes the commit graph button on the commits page */
/* modal svg icons, copied from fomantic except width and height */
Expand Down
6 changes: 6 additions & 0 deletions web_src/css/modules/animations.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@ code.language-math.is-loading::after {
.pulse {
animation: pulse 2s linear;
}

.ui.modal {
animation-name: fadein;
animation-duration: 300ms;
animation-timing-function: ease-in-out;
}
1 change: 1 addition & 0 deletions web_src/css/themes/theme-arc-green.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
--color-accent: var(--color-primary-light-1);
--color-small-accent: var(--color-primary-light-5);
--color-active-line: #534d1b;
--color-overlay-backdrop: #080808c0;
accent-color: var(--color-accent);
color-scheme: dark;
}
Expand Down
Loading

0 comments on commit 376c0e2

Please sign in to comment.